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

[amibroker] Re: Auto-Analysis Question



PureBytes Links

Trading Reference Links

Graham,

Thanks for the quick response and help.

The only approach that I can think of using the functions that you
suggested is the following:

AABarCount=ValueWhen(Status("lastbarinrange")==1,BarIndex(),1)
-ValueWhen(Status("firstbarinrange")==1,BarIndex(),1)+1;

This works so that's great.

I notice, however, that "AABarCount" shows the count only on the last
line of the exploration output for each symbol.  If I use the
following, it will place the count on each line:

Range=LastValue(AABarCount);

My understanding is that "ValueWhen" produces an array and that
"LastValue" produces a number.  If so, it seems that "AABarCount"
would generate an entry for each line of output and that "Range", if
anything, would generate a single output.  Do you have any idea as to
why these produce the results they do?

Thanks,


Wayne


--- In amibroker@xxxxxxxxxxxxxxx, Graham <kavemanperth@xxx> wrote:
>
> here is a direction for you
> status( ''statuscode'' )
> "barinrange" - returns 1 when current bar is within current
> auto-analysis From-To range
> "firstbarinrange" and "lastbarinrange". They return 1 (or True) on the
> first/last bar of analysis range.
> 
> --
> Cheers
> Graham
> AB-Write >< Professional AFL Writing Service
> Yes, I write AFL code to your requirements
> http://e-wire.net.au/~eb_kavan/ab_write.htm
> 
> 
> 
> On 5/3/06, wlandry01 <wlandry01@xxx> wrote:
> > Hi,
> >
> > I'm trying to determine the number of bars in the Auto Analysis
> > range for use in calculating average values.  I would like to
> > calculate, for example, the average change in the Close over the
> > Auto Analysis range and output that in the Exploration.
> >
> > I can't see, however, how to do that with the various "bar" functions,
> > including the "Status" functions.  If someone could point me in the
> > right direction I would appreciate it.
> >
> >
> > Thanks,
> >
> >
> > Wayne
> >
> >
> >
> >
> >
> >
> > 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
> >
> >
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
> >
> >
>







------------------------ Yahoo! Groups Sponsor --------------------~--> 
GFT Forex Trading Accounts As low as $250 with up to 400:1 Leverage. Free Demo.
http://us.click.yahoo.com/lpv1TA/jlQNAA/U1CZAA/GHeqlB/TM
--------------------------------------------------------------------~-> 

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

 
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/