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

Reattaching to Orders After a Crash

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

    #16
    Hello reynoldsn,
    Thanks for the reply.

    Yes, when using the market replay the Market Replay account acts an account against your strategy position.
    Alex G.NinjaTrader Customer Service

    Comment


      #17
      Here's an example. Say the strategy has gone long at 48.0 with one contract. Price is now at 48.25 going up. The strategy is supposed to go long again at 48.5 but the computer freezes and needs to be restarted. Ninja is restarted and price is at 48.30. When I restart the strategy, how would it identify the fact that a position is open and had last gone long at 48.0 with one contract? In other words, I need the strategy to resume where it left off.

      Comment


        #18
        Originally posted by reynoldsn View Post
        Here's an example. Say the strategy has gone long at 48.0 with one contract. Price is now at 48.25 going up. The strategy is supposed to go long again at 48.5 but the computer freezes and needs to be restarted. Ninja is restarted and price is at 48.30. When I restart the strategy, how would it identify the fact that a position is open and had last gone long at 48.0 with one contract? In other words, I need the strategy to resume where it left off.
        The strategy can only calculate the Historical position, based on perfect behavior. If the position it calculates is different from the account position, you will have to take manual steps to sync the account to the strategy position.

        Comment


          #19
          This is a great topic, which I was about to raise an question myself as well.

          I read the help documentation at http://ninjatrader.com/support/helpG..._account_p.htm but I think none of these options quite fit what think should happen at NT restart.

          What I think ought happen is that 1) NT synchronizes the positions from the broker. And 2) NT cancels all of the open orders. Then my strategy can take it from there based on the positions and upcoming symbols.

          If I read the help file correct the options are presented there ranging from passive waiting to catastrophic reactions.
          Wait for flat, sync = false; as I read this, this would require manual closing of positions before starting the strategy
          Wait for flat, sync = true, as I read this, this would require manual closing of the positions after the strategy has been started
          Both of the immediately submit live working orders, as I read this is really an opening for a catastrophe as the orders would be based on old data.

          How do I get NT to sync the positions, cancel existing orders and then create new orders based on the existing positions and the new data flow? ( Waiting for flat would be the last thing I'd want to do. Instead the strategy pick up the positions and start working on them appropriately)

          Any ideas are appreciated on the topic!

          Cheers,
          Eelofi

          Comment


            #20
            Originally posted by reynoldsn View Post
            Here's an example. Say the strategy has gone long at 48.0 with one contract. Price is now at 48.25 going up. The strategy is supposed to go long again at 48.5 but the computer freezes and needs to be restarted. Ninja is restarted and price is at 48.30. When I restart the strategy, how would it identify the fact that a position is open and had last gone long at 48.0 with one contract? In other words, I need the strategy to resume where it left off.
            I'm still very new to NT, but wouldn't the NT startup sync with the broker provide you with info of the open position and the entry price? And then in your strategy you would have that if you already have one position which is profitable and the price is rising, then it's ok to take another. That's how I'm hoping my strategy will work...

            Cheers,
            Eelofi

            Comment


              #21
              Originally posted by eelofi View Post
              I'm still very new to NT, but wouldn't the NT startup sync with the broker provide you with info of the open position and the entry price? And then in your strategy you would have that if you already have one position which is profitable and the price is rising, then it's ok to take another. That's how I'm hoping my strategy will work...

              Cheers,
              Eelofi
              The reality is that it is your money. What that means is that whenever something unplanned happens, you should not rely on anything other than yourself to make sure that things that happen subsequently are kosher. So, regardless of what NT actually does, it is our responsibility to ensure that our account is in the state that we want it to be, and then to make sure that it really is in the state that we want it to be, regardless what the NT strategy says it is.

              It would be great if our machines could, every single time, make seamless recoveries from unexpected events, including events that are external to them, and of which they are unaware. The reality is still: "It's your money. You need to make sure that it is safe."

              Automated trading will never be set-it-and-forget-it. Insisting that it should be is just the dusty way to accounticide.

              Just my $0.02.

              Comment


                #22
                Hi,

                can this position sync be tested with NT and Continuum?

                I know from the past that with IB TWS this would be a piece of cake - just cut the TWS connection, do trades in TWS and reconnect NT and then you are able to check the position sync.

                But how could this be done with Continuum? How can the Continuum positions be accessed without using NT?

                Thx,
                Eelofi

                Comment


                  #23
                  Hello eelofi,
                  Thanks for the posting.

                  This can done by closing and disabling the strategy, placing an order to put you in a position and then restarting your strategy.

                  The sync account does not keep track of your position until the strategy is started and does not check if a position is placed using NinjaTrader or from another system(TWS).

                  Please let us know if we may be of further assistance for anything NinjaTrader.
                  Alex G.NinjaTrader Customer Service

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by LiamTwine, Today, 08:10 AM
                  0 responses
                  2 views
                  0 likes
                  Last Post LiamTwine  
                  Started by Balage0922, Today, 07:38 AM
                  0 responses
                  5 views
                  0 likes
                  Last Post Balage0922  
                  Started by JoMoon2024, Today, 06:56 AM
                  0 responses
                  6 views
                  0 likes
                  Last Post JoMoon2024  
                  Started by Haiasi, 04-25-2024, 06:53 PM
                  2 responses
                  19 views
                  0 likes
                  Last Post Massinisa  
                  Started by Creamers, Today, 05:32 AM
                  0 responses
                  6 views
                  0 likes
                  Last Post Creamers  
                  Working...
                  X