(1)this code looks in the future. (2)what do u mean by- "The average is shifted back 9-bars"?
(3)To look back 9 bars back,u should use - x= Ref(MA(mp,18),-9); On Wed, Sep 1, 2010 at 12:07 PM, Dennis Lipter <[email protected]>wrote: > > > The code below is for a centered moving average. > > The average is shifted back 9-bars. > > The problem is that for those 9-bars, a flat line is plotted. I would > prefer to have that portion of the plot blank instead of the flat line. > > > > mp=IIf(*C*,(*H*+*L*+*C*)/3,(*H*+*L*)/2); > > x= Ref(MA(mp,18),9); > > Plot(x,"Centered MA-18 ",*colorRed*); > > > > Ideas would be appreciated. > > Thanks > > >
