Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy disappears

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

    Strategy disappears

    I'm running one strategy.

    At 5:35 pm EST, the patsystems data feed was disconnected and the strategy disppeared from the strategy tab.

    Even if the data feed is disconnected (which can happen from time to time), I would expect the strategy to remain listed on the strategy tab.

    This is the last log message:

    Live Patsystems: Primary connection=disconnected, Price feed=disconnected

    Any ideas?

    #2
    Strategy will stop as connection disconnects. This is by design. You can not leave a strategy running e.g. as the broker (like Pats) run the overnight handling and temporarily shut down their servers,

    Comment


      #3
      Interesting...

      In a future revision of NinjaTrader, could we have an option to keep the Strategy running after the data feed is terminated?

      When I'm using a non-broker data feed like OpenTick, the data feed doesn't disconnect when the market closes. It stays connected. The strategy continues running (it doesn't stop automatically). OnBarUpdate() is not called because there's no incoming tick (as expected). The following morning, when the markets open and there are incoming ticks, OnBarUpdate() is called (as expected).

      When I'm using a broker data feed like Patsystems, the data feed terminates when the market closes. Therefore, the strategy stops and disappears (thus, inconsistent user experience).

      Personally, if you me... I would want the same behavior regardless if I'm using a non-broker data feed (e.g. OpenTick) and a broker data feed (e.g. Patsystems). For me, the behavior I would like to see is for the strategy is remain running after the market closes regardless if the data feed terminates (e.g. Patsystems) or the incoming ticks stops coming (e.g. OpenTick).

      It's not a big deal. I can make OpenTick the primary data feed to get the behavior I want.

      But then again, it would be nice to have a consistent user experience across all different data feeds.

      Thanks,
      Michael

      Comment


        #4
        Please take a look at the OnConnectionStatus() method. You can setup how you want NT to handle a disconnect from there.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          private ConnectionStatus dataFeedStatus;

          protected override void OnConnectionStatus(ConnectionStatus orderStatus, ConnectionStatus priceStatus)
          {
          dataFeedStatus = priceStatus;

          if (dataFeedStatus == ConnectionStatus.Disconnected)
          {
          // how do I keep the strategy on?
          }

          }

          Then what? How do I keep the strategy on?
          Last edited by mgbloomfield; 05-11-2008, 12:11 AM.

          Comment


            #6
            Not sure I follow. If you simply lost connection to your data feed you will get a ConnectionLost status. In this case your strategy is still "running". If you disconnect then you will get a Disconnected status and in that case you will "lose" the strategy. You can work some code for unsolicited connection losses and subsequent reconnects through the OnConnectionStatus, but if you get a Disconnected status there is nothing more you can do.
            Josh P.NinjaTrader Customer Service

            Comment


              #7
              You're following just fine.

              Now that I understand that the strategy is automatically removed from the strategy tab when the datafeed is disconnected, I'm advocating that the strategy shouldn't be removed automatically.

              Also, I do understand that a strategy *requires* a data feed and this is by design. However, this "by design" doesn't make it easy to facilitate an automatic trading strategy that is 24/7.

              If I take a one week vacation to Oahu, my strategy is not going to run 5 days straight.

              For example, if the data feed is disconnected, and the strategy is automatically removed from the strategy tab, what happens the next morning when the markets open? There's no strategy running. In other words, every morning, I would have to wait for the markets to open and manually add the strategy back onto the strategy tab (or add to the chart).

              Perhaps a strategy should have two status types.
              1) Start/Stop: Start | Stop (same as today).
              2) Connection Status: Connected | Standby

              Where "Connected" means that data feed is connected, and "Standby" means that the strategy is waiting for the data feed to be connected.

              Bottom line: Perhaps NinjaTrader can think about how to keep the strategy running 24/7 during all data feed events such as connected, connecting, lost and disconnected.

              Comment


                #8
                Hi mgbloomfield,

                Are you saying that someone inbetween will disconnect the feed for you manually? If the feed gets "disconnected" due to something like dropped internet or whatever you will get the state ConnectionLost and not disconnected. In this case your strategy will continue to be active. If you are away from the computer and nobody touches it you should not be getting a Disconnected state. ConnectionLost and Disconnected are not the same.
                Josh P.NinjaTrader Customer Service

                Comment


                  #9
                  Are you saying that someone inbetween will disconnect the feed for you manually?
                  No.

                  If the feed gets "disconnected" due to something like dropped internet or whatever you will get the state ConnectionLost and not disconnected.
                  Correct.

                  In this case your strategy will continue to be active.
                  Correct.

                  If you are away from the computer and nobody touches it you should not be getting a Disconnected state.
                  Correct. The data feed itself, after the market closes, is doing the disconnection.

                  ConnectionLost and Disconnected are not the same.
                  Correct.

                  Comment


                    #10
                    To clarify:
                    - don't be connected while Pats reset their servers
                    - you may even get Disconnected
                    - NT will not be able to reliably reconnect
                    - "data feed only" providers like OpenTick run 24/7 -> no daily reset and no disconnect issues

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by usazencort, Today, 01:16 AM
                    0 responses
                    1 view
                    0 likes
                    Last Post usazencort  
                    Started by kaywai, 09-01-2023, 08:44 PM
                    5 responses
                    602 views
                    0 likes
                    Last Post NinjaTrader_Jason  
                    Started by xiinteractive, 04-09-2024, 08:08 AM
                    6 responses
                    22 views
                    0 likes
                    Last Post xiinteractive  
                    Started by Pattontje, Yesterday, 02:10 PM
                    2 responses
                    20 views
                    0 likes
                    Last Post Pattontje  
                    Started by flybuzz, 04-21-2024, 04:07 PM
                    17 responses
                    230 views
                    0 likes
                    Last Post TradingLoss  
                    Working...
                    X