Defparam Cumulateorders = False n = 4 timebuy = 0 timesellshort = 190000 m = 9 nbrs = 12 cl = close<close[n] cl = cl and time = timebuy cs = close>close[m] cs = cs and time = timesellshort if cl then buy 2 contract at market endif if cs then sellshort 2 contract at market endif if barindex-tradeindex = nbrs then sell at market exitshort at market endif