Code: Select all
If MarketPosition = 0 then
Begin
If Average(close , 5 ) < Average(close , 10) and
Average(close , 5 )[1] > Average(close ,10) [1]
Begin
Sellshort 1 contract next bar at Low Stop ;
BuyToCover 1 Contract next bar at Highest(High , 3 ) [1] ;
End ;
End ;
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 .
thks