The goal with this was to use it as an exit and to get kicked of a stock early when it wasn’t going up as fast as the market with a bit of leeway.
_SECTION_BEGIN(“STD DEV”);
range = Param(“St DEV Range”,100,1,1000,1);
stdvar =Param(“Std Dev Variable minus”,1,0,3.5,.1);
stddev1 = StDev(C,range);
index = Foreign(ParamStr(“Ticker”,”$XAO.au”),”C”);
indexstddev = MA(C,range)*IIf((index+StDev(index,range))/MA(index,range)>1,(index+StDev(index,range))/MA(index,range),1);
indexstddev1 = MA(C,range)*(index+StDev(index,range))/MA(index,range);
stddev = indexstddev – stddev1*stdvar;
stddevup = indexstddev1 + stddev1*2;
Plot(indexstddev,”STD DEV”,ParamColor(“Foriegn Color”,colorRed),Null,Null,0,0,0,1);
Plot(stddev,”STD DEV”,ParamColor(“Color”,colorAqua),Null,Null,0,0,0,1);
Plot(stddevup,”STD DEV”,ParamColor(“Colorup”,colorPink),Null,Null,0,0,0,1);
_SECTION_END();