I've noticed when using Unmanaged Strategies, NT8 sometimes runs into concurrency issues when the price is moving very fast, and it ends up completely blowing up the strategy.
I've attached the log of my strategy execution, with comments inside, and below is the description of what's happening:
- The Strategy uses bracket orders to place opposite long and short orders, using OCO
- The Strategy gets long 3 lots and short 3 lots
- Short side gets triggered, Long side gets cancelled
- Only 1 lot gets filled, 2 lots are pending
- While the first Short order gets executed, I setup stop loss and take profit orders to be submitted, again with an OCO, so that only one can be triggered
- Take Profit order is submitted, Stop Loss isn't yet
- Price moves very fast, the Take Profit is Filled before the Stop Loss even gets a chance to be submitted
- When the Stop Loss eventually gets executed, the OCO is now invalid because the Profit Target was already filled
- NT8 stops the strategy altogether, even though I had a partial fill. That means I now have 2 lots that are being filled, and since the strategy exited, these 2 lots are completely naked!
Even though the log file shows the classic OCO error message, the problem has nothing to do with OCO.
The real issue is with the execution sequence, specifically Stop Loss not being submitted in a timely manner.
Is there any way to work around that concurrency issue ? I need the Stop Loss and Profit Target submitted before any of them are actually filled.
Do you have any idea how I can work around that ?
Thanks in advance!
Comment