I dont understand where is the error but my strategy accumulated 1 contract in each order when i test it in replay. But dont happend when I reload the chart...
The code lines for launch orders are very simple:
void myLong(){
if (Position.MarketPosition == MarketPosition.Flat || Position.MarketPosition == MarketPosition.Short){
EnterLong(OrderQuantityVar,"L");
}
}
void myShort(){
if (Position.MarketPosition == MarketPosition.Flat || Position.MarketPosition == MarketPosition.Long){
EnterShort(OrderQuantityVar,"S");
}
}
The "OrderQuantityVar" value is always 1 in the output window.
My NT version is the last (7.0.10.30)
Look the animated gif below please. Thank you.

Comment