DEFPARAM CumulateOrders=false NTICK = 30 c4=barindex-tradeindex=1 //Long entry if Close < Open then buy 1 shares at low - Ntick stop endif //stop loss massimo in punti dal prezzo ingresso if LongOnMarket and c4 then SELL AT MARKET endif //Short entry if Close > Open then sellshort 1 shares at high - Ntick stop endif //stop loss massimo in punti dal prezzo ingresso If ShortOnMarket AND c4 THEN EXITSHORT AT MARKET endif set stop ploss 70 set target pprofit 140