samedi 3 septembre 2016

Help me to plot a histogram

Hi ,
I want an afl to draw a histogram,

Where the moving average is the zero line and it should be subtracted from the close.
I.e if the close is higher than MA then it will be plotted above the zero line an if close is below the MA it will be plotted below the zero line.

here i am using lagged moving average... not the traditional simple moving average plotted upto the last date...this is ploted few days before the last date.

This is code for MA
n = Param("Length",14,2,200,1,1);
Plot(MA(C,n),"CMA",ParamColor("color",colorcycle), ParamStyle("style"),0,0,-(n-1)/2);
Pls Help.


Help me to plot a histogram

Aucun commentaire:

Enregistrer un commentaire