[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] Re: Need help Figuring Out.



PureBytes Links

Trading Reference Links

Not likely that will do anything for you ... I took the AFL as 
posted, removed the blank lines after the VBS continued lines and it 
works fine.

However, given how the AFL is configured and in particular the 
Dimension statement for TBL (10, 500) ... 

- If you have more than 500 bars of data I would expect it to 
produce an error.  
- In addition the AFL will not produce more then 9 total arrays 
which means that if more then that many existing lines were open you 
wouldn't see them ...

As I previously commented ... This is a semi-dumb version to 
demonstrate that what you were wanting to do is feasible.

--- In amibroker@xxxxxxxxxxxxxxx, "rlfoxworth2006" 
<rlfoxworth2006@xxx> wrote:
>
> One more time, please...Still not showing any red dots..  
> Any chance posting the afl to the files section?
> Thanks....
> 
> RichardF
> 
> 
> 
> --- In amibroker@xxxxxxxxxxxxxxx, "Fred" <ftonetti@> wrote:
> >
> > AFL should work as is ... Works fine for me as demonstrated in 
> > previous attachment.
> > 
> > --- In amibroker@xxxxxxxxxxxxxxx, "rlfoxworth2006" 
> > <rlfoxworth2006@> wrote:
> > >
> > > 
> > > 1 min, 5 min, 15 min. 
> > > 
> > > 
> > > 
> > > --- In amibroker@xxxxxxxxxxxxxxx, "Fred" <ftonetti@> wrote:
> > > >
> > > > What's the periodicity of the data in your charts ? 5 Min ? 
10 
> > Min ?
> > > > 
> > > > --- In amibroker@xxxxxxxxxxxxxxx, "rlfoxworth2006" 
> > > > <rlfoxworth2006@> wrote:
> > > > >
> > > > > Ok thanks, I had figured the blank line thing out....
> > > > > Still wondering what to do with  this "<<...>>"? 
> > > > > 
> > > > > Anyhow in the code I'm not getting a value for "n" or any 
> > values for
> > > > > A1 to A9 when scrolling through the chart, also no Red 
Dots 
> > > > anywhere.
> > > > > 
> > > > > Sorry to be such a pain... Again thankyou!
> > > > > 
> > > > > I used this extra code to check for values when testing....
> > > > > 
> > > > > Title = Name ( ) + ", " + Date ( ) + " - " +
> > > > > "\n " + "n = " + n +
> > > > > "\n " + "A1 = " + A1 +
> > > > > "\n " + "A2 = " + A2 +
> > > > > "\n " + "A3 = " + A3 +
> > > > > "\n " + "A4 = " + A4 +
> > > > > "\n " + "A5 = " + A5 +
> > > > > "\n " + "A6 = " + A6 +
> > > > > "\n " + "A7 = " + A7 +
> > > > > "\n " + "A8 = " + A8 +
> > > > > "\n " + "A9 = " + A9 +
> > > > > "\n " + "BI = " + BI +
> > > > > "\n " + "LVBI = " + LVBI +
> > > > > "\n " + "TN = " + TN +
> > > > > "\n " + "H = " + H +
> > > > > "\n " + "L = " + L +
> > > > > "\n " + "C = " + C ;
> > > > > 
> > > > > 
> > > > > --- In amibroker@xxxxxxxxxxxxxxx, "Fred" <ftonetti@> wrote:
> > > > > >
> > > > > > "An Error Message" is not terribly specific ... That's 
kind 
> > of 
> > > > like 
> > > > > > me taking my car to the mechanic and saying "I have a 
> > problem 
> > > > with my 
> > > > > > car, can you fix it ?" ... I suspect the mechanic might 
> want 
> > to 
> > > > know 
> > > > > > presactly what problem I think I'm having ...
> > > > > > 
> > > > > > For starters ... DON'T ALTER THE CODE ... It works as 
> > posted ...
> > > > > > 
> > > > > > The underscores are continuation characters in VBS 
> > indicating 
> > > > that 
> > > > > > the next line is part of the preceding one.  The problem 
is 
> > that 
> > > > > > Yahoo added extra blank lines after code lines ... 
so ... 
> > make 
> > > > sure 
> > > > > > the lines that have underscores at the right end of them 
do 
> > NOT 
> > > > have 
> > > > > > blank lines following them as this causes a VBS syntax 
> error.
> > > > > > 
> > > > > > --- In amibroker@xxxxxxxxxxxxxxx, "rlfoxworth2006" 
> > > > > > <rlfoxworth2006@> wrote:
> > > > > > >
> > > > > > > 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@> 
> > > > 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