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 DayTradingDEMON, Today, 09:28 AM
        4 responses
        21 views
        0 likes
        Last Post DayTradingDEMON  
        Started by geddyisodin, Yesterday, 05:20 AM
        9 responses
        50 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by George21, Today, 10:07 AM
        1 response
        11 views
        0 likes
        Last Post NinjaTrader_ChristopherJ  
        Started by Stanfillirenfro, Today, 07:23 AM
        9 responses
        24 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by navyguy06, Today, 09:28 AM
        1 response
        9 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Working...
        X