I have couple question about details of how KeepRunning and Recalculate modes work with unmanaged strategies.
Let's assume, we have:
- Long position, 100 contracts;
- take profit 1 order (tp1), 40 contracts;
- take profit 2 order (tp2), 60 contracts;
And this moment connection lost.
Tp1 filled with 40 contracts.
Tp2 partially filled with 30 contracts.
Connection established again.
Keep running | Recalculate | ||
Position | 1. Will OnPositionUpdate() be triggered for events that happened while disconnected? 2. Will OnPositionUpdate() will be triggered for all events that will happens after connection established again. 3. Will Account Position be the same to Strategy Position? |
||
Orders | 1. Will OnOrderUpdate() and OnExecutionUpdate() be triggered for events that happened while disconnected? 2. Will OnOrderUpdate() and OnExecutionUpdate() will be triggered for all events (I mean Tp2 mainly) that will happens after connection established again. |
||
Lost bars | 1. Will all price data be uploaded and added to history? 2. Will OnBarUpdate() be triggered for all these bars? 3. Are all these bars will be considered as historical, or real-time? 3.1 If these bars will be considered as real-time: What if processing or these bars cause sending orders? Will strategy send them or not? 3.2 If these bars will be considered as historical: will strategy fall in "waiting until flat" state (if StartBehavior.WaitUntilFlat?) |
Thank you.
Comment