This is a exit the red color one. The idea behind it was bollinger bands but what if the market is going amazingly your probably better off in something else. This will tighten the exit when the market gang busters and loosen it when it can decide. This also has an absolute value on the index.
_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();