| PureBytes Links Trading Reference Links | --- In amibroker@xxxxxxxxxxxxxxx, "Natasha ~~!!!" 
<ghostship.blackparrot@xxx> wrote:
>
>  * Filter = Status(*"LastBarInTest"*);*
> **
> *       suppose i want to use the filter on say five or six bars 
only so
> which code should i use in filter..*
> **
> *    I dont want to use the days checkbox  in the " aa "  
window... .*
> **
> *   Thanks .
> *
> -- 
>        Warm Regards;
>       ``````  Natasha !!!
> To achieve, you need thought. You have to know what you are doing 
and that's
> real power.
>
Hello Natasha !!!
You can use BarIndex or DateNum as they are used in these plots.
Plot(IIf(BarIndex() >= 978 AND BarIndex() <= 988,C,0),"",1,1);
Plot(IIf(DateNum() >= 1050502 AND DateNum() <= 1050512,C,0),"",2,1);
The AFL Reference doesn't say what Status ("LastBarInTest") returns - 
assuming it returns true (1)
If you want the last five bars try this:
LastBarIndex = IIf(Status("LastBarInTest") == 1,BarIndex(),Null);
BarIndex() >= LastBarIndex - 5 AND BarIndex() <= LastBarIndex;
Depending what mode you are in - you could do similar with LastValue
(BarIndex()) - the way it is used in this plot
LastBarIndex = LastValue(BarIndex());
// Plot(LastBarIndex," ",6,1);
Plot(IIf(BarIndex() >= LastBarIndex - 10 AND BarIndex() <= 
LastBarIndex,C,1)," ",8,1);
Cheers,
Brian_z
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 NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/
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/
<*> Your email settings:
    Individual Email | Traditional
<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)
<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx
<*> 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/
 
 |