Var: media1,media2, mioatr, mioroc(0),
ValTakeRitracc(30),
ValStop(0.7),
parmedia1(10),
parmedia2(25);
media1=Mov(C,parmedia1,E);
media2=Mov(C,parmedia2,E);
mioatr=Atr(C,10);
mioroc=ROC(C,10);
InstallTrailingProfit(INTICK, 50, ValTakeRitracc, "TakeProfit");
InstallStopLoss(INPERC, ValStop,"Stop");
if not PositionLong then
if CrossOver(media1, media2) or (mioatr>=110 and media1>media2 and mioroc>1.40) or mioroc>1.30 then
EnterLong(NextBar, AtOpen);
endif;
endif;
if not PositionShort then
if CrossUnder(media1, media2) then
EnterShort(NextBar, AtOpen);
endif;
endif;