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

PC crush - Strategy order object

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

    PC crush - Strategy order object

    Hello,

    Trying to figure out how to handle a specific issue. Let's say a strategy submits an order, and waits for close order command. Then PC crashes. Once I restart PC, all my order objects are null, and my exit command will be ignored since I am checking that order is not null to allow closing the position.

    How can I repopulate an order object with the order that was earlier opened and still active?

    Thanks,
    redduke
    Last edited by RedDuke; 04-14-2014, 09:30 AM.

    #2
    Hello RedDuke,

    Thank you for your post.

    Unfortunately, it is not possible to pick up the order from the previous instance of the strategy (the instance before the PC crash).

    Comment


      #3
      Is manually closing the position, and then reopening it via strategy is the only option?

      Looks like I would need to pay commission twice.

      Also, what about the weekend or if i disconnect and reconnect TWS , will the order object also become null?

      Thanks

      Comment


        #4
        Hello RedDuke,

        Thank you for your response.

        That is correct, the strategy will not be able to pick up the order after the strategy is disabled via a disconnect, shutting down or restarting NinjaTrader.

        Comment


          #5
          Did anyone figured out on how to do it maybe? A handling for a crash or disconnect is essential for auto trading. The markets are closed during the weekend, and there must be some way to be able to keep track of positions during this time.

          Would be great if someone can share their experiences.

          P.S. Patrick thanks for your input.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by set2win, 08-04-2021, 09:23 AM
          39 responses
          999 views
          0 likes
          Last Post WaleeTheRobot  
          Started by md4866, Today, 08:15 PM
          0 responses
          3 views
          0 likes
          Last Post md4866
          by md4866
           
          Started by mjbatts91, Yesterday, 04:48 PM
          2 responses
          23 views
          0 likes
          Last Post mjbatts91  
          Started by pibrew, Today, 06:10 PM
          1 response
          17 views
          0 likes
          Last Post NinjaTrader_Manfred  
          Started by actualfacts.2021, 07-25-2021, 03:11 PM
          8 responses
          1,185 views
          0 likes
          Last Post linkcou
          by linkcou
           
          Working...
          X