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

Retrieve list of historical orders

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

    Retrieve list of historical orders

    Hello,

    how can I retrieve a list of historical orders with advanced order handling?

    Best regards
    Gerik

    #2
    Hello Gerik,

    Thank you for your note.

    To clarify, are you just looking for a list of historical orders from the current run of the strategy? Accessing historical orders made by the strategy from previous runs would require accessing the SQL database which would be unsupported.

    However, if you're just needing historical trades from the current run of the strategy, you can access those using SystemPerformance:



    SystemPerformance will show Trades which will contain Executions and Orders associated with the executions. Here are several examples from our help guide on working with SystemPerformance:





    Please let us know if we may be of further assistance to you.


    Kate W.NinjaTrader Customer Service

    Comment


      #3
      Hello Kate,

      thank you for your answer. I have tried SystemPerformance.AllTrades.Count, but although I have 3 Long positions in my Sim101 account, I receive 0 as a result. However, I have meanwhile recompiled the Strategy, so the trades are not from the current run of the strategy.

      Is there any chance to retrieve the trades without having access to the SQL database?

      Gerik

      Comment


        #4
        Hello Gerik,

        Thank you for your reply.

        SystemPerformance.AllTrades.Count will only count trades from the current strategy run. If you have trades on the account not placed during this run of the strategy they will not be counted. Unfortunately, as previously noted, accessing historical orders made by the strategy from previous runs would require accessing the SQL database which would be unsupported.

        Please let us know if we may be of further assistance to you.
        Kate W.NinjaTrader Customer Service

        Comment


          #5
          Hello Kate,

          thank you for your answer.

          Please confirm that it is not possible with NinjaTrader to see the previous transactions of filled Buy and Sell orders of a specific instrument/symbol.

          Gerik

          Comment


            #6
            Hello Gerik,

            Thank you for your reply.

            That is not completely accurate - your prior trade data is stored in the database and can be viewed via the Trade Performance window and this can be viewed by symbol. However, through NinjaScript there would not be a supported method of retrieving all previous transactions on a specific symbol as that would require database access.

            Please let us know if we may be of further assistance to you.
            Kate W.NinjaTrader Customer Service

            Comment


              #7
              Hello Kate,

              thank you for your real-time response.

              When will the database access be supported and implemented for NinjaScript and does your development team have already a roadmap for the implementation?

              If you have access to the trades from NinjaTrader, why is the access via NinjaScript not possible? There must be a database access somehow, otherwise the report could not have been generated within Trade Performance Window out of the NinjaTrader -- right?

              Thank you
              Gerik

              Comment


                #8
                Hello Gerik,

                Thank you for your reply.

                There are no current plans I can report to implement supporting database access through NinjaScript. There is, however, a current feature request to allow access the database via NinjaScript that is currently in the interest-gathering phase. I have added a vote for you to this feature request, which may be tracked under the number SFT-1540.

                As with all feature requests, interest is tracked before implementation is considered, so we cannot offer an ETA or promise of fulfillment. If implemented, it will be noted in the Release Notes page of the Help Guide.

                Release Notes — https://ninjatrader.com/support/help...ease_notes.htm

                Please let us know if we may be of further assistance to you.
                Kate W.NinjaTrader Customer Service

                Comment


                  #9
                  Please, add my vote for database access through NinjaScript.
                  fx.practic
                  NinjaTrader Ecosystem Vendor - fx.practic

                  Comment


                    #10
                    +1

                    Please add my vote.

                    Comment


                      #11
                      Hello fx.practic and bltdavid,

                      Thank you for your replies.

                      I have added your votes for SFT-1540 as well.

                      Please let us know if we may be of further assistance to you.
                      Kate W.NinjaTrader Customer Service

                      Comment


                        #12
                        please add my vote, too.

                        Comment


                          #13
                          Hello patricia70,

                          Thank you for your reply.

                          I've added a vote for you to SFT-1540.

                          Please let us know if we may be of further assistance to you.
                          Kate W.NinjaTrader Customer Service

                          Comment

                          Latest Posts

                          Collapse

                          Topics Statistics Last Post
                          Started by Mestor, 03-10-2023, 01:50 AM
                          16 responses
                          388 views
                          0 likes
                          Last Post z.franck  
                          Started by rtwave, 04-12-2024, 09:30 AM
                          4 responses
                          31 views
                          0 likes
                          Last Post rtwave
                          by rtwave
                           
                          Started by yertle, Yesterday, 08:38 AM
                          7 responses
                          29 views
                          0 likes
                          Last Post yertle
                          by yertle
                           
                          Started by bmartz, 03-12-2024, 06:12 AM
                          2 responses
                          22 views
                          0 likes
                          Last Post bmartz
                          by bmartz
                           
                          Started by funk10101, Today, 12:02 AM
                          0 responses
                          7 views
                          0 likes
                          Last Post funk10101  
                          Working...
                          X