1. When a strategy is starting, the work logic order of main methods is:
Initialize() OnStartUp() OnConnectionStatus() OnBarUpdate() then OnPositionUpdate( ) and others ?
2. When a running strategy is reconnecting after a connection loss, is it :
OnConnectionStatus() OnPositionUpdate( ) OnBarUpdate() then others ?
3. If I select in the Strategies-tab the option: KeepRunning on ConnectionLoss, once the connection is recovered, I understand that the Strategy won't recalculate anything but only will process the new tick coming, is it not? So I assume that any previous Strategy Position will continue to be the same. But if I select in the Strategies-tab the option: Recalculate on ConnectionLoss, it will mean that once the connection is back on, then the Strategy will use the historical data to calculate the right Strategy Position, right? So, if I use within my code: if ( historical ) { returns;} then any recalculation would always be a FLAT Strategy Position, right?
4. I select in the Strategies-tab the option: Recalculate on ConnectionLoss, once the connection is back on, what method should go first: OnBarUpdate() cause it's recalculating OR OnConnectionStatus() because of the recovered connection? This is key to me in order to create a sync method.
5. If I set to sync at initial startup Account Positions with Immediately submit live working historical orders, but I use in the code:
if ( historical ) { returns;}
then my Strategy Position will be flat when the first live tick data comes, but what would it happen if my broker's account has actually an open position, will NT submit a reconciliatory order to sync positions with that first tick of live data ? or since there's not any longer historical data, not reconciliatory orders will be submitted any more?
6. Is there any way that I was able to submit direct orders to my broker's account from any method other than OnBarUpdate(), such as protected override void OnConnectionStatus( ) in order to affect only my broker's account leaving out of effect the Strategy position?
7. Is there any unsupported way to change the internal variables values for StrategyPosition OR Strategy Position.Quantity ?
Thanks
Comment