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 Mindset, 04-21-2026, 06:46 AM
            0 responses
            88 views
            0 likes
            Last Post Mindset
            by Mindset
             
            Started by M4ndoo, 04-20-2026, 05:21 PM
            0 responses
            134 views
            0 likes
            Last Post M4ndoo
            by M4ndoo
             
            Started by M4ndoo, 04-19-2026, 05:54 PM
            0 responses
            68 views
            0 likes
            Last Post M4ndoo
            by M4ndoo
             
            Started by cmoran13, 04-16-2026, 01:02 PM
            0 responses
            119 views
            0 likes
            Last Post cmoran13  
            Started by PaulMohn, 04-10-2026, 11:11 AM
            0 responses
            69 views
            0 likes
            Last Post PaulMohn  
            Working...
            X