I've been using IB API and NT8 for automated intraday trading since April, and as we all know there are a few issues (which I will adress one by one in later posts)
One issue is the daily restart of IB servers which ist between 05:45 and 06:45 here in europe. I've been struggling to find a way to find a workaround that really works.
Usually, the strategies are terminating it selfs due to data feed outage between that time. So, what have I've done to work this out.
1) I've implemented send email in case of data feed loss and also on strategy termination. Which helps to restart everything by hand.
2) I messed around with the runtime setting:
// Important automated strategy runtime settings if connection is lost
RestartsWithinMinutes = 60;
NumberRestartAttempts = 60;
DisconnectDelaySeconds = 600;
ConnectionLossHandling = ConnectionLossHandling.Recalculate;
is that runtime setup right or could it be improved for the restart case?
Goal is that the strategy does not terminate itself during IB restart hour
3) I'e created a new trading hours template which excludes that hour. Therefore I've created 2 session per day. the 1st one is from (UTC-6) 17:00 until 22:45 EOD checkbox unchecked and 2nd one from 23:45 until 16 with EOD checkbox checked (that should cover the CME index futures like ES-mini).
But in the backtest I can see that the strategy closes the position at the end of the 1st session and also at the end of the 2nd. But I would like to remain the a position open during that hour and only close at the real end of day. Any sugesstion here?
I hope somebody can lead me in the right direction how to overcome that frustrating situation.
Cheers

Comment