prova a vedere cosi se funziona:
Var: Sma(0);
InstallStopLoss(INPERC, 5);
InstallTakeProfit(INPERC, 1);
sma=MOV(Close,10, S);
plotchart(sma,0,orange,solid,2);
if c > Sma then
EnterLong(nextBar, AtOpen);
endif;
if c < Sma then
EnterShort(nextBar, AtOpen);
endif;