Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Stupid Question - can a strategy recover when restarted after a crash?

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

    Stupid Question - can a strategy recover when restarted after a crash?

    Hi,

    If a strategy is running live and has positions open, if the NT platform crashes, if i simply restart the strategies will it begin to actively manage them again?

    Today, the NT platform crashed and i manually closed all the positions with my broker. I then restarted the platform and the strategies, it seemed to recognize that the positions weren't open.

    Basically, Ive encountered several situations where I have to restart the platform while the strategies have positions open. Rather than closing out all the positions, I would rather just restart the strategy if it will pick up where it left off and manage the open positions correctly.

    Thanks

    #2
    bridenour,

    No, NinjaTrader does not know prior positions. What it knows upon start is a virtual strategy position which may or may not be the same as your account position. This strategy position is calculated based off of the historical data on the chart and not what was generated in real-time. You need to ensure they are in sync with each other when starting your strategy.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      OK, understood.


      But, if i restart the strategy, and the virtual positions is generates are the same as my live positions, will the strategy then manage those positions? Meaning, will it properly close out those "virtual positions" with my broker when the stops are hit?

      thanks

      Comment


        #4
        If you have "Immediately submit live working orders" selected in Tools -> Options -> Strategies -> NinjaScript then it should.
        Josh P.NinjaTrader Customer Service

        Comment


          #5
          Originally posted by bridenour View Post
          Hi,
          I then restarted the platform and the strategies, it seemed to recognize that the positions weren't open.
          Careful, it only seems like it recognized that your account positions weren't open. In reality, the strategy positions starts at zero regardless of your account positions.

          If your account position is +1, then you add/start a strategy on the chart, the strategy position will be 0 (zero).

          In other words, NinjaTrader (as of version 6.5) does not get real-time account positions from the clearing broker.

          NinjaTrader can correct me of I'm wrong.

          Comment


            #6
            That is correct. When you start up a strategy, your NinjaScript strategy does NOT know your account position.
            Josh P.NinjaTrader Customer Service

            Comment


              #7
              So, just to be 100% clear, if I have live strategy positions open and ninja trader crashes, there is no way to restart the strategy such that it will "pick up where it left off" and manage the previously open positions correctly? In the case of an NT crash, I will always have to manage the positions manually with the broker?

              Sorry for the repeated questions, but I want to make sure I am absolutely clear...the crashes have already cost me quite a lot of money.

              Thanks

              Comment


                #8
                bridenour,

                NT7 will provide more options for syncing. As of currently, you need to be 100% sure that you have manually synced your strategy position to your account position.
                Josh P.NinjaTrader Customer Service

                Comment


                  #9
                  JOsh,

                  Thanks for your reply. I know that I need to make sure they are in sync manually.

                  I am confused as to the meaning of "Immediately submit live historical working order". Does that mean they are "considered live" by the strategy, such that the strategy will attempt to manage them (if you've manually ensured the accounts are in sync)? Or, does it mean that the strategy will actually submit live orders to my broker to open the positions calculated on startup?

                  The description makes it sound like it will actually open new positions on startup, which would, of course, be a problem if the positions were already open due to a crash.

                  Thanks for the clarificatoin

                  Comment


                    #10
                    bridenour,

                    It means if when you started the strategy and you had working profit/stop orders in place, those would be submitted live right away to your brokerage. All other orders to follow will be live too. If you have "Wait until flat" it will wait until your strategy reaches a virtual flat state before placing any live orders.
                    Josh P.NinjaTrader Customer Service

                    Comment


                      #11
                      Josh,

                      As always, thanks for the great support. I believe I can use this method to recover from crashes then, as long as I validate that the calculated positions are in sync on start up (i recognize that sometimes they will be, and sometimes they won't).

                      This will be a big help, as otherwise I am forced to flatten my account after a crash (the logic is too complex to manage manually).

                      Thanks,
                      Brandon

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by goldentrumpusa, Today, 01:43 AM
                      0 responses
                      1 view
                      0 likes
                      Last Post goldentrumpusa  
                      Started by goldentrumpusa, Today, 01:42 AM
                      0 responses
                      1 view
                      0 likes
                      Last Post goldentrumpusa  
                      Started by Cardn, Today, 01:21 AM
                      0 responses
                      4 views
                      0 likes
                      Last Post Cardn
                      by Cardn
                       
                      Started by RitchyJames, 08-12-2022, 10:42 PM
                      1 response
                      18 views
                      0 likes
                      Last Post NinjaTrader_Jason  
                      Started by appasri, 08-12-2022, 09:17 PM
                      1 response
                      15 views
                      0 likes
                      Last Post NinjaTrader_Jason  
                      Working...
                      X