I am running 2 timeframes in the strategy in question - 60mins (primary) and 1min.
I enter the ExitLongStop with the barsInProgressIndex for the 1min time frame and I see from the logging that the stop price is valid for that 1 min bar in relation to the Close.
The 60mins bar though is completely different and this stop order would be invalid, so the above error would be expected if I submitted the order with barsInProgress=0.
The strategy sets up the order to be placed during onBarUpdate() for 1 min, however since there is an existing open order that requires cancelling, the strategy puts the new order into 'pending' state.
When the order that was cancelled fires the onOrderUpdate() event, the event's barsInProgress is set to 60mins. The pending order is submitted during this onOrderUpdate() event - as a 1min order using that parameter, not a 60min order, however NT still complains.
This only happened once in the course of 20,000 trades with this strategy during backtesting so I assume that something quite unique occurs, but it occurs consistently.
To work around this problem I changed the strategy so that the pending order is submitted on the next 1min onBarUpdate() event, and at that point it is accepted.
However the downside to the workaround is that the position is unprotected in the market for the duration of the 1 min bar when it was originally set up, but before it could be submitted.

Comment