I tried the following code but an error was generated - "Cannot use next bar's price and close order in the same strategy"
Code: Select all
if LastBarOnChart then begin
Sell ("LastBarLE") this bar on Close;
BuyToCover ("LastBarSE") this bar on Close;
end;
Code: Select all
Buy ("Buy") lots contracts next bar at Market;
SellShort ("Sell") lots contracts next bar at Market
Thanks.