Ray,

This should work (using the Close array):

s5 = IIf(Cum(1) > BarCount-14, MA(Close, 5), Null);

Plot(s5, etc...);

Actually, I just noticed there's a new function called BarIndex()
which will do the same job:

s5 = IIf(BarIndex() >= BarCount-14, MA(Close, 5), Null);

GP


--- In [email protected], "ax_ray2222" <[EMAIL PROTECTED]> wrote:
>
> Hello, I try to plot a SMA(5) only for the last 14 days on the chart, 
> but I can't figure out how to write the formula to do this. Any help is 
> appreciated, Thank you, Ray
>


Reply via email to