PureBytes Links
Trading Reference Links
|
I really appreciate your help, again thanks for taking time out and
helping. The code looks really great! But I've copied and loaded the
code and get an error message. I removed the underscore lines after
the AND and OR to make sure that's not it and also this at end <<...>>
with no luck. I've tried it as is and tested with the removement.
Any idea what I'm doing wrong?
--- In amibroker@xxxxxxxxxxxxxxx, Fred Tonetti <ftonetti@xxx> wrote:
>
> Any how . to conclude ( sort of ) . The semi-dumb complete version
of this
> would look like the AFL below . and would produce a chart like that
attached
> .
>
> It's a little smarter then the previously posted incomplete version
in that
> it reuses arrays when it can but it is still dumb in that it uses
AFL arrays
> rather than the Osaka pluggin to handle the tables and as such requires
> EVERY array to be defined and plotted .
>
>
>
> PlotOHLC(O,H,L,C, "Data", colorWhite, styleBar);
>
> BI = BarIndex();
>
> LVBI = LastValue(BI);
>
> TN = TimeNum();
>
> printf(NumToStr(LVBI));
>
> EnableScript("VBScript");
>
> A1 = A2 = A3 = A4 = A5 = A6 = A7 = A8 = A9 = Cum(0);
>
> <%
>
> BI = AFL("BI")
>
> LVBI = AFL("LVBI")
>
> TN = AFL("TN")
>
> H = AFL("H")
>
> L = AFL("L")
>
> C = AFL("C")
>
> A1 = AFL("A1")
>
> A2 = AFL("A2")
>
> A3 = AFL("A3")
>
> A4 = AFL("A4")
>
> A5 = AFL("A5")
>
> A6 = AFL("A6")
>
> A7 = AFL("A7")
>
> A8 = AFL("A8")
>
> A9 = AFL("A9")
>
> Dim TBL(10, 500)
>
> for i = 1 to LVBI
>
> for j = 1 to 9
>
> if TBL(j, 0) = 1 then
>
> if TN(i) <> 95500 then
>
> if (C(i-1) <= TBL(j, i-1) AND _
>
> H(i) >= TBL(j, i-1)) OR _
>
> (C(i-1) >= TBL(j, i-1) AND _
>
> L(i) <= TBL(j, i-1)) then
>
> TBL(j, i) = TBL(j, i-1)
>
> TBL(j, 0) = 0
>
> else
>
> TBL(j, i) = TBL(j, i-1)
>
> end if
>
> else
>
> TBL(j, i) = TBL(j, i-1)
>
> end if
>
> end if
>
> Next
>
> if TN(i) = 95000 then
>
> for j = 1 To 10
>
> if TBL(j, 0) = 0 then
>
> Exit for
>
> End if
>
> Next
>
> TBL(j, i) = H(i)
>
> TBL(j, 0) = 1
>
> for j = 1 To 10
>
> if TBL(j, 0) = 0 then
>
> Exit for
>
> End if
>
> Next
>
> TBL(j, i) = L(i)
>
> TBL(j, 0) = 1
>
> end if
>
> Next
>
> for i = 0 to 499
>
> A1(i) = TBL(1, i)
>
> A2(i) = TBL(2, i)
>
> A3(i) = TBL(3, i)
>
> A4(i) = TBL(4, i)
>
> A5(i) = TBL(5, i)
>
> A6(i) = TBL(6, i)
>
> A7(i) = TBL(7, i)
>
> A8(i) = TBL(8, i)
>
> A9(i) = TBL(9, i)
>
> Next
>
> AFL("n") = n
>
> AFL("A1") = A1
>
> AFL("A2") = A2
>
> AFL("A3") = A3
>
> AFL("A4") = A4
>
> AFL("A5") = A5
>
> AFL("A6") = A6
>
> AFL("A7") = A7
>
> AFL("A8") = A8
>
> AFL("A9") = A9
>
> %>
>
> printf(NumToStr(n));
>
> Plot(IIf(A1 > 1, A1, -1e10), "", colorRed, styleDots);
>
> Plot(IIf(A2 > 1, A2, -1e10), "", colorRed, styleDots);
>
> Plot(IIf(A3 > 1, A3, -1e10), "", colorRed, styleDots);
>
> Plot(IIf(A4 > 1, A4, -1e10), "", colorRed, styleDots);
>
> Plot(IIf(A5 > 1, A5, -1e10), "", colorRed, styleDots);
>
> Plot(IIf(A6 > 1, A6, -1e10), "", colorRed, styleDots);
>
> Plot(IIf(A7 > 1, A7, -1e10), "", colorRed, styleDots);
>
> Plot(IIf(A8 > 1, A8, -1e10), "", colorRed, styleDots);
>
> Plot(IIf(A9 > 1, A9, -1e10), "", colorRed, styleDots);
>
> <<...>>
>
>
>
> _____
>
> I am using the free version of SPAMfighter for private users.
> It has removed 8649 spam emails to date.
> Paying users do not have this message in their emails.
> Try SPAMfighter <http://www.spamfighter.com/go.asp?t=249> for free now!
>
Content-Description: "AVG certification"
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.409 / Virus Database: 268.13.27/517 - Release Date: 11/3/2006
|