Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Handling data-application quit/restart events the same as 'data-interruption'

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

    Handling data-application quit/restart events the same as 'data-interruption'

    There seems to be a vast difference betwee how NT handles a interruption-of-data-availability of an established data app/connection, and the more specific case of a data/brokerages app itself being closed/restarted/quit. Namely, it appears that there are optional setting to have a strategy be able to continue/ignore a 'simple' interruption of data (e.g., the "ConnectionLossHandling" settings), but there does not appear to be a similar way to avoid a strategy being turned off when the connection's app itself is closed/restarted/quit.

    If true, then at the moment the lack of such an option is a substantial inconvenience/obstacle in keeping my NT running smoothly, since even though TWS has finally implemented an auto restart feature (see https://www.interactivebrokers.com/e...start_info.htm ), NT's non-optional response of turning off the strategy completely when TWS restarts still leaves me with no strategy running and the need to manually intercede to right things again.

    I'm posting this to both confirm that my understanding is true, as well as solicit and ways to workaround this issue so that NT could continue/ignore the closing/restart/quit of TWS as it would if the data from TWS was 'simply' interrupted. (or I guess to programmatically re-enable a strategy)

    If there are no current workarounds/solutions to these issues, then please consider this a feature request. Thank you.

    #2
    Hello Calebg,

    This would be correct, there is no way to enable a strategy unless you are connected to a data provider, this is true across the board with all providers/strategies. By closing the connection or quitting the platform you will stop the strategy.

    For IB specifically, they do additionally have server maintenance window which is outside of the control of NinjaTrader so that would also be a case which you would see the strategy become disabled when the provider hangs up. For other providers which do not have the same maintenance, the platform would work as you are expecting and allow the script to remain running unless the platform is exited or you manually disconnect.

    I have put in a feature request, you can track this feature request using the id: SFT-2395


    I look forward to being of further assistance.






    Last edited by NinjaTrader_Jesse; 05-09-2019, 02:12 PM. Reason: add feature request id
    JesseNinjaTrader Customer Service

    Comment


      #3
      I will put in a feature request to allow for a strategy to remain enabled when manually disconnected
      Thanks, this would make a lot of sense I believe, since effectively there is no real difference between a data disruption cause by some upstream anomaly (the kind that "ConnectionLossHandling" settings allow one to address) and a data disruption by an app being closed. imho, they're both just 'data disruptions' either way. It seems like NT being agnostic about *why* a data disruption happens is more appropriate than it being opinionated about it.

      Also, leaving the above theoretical argument aside - in case for whatever reason the current behavior is still desired by NT developers - keep everything the way it is, but simply provide a mechanism for "auto start strategy at x-time of the day", whereby a strategy would be auto-started by NT only if all conditions for it being enabled are true. For instance:

      1. A data app (TWS) restarts itself automatically at 6:00pm every day, thereby deactivating all NT strategies according to current NT behaviors.

      2. NT initiates an auto-strategy-restart at 6:02pm every day, whereby the data app (TWS) is active again after successfully restarting itself as required by the provider, and which lets NT recover from a data providers imposed constraints without having to change any of its current connection requirements/behaviors.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by cre8able, 02-11-2023, 05:43 PM
      3 responses
      236 views
      0 likes
      Last Post rhubear
      by rhubear
       
      Started by frslvr, 04-11-2024, 07:26 AM
      8 responses
      114 views
      1 like
      Last Post NinjaTrader_BrandonH  
      Started by stafe, 04-15-2024, 08:34 PM
      10 responses
      47 views
      0 likes
      Last Post stafe
      by stafe
       
      Started by rocketman7, Today, 09:41 AM
      3 responses
      11 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Started by traderqz, Today, 09:44 AM
      2 responses
      10 views
      0 likes
      Last Post NinjaTrader_Gaby  
      Working...
      X