I have 2 errors combined.
The first being Order can't be submitted - the OCO ID xxxx cannot be reused and the other is Buy stop or buys stop limit order cant be placed below market.
My setup is the following
Calculate.OnBarClose
OnBarUpdate() - used to calculate some conditions
OnMarketData() - used to calculate some other conditions and to enter an order using EnterShort.
I am also using checks to entry an order only once every barclose so there shouldn't be duplicate orders
I do not understand if the errors are causing one another or not. I had Buy stop or buys stop limit order solved in the past by updating to the latest NinjaTrader8 version but the OCO one is new.
Attached you can find a screenshot of the errors and a snippet simulating the logic flow
Thank you!
Comment