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

[amibroker] Re: Syntax-Error ---> Kaveman



PureBytes Links

Trading Reference Links


Hi Kaveman!  :-)

thanx for your reply, yes it did not make sense to compare HiBar to H
[i-1]. It was a typo and should be HiVal, as I am looking for the 
last high and the number of those bar 20 periods backwards from the 
last bar visible. 
Yes I am aware I canīt use  "firstvisiblebar" in AA. For backtesting 
I will have a different formula wich does the processing for all 
bars are the bars in a certain range, not only for those currently 
on the screen.

Best regards,
enzo

--- In amibroker@xxxxxxxxxxxxxxx, kaveman perth <kavemanperth@xxxx> 
wrote:
> to start I don't know if Status("firstvisiblebar") works in AA 
window
> which will then not give you the startbar or endbar.
> 
> try this in IB
> 
> SetBarsRequired(10000,0);
>  per=20;
> StartBar=ValueWhen(Status("firstvisiblebar"),BarIndex());
> EndBar=StartBar-per;
> HiBar=0;
> 
> Title = Name() + " " + (BarCount-1) + " " +StartBar+" "+endbar;
> 
> also this does not make sense. You state the HiBar to equal i, but
> call a condition that relates H to Hibar
> 
> AND  H[i-1]>HiBar 
> 
> If you want to know the bar of the high, best to use a barindex() 
condition
> 
> On Fri, 15 Oct 2004 22:49:37 -0000, enzo <herrfrechdax@xxxx> wrote:
> > 
> > 
> > Sorry, but I am almost getting mad. For at least one hour I am
> > trying this and that and all the time I have a syntax error with 
the
> > following code:
> > (want to determine the number of the bar where the last high
> > occurred before the first visible)
> > 
> > per=20;
> > StartBar=Status("firstvisiblebar");
> > EndBar=StartBar-per;
> > HiBar=0;
> > for ( i = startbar; i >= endbar; i-- )
> > (
> >        if (H[i-1]> H[i] AND  H[i-1]>HiBar )
> >                HiBar=i;
> > 
> > )
> > 
> > Thanx for the help.
> > enzo
> > 
> > 
> > Check AmiBroker web page at:
> > http://www.amibroker.com/
> > 
> > Check group FAQ at: 
http://groups.yahoo.com/group/amibroker/files/groupfaq.html
> > Yahoo! Groups Links
> > 
> > 
> > 
> > 
> > 
> 
> 
> -- 
> Cheers
> Graham
> http://e-wire.net.au/~eb_kavan/





------------------------ Yahoo! Groups Sponsor --------------------~--> 
Make a clean sweep of pop-up ads. Yahoo! Companion Toolbar.
Now with Pop-Up Blocker. Get it for free!
http://us.click.yahoo.com/L5YrjA/eSIIAA/yQLSAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

Check AmiBroker web page at:
http://www.amibroker.com/

Check group FAQ at: http://groups.yahoo.com/group/amibroker/files/groupfaq.html 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/