First it finds the HHV(C,126).  Presumably that will be a positive number 
( i.e., TRUE ) on every bar, including the current bar, so BarsSince reports 
0 bars since it was last true. Plotting the arrays can show you step-by-step 
how it arrives there...

Steve D

----- Original Message ----- 
From: "steve_almond" <m...@steveal.gotadsl.co.uk>
To: <amibroker@yahoogroups.com>
Sent: Saturday, March 28, 2009 10:10 AM
Subject: [amibroker] BarsSince Question


>I was trying to calculate the number of bars since the highest close of the 
>last 126 trading days.
>
> This seems to work:
>
> A1=(HHVBars(C,126));
>
> But this doesn't (it always returns 0):
>
> A1=BarsSince(HHV(C,126));
>
> Why does that not work?
>
> Steve
>
>
>
> ------------------------------------
>
> **** IMPORTANT PLEASE READ ****
> This group is for the discussion between users only.
> This is *NOT* technical support channel.
>
> TO GET TECHNICAL SUPPORT send an e-mail directly to
> SUPPORT {at} amibroker.com
>
> TO SUBMIT SUGGESTIONS please use FEEDBACK CENTER at
> http://www.amibroker.com/feedback/
> (submissions sent via other channels won't be considered)
>
> For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
> http://www.amibroker.com/devlog/
>
> Yahoo! Groups Links
>
>
>
> 


Reply via email to