Auto-Reconnect
Automatically restore dropped broker connections without manual intervention
Overview
Auto-Reconnect monitors your NinjaTrader broker connections and automatically attempts to restore them when they drop. This is essential for traders running automated strategies overnight or during extended sessions where connection interruptions are inevitable, and traders are not available to manage them. Internet hiccups, broker maintenance windows, or NinjaTrader's own internal connection cycling can all contribute to lost connections.
Auto-Reconnect only activates when a connection is actually lost. If you manually disconnect a connection through the dashboard or NinjaTrader, Auto-Reconnect does not interfere. It distinguishes between intentional disconnects and unexpected drops.
Auto-Reconnect is available in XT Add-On v1.12.0+. It is configured per connection through the XT Web Dashboard.
How It Works
When a connection drops unexpectedly, Auto-Reconnect waits for a configurable delay period before attempting to reconnect. This delay gives the broker's servers time to recover if the disconnect was caused by a broker-side issue. After the delay, it checks whether the connection has already come back on its own (NinjaTrader sometimes recovers internally), and only issues a reconnect command if the connection is still down.
If the reconnect attempt fails, the system retries up to a maximum of 5 attempts before giving up. Once all attempts are exhausted, it stops and logs an error, preventing an infinite reconnect loop that could cause problems with your broker.
The attempt counter resets automatically when you manually connect or re-enable Auto-Reconnect.

Configuration Options
Auto-Reconnect is configured per connection from the XT Web Dashboard:
Enable / Disable — turn Auto-Reconnect on or off for each individual connection.
Timeout Delay — how long to wait (in seconds) after a drop before attempting to reconnect. A short delay (5–10s) works for stable connections; a longer delay (30–60s) is better if your broker is prone to brief outages.
Attempt Limits
Auto-Reconnect has a built-in attempt limit to prevent runaway reconnect loops. When all attempts are exhausted, you'll see an Auto-Reconnect Exhausted message in the logs. At that point, you can either manually connect the account or re-enable Auto-Reconnect to reset the counter.
Interaction with Data Watchdog
Auto-Reconnect and the Data Watchdog work together. When the Data Watchdog detects stale market data and determines that a reconnect is needed, it delegates the actual reconnection to Auto-Reconnect (if enabled for that connection). This means the Data Watchdog benefits from Auto-Reconnect's delay, retry limits, and deduplication logic.
Last updated