Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

PC reloaded - how to restore the work of my strategies?

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

    PC reloaded - how to restore the work of my strategies?

    I have a strategy that is working on market without takeprofit or stoploss. The startegy has entered a position and after that my PC has reloaded. How can I continue my work with open positions after the strategies have reloaded.

    #2
    Hello knell009,

    Thank you for your post and welcome to the NinjaTrader support forum!

    Strategies will not be able to pick up where they left off after a restart of the NinjaTrader platform. However, you can use the settings under Tools > Options > Strategies > NinjaScript to set how the strategy react when enabled and disabled. Setting 'On starting a real-time strategy' to 'Immediately submit live working historical orders' will submit orders for historical positions that would be in place if the strategy had continued to run. You can also enable 'Sync Account Position' to true when enabling the strategy.

    For information on syncing your account and strategy position please visit the following link: http://www.ninjatrader.com/support/h..._positions.htm

    Please let me know if you have any questions.

    Comment


      #3
      Is it possible to catch up a position by a strategy?

      Comment


        #4
        Hello knell009,

        Thank you for your response.

        It is possible to access the account positions via unsupported code. You would then need to base your calculations off of the account position.

        Below is a n example of accessing the account position:
        Code:
         foreach (Account acct in Cbi.Globals.Accounts)
        {
        if (acct.Positions != null)
        {
        PositionCollection positions = acct.Positions;
        foreach (Position pos in positions)
        {
        Print(pos.Account.Name + " " + pos.Instrument + " " + pos.MarketPosition + " " + pos.Quantity + " " + pos.AvgPrice);
        }
        }
        Please let me know if I may be of further assistance.

        Comment


          #5
          Thank you for help!
          How can I get list of enters with their names and AvgFillPrice?

          Comment


            #6
            Hello knell009,

            Thank you for your post.

            You will need to track your own IOrder objects for the orders in your strategy and then call these IOrder objects and their AvgFillPrice.

            For information on IOrder objects please visit the following link: http://www.ninjatrader.com/support/h...nt7/iorder.htm

            Please let me know if I may be of further assistance.

            Comment


              #7
              How can I get list of enters with their names and AvgFillPrice in case PC was reloaded?

              Comment


                #8
                Hello knell009,

                Thank you for your response.

                If the strategy was disabled during the disconnect or you have restarted NinjaTrader or your PC there will be no method to retrieve the previous orders or their average fill price.

                Please let me know if I may be of further assistance.

                Comment


                  #9
                  If I turn off NT from Windows Processes, then turn it on and connect to broker account I can see orders at Tab Orders. How can I get this list?

                  Comment


                    #10
                    Hello knell009,

                    There is no supported method to pull these values into your NinjaScript code.

                    Comment


                      #11
                      Hello.
                      I'm interested in this case too. Is there an unsupported method to get list of orders from Orders Tab?

                      Comment


                        #12
                        Originally posted by n0_namer View Post
                        Hello.
                        I'm interested in this case too. Is there an unsupported method to get list of orders from Orders Tab?
                        I would also like to know more about this

                        Comment

                        Latest Posts

                        Collapse

                        Topics Statistics Last Post
                        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                        0 responses
                        666 views
                        0 likes
                        Last Post Geovanny Suaza  
                        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                        0 responses
                        377 views
                        1 like
                        Last Post Geovanny Suaza  
                        Started by Mindset, 02-09-2026, 11:44 AM
                        0 responses
                        110 views
                        0 likes
                        Last Post Mindset
                        by Mindset
                         
                        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                        0 responses
                        575 views
                        1 like
                        Last Post Geovanny Suaza  
                        Started by RFrosty, 01-28-2026, 06:49 PM
                        0 responses
                        580 views
                        1 like
                        Last Post RFrosty
                        by RFrosty
                         
                        Working...
                        X