Code: Select all
If MarketPosition = 0 then
If Average(close , 5 ) < Average(close , 10) and
Average(close , 5 ) > Average(close ,10) 
Sellshort 1 contract next bar at Low Stop ;
BuyToCover 1 Contract next bar at Highest(High , 3 )  ;
For example :
The Sell Short order was filled in the next bar.
I can't get the BuyToCover order done because the MarketPosition is supposed to be remaned as zero because the next bar high was higher than BuyToCover order but the BuyToCover order wasn't filled .