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

when are old orders got removed?

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

    when are old orders got removed?

    What is the rule that old orders get removed and no longer shown in Account.Orders? Are the rules different in the cases of simulated accounts, simulated connections, real account, real connection, etc.?

    #2
    Hello Clearpicks,

    Thank you for your note.

    Sim101 trades while connected to a live connection would stay in the database and can be searched for in Trade Performance via Control Center>New Trade Performance. Trades executed with your broker would also be saved here as well.

    No trades are saved when connected to the simulated data feed.

    Please let us know if you need further assistance.
    Alan P.NinjaTrader Customer Service

    Comment


      #3
      Hi Alan,

      Thanks for response.

      I still don't fully understand the rules deciding in what situation an order would appear in Account.Orders. If the account is real (not sim101) and data connection is real, what are the oldest orders would appear in Account.Orders? are the rules different for different brokers? In the case of realtime real data connection but sim101, what are the rules then? In the case of simulated datafeed and sim101 account, what are the rules?

      Thanks,
      - Clearpicks

      Comment


        #4
        Hello clearpicks,

        Trades made on the platform, either Sim101 or a real account, regardless of broker or data provider, are going to be stored locally on the database and will remain unless cleared by the user.

        Above does not vary with different brokers.

        No trades will be stored locally if connected to the simulated data feed.

        Please let us know if you need further assistance.
        Alan P.NinjaTrader Customer Service

        Comment


          #5
          Alan,

          In such case, can I assume the number of orders shown in Account.Orders would increase indefinitely as long as new orders are generated each day? Is there a way to purge old orders which have been in final state for quite a long time (e.g more than 10 days)? Or is there a specific API to delete certain orders from the database?

          -- Clearpicks

          Comment


            #6
            Hello Clearpicks,

            Yes, account orders would grow over time as additional trades were made.

            There would be no supported way to delete trades in the database without clearing all trade history.

            Please let us know if you need further assistance.
            Alan P.NinjaTrader Customer Service

            Comment


              #7
              Alan,

              It seems Tools -> Database Management -> Reset DB -> Reset Historical orders and Historical executions is the only way to delete old orders/executions. In case of connecting to a real trading account (e.g. InteractiveBrokers) , does NT try to get synchronized with IB TWS by retrieving historical orders? I assume NT would at least retrieve active orders and positions.

              Thanks,
              Clearpicks

              Comment


                #8
                Hello clearpicks,

                NinjaTrader does not pull historical IB trades into the database.

                Please let us know if you need further assistance.
                Alan P.NinjaTrader Customer Service

                Comment


                  #9
                  You can manually delete historical executions one at a time from the database.

                  Trade Performance > Executions > Right click execution > Remove Execution

                  To see it removed, you will have to generate the performance results again. To see it on the chart, you will have to Reload Historical Data on the chart.

                  However, this will NOT adjust the simulated account balance. It will only affect Trade Performance results.

                  For a live account, I don't understand why you'd want to remove trades.
                  Last edited by liquid150; 12-21-2017, 08:52 AM.

                  Comment


                    #10
                    There are many orders shown in the "Orders" tab in control center as well as in strategy.Orders. I would like to view the most recent or only open orders..

                    Comment


                      #11
                      Hello Clearpicks,

                      You could right click in the orders tab and select a filter, for example active orders. Please see the following section of our helpguide,


                      Please let us know if you need further assistance.
                      Attached Files
                      Alan P.NinjaTrader Customer Service

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by GLFX005, Today, 03:23 AM
                      0 responses
                      1 view
                      0 likes
                      Last Post GLFX005
                      by GLFX005
                       
                      Started by XXtrader, Yesterday, 11:30 PM
                      2 responses
                      11 views
                      0 likes
                      Last Post XXtrader  
                      Started by Waxavi, Today, 02:10 AM
                      0 responses
                      6 views
                      0 likes
                      Last Post Waxavi
                      by Waxavi
                       
                      Started by TradeForge, Today, 02:09 AM
                      0 responses
                      14 views
                      0 likes
                      Last Post TradeForge  
                      Started by Waxavi, Today, 02:00 AM
                      0 responses
                      3 views
                      0 likes
                      Last Post Waxavi
                      by Waxavi
                       
                      Working...
                      X