Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Put Cumulative profit graph in the chart in Strategy Analyzer

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

    Put Cumulative profit graph in the chart in Strategy Analyzer

    Hello dear support! Nice to ask you again =)
    So, how to put Cumulative profit graph (or other result's graph) in the chart in Strategy Analyzer?

    #2
    Hello Alexstox,

    Thank you for your post.

    The Cumulative Profit is available under Graphs Tab in the Strategy Analyzer.
    Cal H.NinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_Cal View Post
      Hello Alexstox,

      Thank you for your post.

      The Cumulative Profit is available under Graphs Tab in the Strategy Analyzer.
      Thank you, I knew that. I just want to put in the chart. Well, it's possible only via script. Thanks

      Comment


        #4
        I tried to create an indicator, but I don't know how to associate indicator with strategy. This lead to error in indicator:
        Code:
        Plot0.Set(Performance.AllTrades.TradesPerformance.Points.CumProfit);
        How can I represent CumProfit on the price chart with ScaleJustification=overlay and autoscale=false?

        I tried with
        Code:
        DrawLine("MyCumProfit"+CurrentBar, false, 1, Performance.AllTrades.TradesPerformance.Percent.CumProfit, 0, Performance.AllTrades.TradesPerformance.Percent.CumProfit, Color.Gray, DashStyle.Dot, 1);
        But it y-sclaed and when want to see chart you don't see profit graph.

        Comment


          #5
          Hello alexstox,

          You may want to just plot from within the strategy for the easiest way to do something like this so you do not have to worry about passing variables from your Strategy to your Indicator which can be difficult.

          Here is an example of how you can Plot from within a strategy that you may view.
          When running a strategy on a chart you may find the need to plot values onto a chart. If these values are internal strategy calculations that are difficult to migrate to an indicator, you can use the following technique to achieve a plot. NinjaTrader 8 With NinjaTrader 8 we introduced strategy plots which provide the ability
          JCNinjaTrader Customer Service

          Comment


            #6
            The problem is I want to use it in Strategy Analyzer =))) And there is attention in your sample
            It will NOT work for charts in the Strategy Analyzer during backtesting, but it will work on real-time charts.

            Comment


              #7
              Hello alexstox,

              Nothing comes to mind to easily be able to do what you looking for. Drawing objects in a Strategy will be on the same scale and writing the values to a file in the Strategy Analyzer can run into issue with file accessing.

              Is this something that you want visually? If you use the DrawText() method you should be able to Display the Cumulative Profit when your trades enters or exits.
              JCNinjaTrader Customer Service

              Comment

              Latest Posts

              Collapse

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