Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

On connection Loss...

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    On connection Loss...

    Hi,

    I am using NT with IB TWS (their paper trading account).
    Every morning at around 5am London time (and a different time on fridays)
    there shut/restart their servers as part of their daily maintance.

    This disables all my "enabled" strategies.
    After finally understanding the root cause, i then configured to "On connecion Loss" settings to remedy this situation, with the following settings:

    On connection loss: Keep Running
    Disconnect delay seconds 10
    Number of restarts attempts: 60
    Restart within X minutes: 60.

    restarted all applications etc...this morning when i saw 2 connections losses

    first disconnect at 4.30 am > the strategy is disabled and succesfully re-enabled:

    Time Category Message
    07/06/2016 04:32:03 Connection My Interactive Brokers: Primary connection=Connected, Price feed=Connection lost

    Time Category Message
    07/06/2016 04:32:14 Default Strategy 'VevoMain/75908936' lost price connection for more than 10 seconds and will be restarted.

    Time Category Message
    07/06/2016 04:32:14 Default Disabling NinjaScript strategy 'VevoMain/75908936'

    Time Category Message
    07/06/2016 04:32:19 Connection My Interactive Brokers: Primary connection=Connected, Price feed=Connected

    Time Category Message
    07/06/2016 04:36:30 Default Enabling NinjaScript strategy 'VevoMain/75908936' : On starting a real-time strategy - StartBehavior=WaitUntilFlat EntryHandling=All entries EntriesPerDirection=1 StopTargetHandling=Per entry execution ErrorHandling=Stop strategy, cancel orders, close positions ExitOnSessionClose=False SetOrderQuantityBy=Strategy ConnectionLossHandling=Recalculate DisconnectDelaySeconds=10 CancelEntriesOnStrategyDisable=False CancelExitsOnStrategyDisable=False Calculate=On bar close IsUnmanaged=False MaxRestarts=4 in 5 minutes


    second disconnect at 5 am ish.... strategies disabled, connection is later re-instated but the strategies were never renabled in the same as above - why ?

    Time Category Message
    07/06/2016 05:01:31 Connection My Interactive Brokers: Primary connection=Connected, Price feed=Connection lost

    Time Category Message
    07/06/2016 05:01:31 Default Strategy 'VevoMain/75908931' lost price connection more than 4 times in the past 5 minutes and will be disabled.

    Time Category Message
    07/06/2016 05:01:31 Default Disabling NinjaScript strategy 'VevoMain/75908931'


    Thoughts and Observations

    strategies are re-enabled if he error is: "lost price connection for more than 10 seconds"

    strategies are not re-enabled if the error is: "lost price connection more than 4 times in the past 5 minutes"

    I suspect the 10 seconds comes from "disconnect delay seconds", but where does the 4 times in 5 minutes minutes come from ?


    aavevo

    #2
    Hello aavevo,

    Thank you for writing in.

    Have you specified MaxRestartAttempts and MaxRestartMinutes in the Initialize() method of your strategy? If this is the case, these settings will take presidence over the settings specified in the Options -> Strategies tab -> NinjaScript tab window of NinjaTrader.
    Zachary G.NinjaTrader Customer Service

    Comment


      #3
      Thanks Zachary, disabling and removing the strategy and then re-adding it did the trick.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by LawrenHom, Today, 10:45 PM
      0 responses
      3 views
      0 likes
      Last Post LawrenHom  
      Started by love2code2trade, Yesterday, 01:45 PM
      4 responses
      28 views
      0 likes
      Last Post love2code2trade  
      Started by funk10101, Today, 09:43 PM
      0 responses
      7 views
      0 likes
      Last Post funk10101  
      Started by pkefal, 04-11-2024, 07:39 AM
      11 responses
      37 views
      0 likes
      Last Post jeronymite  
      Started by bill2023, Yesterday, 08:51 AM
      8 responses
      44 views
      0 likes
      Last Post bill2023  
      Working...
      X