https://ninjatrader.com/support/foru...ad.php?t=86233
I started with the default settings in Options/Strategies/On Connection Loss
My strategy was disabled by NT due to IB closing price connection for longer than 10 seconds.
Attempted solutions:
I go to Options/Strategies/On Connection Loss and change to Handling = Keep Running.
However when I re-enable the strategy it does not read the new options settings. NT Output still says "Enabling NinjaScript strategy ... ConnectionLossHandling=Recalculate".
I remove the strategy and re-add it. Enabling still says "ConnectionLossHandling=Recalculate".
I stop and start NT. Enabling strategy still says "ConnectionLossHandling=Recalculate".
However if I now remove and add the strategy and enable I finally get ConnectionLossHandling=KeepRunning
But if I re-enable a strategy that was already added under the default options it still says
"ConnectionLossHandling=Recalculate" .
And weirdly if I now re-enable my strategy that was added after options change and NT restart, it flips back to "ConnectionLossHandling=Recalculate".
I add the following line to SetDefaults in my strategy:
ConnectionLossHandling = ConnectionLossHandling.KeepRunning;
and re-enable the strategy but it still stubbornly says "ConnectionLossHandling=Recalculate"!
There seems to be some code in B12 that tries to set ConnectionLossHandling.KeepRunning back to ConnectionLossHandling.Recalculate regardless of either the Options or even putting this line in code:
ConnectionLossHandling = ConnectionLossHandling.KeepRunning
Comment