Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Access Yearly Profit

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

    Access Yearly Profit

    I would like to access the Annual or Monthly Net Profit. Is there a way to do this?

    #2
    Hello starcd,

    From the strategies trade performance there is only the profit per month property: https://ninjatrader.com/support/help...itpermonth.htm

    This would generally be something you would need to calculate similar to finding the daily net profit. We have a sample that demonstrates accumulating the cumulative profit and then resetting it daily, that same type of logic could be used to reset monthly or annually if you wanted to calculate those values.


    I look forward to being of further assistance.

    Comment


      #3
      Thanks for the super fast answer.
      Too bad, I had hoped to be able to access the values in the analysis display.
      But I think they are calculated at the end of the data series anyway, right?

      Comment


        #4
        Hello starcd,

        To clarify, are you trying to develop a strategy which uses those values in its logic or see this in a performance view (strategy performance, analyzer etc.) ?

        I look forward to being of further assistance.

        Comment


          #5
          Within the Logic. My strategy is day by day, with trades that can be up to a year long and run past the year limit. I want to calculate the tax due at the end of the year. I currently do this via a Time[0].Year query and calculations using the SystemPerformance.AllTrades.TradesPerformance.Curr ency.CumProfit.it.

          Comment


            #6
            Hello starcd,

            Thanks for that.

            In the performance views you can sort by yearly/monthly however in code you would have to do as you are and use the performance collections. For a longer timeframe like a month or year that would take some logic similar to the accumulating a value daily using the session information but instead on the monthly or yearly scales. The Time object could be used to know when months or years have elapsed and some additional logic surrounding that would be needed.

            I look forward to being of further assistance.

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by NullPointStrategies, Yesterday, 05:17 AM
            0 responses
            79 views
            0 likes
            Last Post NullPointStrategies  
            Started by argusthome, 03-08-2026, 10:06 AM
            0 responses
            146 views
            0 likes
            Last Post argusthome  
            Started by NabilKhattabi, 03-06-2026, 11:18 AM
            0 responses
            79 views
            0 likes
            Last Post NabilKhattabi  
            Started by Deep42, 03-06-2026, 12:28 AM
            0 responses
            52 views
            0 likes
            Last Post Deep42
            by Deep42
             
            Started by TheRealMorford, 03-05-2026, 06:15 PM
            0 responses
            56 views
            0 likes
            Last Post TheRealMorford  
            Working...
            X