• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to keep strategies running during data feed disconnect

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

    How to keep strategies running during data feed disconnect

    Hello,

    Often on Friday afternoons, Continuum will disconnect the data feed. When the disconnect occurs, my strategies will get disabled.

    Is there a way to keep the strategies running until I reconnect to Continuum the following day or once the updates are complete? I read the help section "On connection loss" but can't quite figure out what settings to choose (https://ninjatrader.com/support/help...riptProperties).

    Should I just choose "Keep running" and set the "Disconnect delay seconds" to a high enough value to last a couple days? Will that work?

    What should "Number of restart attempts" and "Restarts within x minutes" be set to to make this work?

    Thanks,
    Fiddich

    #2
    Hello fiddich,

    Thank you for your post.

    This would need to be tested, but you should be able to put a large number in the Disconnect delay seconds field to allow enough time for your network to re-establish the connection.

    You should pick either "Keep running" if you don't want the strategy to run through the historical data after it connects again, or set it to "Recalculate" to calculate the strategies position again.

    After the "Disconnect delay seconds" clock has run out, NinjaTrader will begin to try and restart the strategy. "Number of restart attempts" Should be set to 10 or 20 just to make sure it has enough chances to restart and "Restarts within x minutes" should be something like 10 minutes, just for good measure.

    Please let me know if you have any questions.
    Chris L.NinjaTrader Customer Service

    Comment


      #3
      Hi Chris,

      Will this work even though Continuum kicks me off the connection and I have to completely reconnect again by going to Connections and clicking Ninjatrader Continuum?

      I was trying to test with in SIM by just disconnecting while I had an active strategy on but the moment I did that, the strategy disabled itself and would not re-enable when I reconnected via the Connections menu.

      Thanks,
      Fiddich

      Comment


        #4
        Hello fiddich,

        Thanks for your reply.

        Continuum servers have maintenance every weekend, so this disconnection is not avoidable and NT will not try to re-connect. Unfortunately, you would need to manually connect to your account again and start the strategy.

        Please let me know if I can assist any further.
        Chris L.NinjaTrader Customer Service

        Comment


          #5
          Understood Chris.

          So then last question. Is there any way to resume that position, including putting on appropriate stop orders, upon reconnecting and re-enabling the strategy? I looked into Adopt Account Position but it seems to have way too many restrictions. When using it, you can't have any orders on (so it won't adopt stop orders), and you can't have more than one strategy on an instrument either. So then you can only use that method to adopt 1 single strategy on an instrument and not have stops?

          Would appreciate your insight on this as I've been doing hours of research to try and solve this problem of losing strategies every weekend but there doesn't seem to be a single solution.

          Thanks.

          Comment


            #6
            Never mind Chris, think I may have found what I'm looking for.

            Comment


              #7
              Hello fiddich,

              Thanks for your follow up.

              We generally recommend unifying two strategies that trade the same instrument. The solution here is Immediately Submit, but your strategies can not be separated because the strategy that you enable first will cancel the orders from the other strategy. So if you unify the two strategies into one, you may use the Immediately Submit startup procedure.

              Please let me know if I can assist any further.
              Chris L.NinjaTrader Customer Service

              Comment


                #8
                Thanks Chris.

                One quick question about Immediately Submit. What can one do to deal with slippage mismatches in a trade, meaning what if the back test run on the strategy upon enable believes the trade entered at a different price historically than it actually did?

                So if I have a buy stop market order on CL at 60.00, let's say, and it fills at 60.04 due to slippage but upon enabling the strategy it thinks the fill should have been at 60.02 per the historical order backfill logic. Since those trades no longer match exactly, what could I do to have this method still resume the open position?

                Comment


                  #9
                  Hello fiddich,

                  Thanks for your reply.

                  When a strategy syncs a position, it disregards the current market price and submits an order solely to match the account position to the strategy position. If there are active resting orders that match with the orders the strategy would have taken, those orders will continue to be managed by strategy.

                  Chris L.NinjaTrader Customer Service

                  Comment


                    #10
                    I understand that - what I was asking has to do with the matching of orders the strategy would have taken. What if the strategy thinks the order historically filled at the defined stop price exactly but the active position you're trying to resume got slipped (e.g., strategy fill = 60.05, actual fill = 60.07).

                    If the historical and actual strategy trades don't match then as a result of the slippage, it won't resume that position, correct? Since that would happen often (slippage and mismatches in strategy historical fill prices), how does one resume positions in these cases?

                    Comment


                      #11
                      Hello fiddich,

                      Thanks for your reply.

                      The strategy will only consider the initial conditions of the order to consider it a match, not the execution filled price. If an order does fill with some slippage in real time and your strategy starts back up after that, the order/position will still be considered a match. The help guide claims the following on orders that are considered a "match"

                      Code:
                       A previously generated order is considered to match an active strategy order when the order action, order type, quantity, limit price, and stop price are exactly identical.
                      The startup procedure for canceling orders that don't match is more for resting orders that are managed by your strategy, not positions previously generated by the strategy.

                      Please let me know if I can assist any further.
                      Chris L.NinjaTrader Customer Service

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by alfonso, Today, 10:21 AM
                      0 responses
                      1 view
                      0 likes
                      Last Post alfonso
                      by alfonso
                       
                      Started by saeed, Today, 10:20 AM
                      2 responses
                      4 views
                      0 likes
                      Last Post NinjaTrader_RyanS  
                      Started by ntbone, Yesterday, 05:21 PM
                      1 response
                      5 views
                      0 likes
                      Last Post NinjaTrader_ChelseaB  
                      Started by ntbone, Yesterday, 04:05 PM
                      1 response
                      5 views
                      0 likes
                      Last Post NinjaTrader_Jesse  
                      Started by tonynt, Today, 09:35 AM
                      1 response
                      11 views
                      0 likes
                      Last Post NinjaTrader_ChrisL  
                      Working...
                      X