--- In [email protected], "Natasha ~~!!!" 
<[EMAIL PROTECTED]> 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


Reply via email to