Fred, that was SO obvious now that I see this.  Thanks to you and Terry.
Chris
----- Original Message -----
From: Fred
Sent: Friday, October 06, 2006 12:55 PM
Subject: [amibroker] Re: barssince question

BarsSince produces an array of values i.e. the number of bars since
whatever condition from the perspective of each individual bar. If
the perspective you want is only from the last bar then this can
always be gotten at via LastValue ...

CurrBars = LastValue(BarsSince(MyCondition));

--- In [EMAIL PROTECTED]ps.com, "Chris DePuy" <[EMAIL PROTECTED]> wrote:

>
> Terry, thanks for the reply, but I must be missing something you
said because i cannot see how your suggestion changes the BarsSince
instruction from returning the number of bars since the selected
value to returning the value the last value in an array.
>
> The problem i'm having is I'm asking "how do i get a count of how
many bars have passed since a condition has occurred RELATIVE TO THE
LAST BAR even though I have not selected the last bar?"
>
> I want this value to change during the day in real-time, so that
with each successive 15 minute bar that occurs, the value would
increment by one (bar) unless there's another change in the array
being processed. Right now, using BarsSince, i can only accomplish
this by using the mouse and clicking/selecting on the right-most bar
in the indicator window.
>
>
> ----- Original Message -----
> From: Terry
> To: [EMAIL PROTECTED]ps.com
> Sent: Friday, October 06, 2006 12:09 PM
> Subject: RE: [amibroker] barssince question
>
>
>
> You are computing an array, which is what usually happens so
just use.
>
> LastValue(Array);
>
> --
>
> Terry
>
> -----Original Message-----
> From: [EMAIL PROTECTED]ps.com
[mailto:[EMAIL PROTECTED]ps.com] On Behalf Of Chris DePuy
> Sent: Friday, October 06, 2006 12:28
> To: [EMAIL PROTECTED]ps.com
> Subject: [amibroker] barssince question
>
>
>
> I am trying to display in an interpretation how many bars have
passed since the close crossed a moving average, but I want to use
the reference point of the last bar at all times. Using BarsSince,
its calculating the bars since the SelectedValue (see my below
snippet). Can anyone tell me how to get this to reference bars
since last cross relative to the last bar?
>
> "bars since c> wma long (blue) = "+BarsSince(Cross(C,WMA
(C,period)));
>

__._,_.___

Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com

For other support material please check also:
http://www.amibroker.com/support.html






SPONSORED LINKS
Software support Small business finance Business finance online
Business finance training Business finance course

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___

Reply via email to