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

TradePerformanceReport for historical trades in an indicator

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

    TradePerformanceReport for historical trades in an indicator

    Would it possible to create an instance of TradePerformanceReport in an indicator and use that get historical trade data from various accounts.

    I've seen in the manual and other posts that it's not possible to directly get historical trade data from the internal database. However, TradePerformanceReport does it so maybe there is a way to work with this object to get the data desired programmatically.

    I'm sure this would be an advanced programming solution, but if someone has done it or any of the Ninja folks could steer in the right direction I'm sure many of us would appreciate it.

    Thanks!
    daqu40
    NinjaTrader Ecosystem Vendor - QTradez

    #2
    Hello daqu40,

    Thank you for the post.

    While I dont believe there is any exposed method to directly create the TradePerformanceReport, You could look into the Account objects methods and iterate over the various collections that an account has such as the Executions collection. https://ninjatrader.com/support/help...unt.executions


    I look forward to being of further assistance.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Thanks for the quick reply Jesse.

      This is where I started. Unfortunately, the Executions and Orders collections are not able to reach into the local database and get the historical executions or orders. If accessed before any new orders have been placed since starting Ninja these collections will have a count of 0.

      Any other ideas?
      daqu40
      NinjaTrader Ecosystem Vendor - QTradez

      Comment


        #4
        Hello daqu40,

        Thank you for the reply.

        Unfortunately not, if the orders are not contained in the accounts collections it would be unavailable to NinjaScript from a documented/supported standpoint. There is nothing I could suggest to dig further into the database from NinajScript specifically. The account object would basically be the highest level access to the various collections that are available in NinjaScript.

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

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by cre8able, Today, 03:20 PM
        0 responses
        2 views
        0 likes
        Last Post cre8able  
        Started by Fran888, 02-16-2024, 10:48 AM
        3 responses
        45 views
        0 likes
        Last Post Sam2515
        by Sam2515
         
        Started by martin70, 03-24-2023, 04:58 AM
        15 responses
        114 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by The_Sec, Today, 02:29 PM
        1 response
        7 views
        0 likes
        Last Post NinjaTrader_Jesse  
        Started by jeronymite, 04-12-2024, 04:26 PM
        2 responses
        31 views
        0 likes
        Last Post NinjaTrader_BrandonH  
        Working...
        X