Hi experts. hope this time you help. I have one afl based on ma cross. I want in it to add stoploss manually and trailing stoploss auto 10 points above 20 sma or if sutsian 5 minutes above 20sma. Trailing start after 15 points. All the numbers can be changed based on timeframe.If so please help. Thanz in advance.
--------------------------------
_SECTION_BEGIN("Price");
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
Plot( C, "Close", ParamColor("Color", colorBlack ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() );
_SECTION_END();
_SECTION_BEGIN("ma_crossover");
x = MA(Close,8);
y = MA(Close,13);
Plot(MA(Close,8),"",colorRed,styleLine);
Plot(MA(Close,13),"",colorDarkGreen,styleLine);
Buy=Cross(x,y);
PlotShapes(shapeUpArrow*Buy,colorGreen);
XR=(MA(Close,8) * (2 / 6 - 1) - MA(Close,13) * (2 / 11 - 1)) / (2 / 6 - 2 / 11);
Title = Name() + " " + Date()+" " + EncodeColor( colorBlue ) +"8/13 MA " +EncodeColor( colorRed )
+ " O " + O + " H " + H + " L " + L + " C "+ C + "\n";
Sell=Cross(y,x);
PlotShapes(shapeDownArrow*Sell,colorRed);
AlertIf( Sell, "SOUND C:\\Windows\\Media\\chord.wav", "Audio alert", 2 );
XR=(MA(Close,13) * (2 / 6 - 1) - MA(Close,8) * (2 / 11 - 1)) / (2 / 6 - 2 / 11);
Title = Name() + " " + Date()+" " + EncodeColor( colorBlue ) +"8/13 MA " +EncodeColor( colorRed )
+ " O " + O + " H " + H + " L " + L + " C "+ C + "\n";
_SECTION_END();