I've this code:
if (BarsInProgress == 0 ) {
if (Position.MarketPosition != MarketPosition.Flat) {
if (Position.MarketPosition == MarketPosition.Long) {
ExitLong(1, contratos, "OutUp_f", "Up");
}
if (Position.MarketPosition == MarketPosition.Short) {
ExitShort(1, contratos, "OutDown_f", "Down");
}
}
if (Close[0] > Open[0])
orderlaunch = EnterShortStop(1, true, contratos, Low[0], "Down");
if (Close[0] < Open[0])
orderlaunch = EnterLongStop(1, true, contratos, High[0], "Up");
}
... next at BarsInProgress == 1 it's possible to get out if reaches some condition, if not, like you can see in the above code exits at beginning of the next Bar (BarsInProgress == 0).
Ok, then the problem I've found (or perhaps is the expected behavior) is that if it closes at next bar (BarsInProgress == 0) and also in the same bar the stop price is reached never launches an order into the market.
Is this correct?
I've tried also setting EntriesPerDirection > 1
Thank you

Comment