Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Populating strategy variables after restarting NT7

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

    Populating strategy variables after restarting NT7

    I have coded up a strategy using the stop placement techniques detailed in this thread ( http://www.ninjatrader.com/support/f...ead.php?t=7499 ).

    Throughout the code I am referring to the IOrder variables to manage the orders. Now I am concerned that these variables won't be repopulated if NT7 is shut down and restarted for whatever reason and hence my strategy won't work. Is this true?

    I can't seem to find any examples of people who have tackled this in the forum.

    Regards

    #2
    zeeee, I am not exactly sure what you are asking, although if your strategy works fine as is, it will work fine after restarting NinjaTrader. You are correct though that unless you've wrote specific code to persist the variables, the variables will be reset upon a restart, but that shouldn't make your strategy non-functional.
    AustinNinjaTrader Customer Service

    Comment


      #3
      Well if I am referring to the IOrder in something like this:
      if(NewCalculatedStop > stopOrder.StopPrice) MoveStop();

      Then stopOrder would be null and the strategy wouldn't function correctly (by my definition!)

      Do you suggest that I loop through the OrderCollection and pick out the order upon startup?

      Comment


        #4
        zeeee, I will have someone respond to you tomorrow.
        AustinNinjaTrader Customer Service

        Comment


          #5
          zeeee, when you restart the strategy will recalculate the on it's historical part before continuing to run in realtime, this will include IOrder objects, however the state of those which you for example encountered on the last realtime run is not persisted.

          Comment


            #6
            Great, thanks for your help Austin and Bertrand!

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by Geovanny Suaza, 02-11-2026, 06:32 PM
            0 responses
            633 views
            0 likes
            Last Post Geovanny Suaza  
            Started by Geovanny Suaza, 02-11-2026, 05:51 PM
            0 responses
            364 views
            1 like
            Last Post Geovanny Suaza  
            Started by Mindset, 02-09-2026, 11:44 AM
            0 responses
            105 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by Geovanny Suaza, 02-02-2026, 12:30 PM
            0 responses
            567 views
            1 like
            Last Post Geovanny Suaza  
            Started by RFrosty, 01-28-2026, 06:49 PM
            0 responses
            568 views
            1 like
            Last Post RFrosty
            by RFrosty
             
            Working...
            X