I am running nine strategies. Seven on the FDAX and two on the ES. Two of the FDAX strategies are on live accounts, everything else is on the same sim account.
I manually closed an ES position on the sim account with by clicking “Close” on the Dynamic SuperDOM.
This is what happened:
The OCO Stop Loss (stop order) and Profit Target (limit order) order were cancelled. Strategy identified on the Strategy ID on the Orders tab of the Control Center.
The position on the ES was closed.
The strategy that opened the position processed an OnTermination event but kept running. My strategy log entry was:
2016-12-08 07:13:41:387: Time: 2016-12-08 07:14: CB 0009943: BIP: 0: MTStrategyBaseV02.OnTermination:Strategy Terminated
Then the other ES strategy with no position processed an OnTermination event and terminated. My strategy log entries were:
2016-12-08 07:13:41:747: Time: 2016-11-08 00:31: CB 0000000: BIP: 0: MTStrategyBaseV02.OnTermination:Strategy Terminated
2016-12-08 07:13:41:762: Time: 2016-11-08 00:31: CB 0000000: BIP: 0: Direct Message: 08-12-2016 7:13:41 AM(2) VM188 BlissV01ES: MTStrategyBaseV02.OnTermination: Strategy Terminated
The result was that the related orders were cancelled and the position was closed. All good up to here. Then the incorrect strategy was terminated/disabled. Both strategies received an OnTermination event.
Neither strategy received an OnOrderUpdate – no entries in my strategy logs. Even though the strategy with a position had both a Stop Loss and Profit Target orders (OCO) which were cancelled.
Neither strategy received an OnPositionUpdate event – no entries in my strategy logs. Even though the strategy which opened the position now reflected no position (Unrealized and Realized both zero) and the strategy was still enabled.
Questions:
Why did both strategies running on the ES receive an OnTermination event?
Why did one strategy (the wrong one) terminate and the other keep running?
Neither strategy received an OnOrderUpdate event – no entries in either of my strategy logs. Why not?
Neither strategy received an OnPostionUpdate event – no entries in either of my strategy logs. Why not?
Can this incorrect behaviour be corrected or at least a work around provided?
Does NT8 have a linkage between the position and the strategy that created it so that this problem is solved? So that closing a position terminates the correct strategy?
Attached:
Log, executions and trace and screen capture of the strategies tab.
Comment