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 alifarahani, Today, 09:40 AM
              6 responses
              31 views
              0 likes
              Last Post alifarahani  
              Started by Waxavi, Today, 02:10 AM
              1 response
              17 views
              0 likes
              Last Post NinjaTrader_LuisH  
              Started by Kaledus, Today, 01:29 PM
              5 responses
              14 views
              0 likes
              Last Post NinjaTrader_Jesse  
              Started by Waxavi, Today, 02:00 AM
              1 response
              12 views
              0 likes
              Last Post NinjaTrader_LuisH  
              Started by gentlebenthebear, Today, 01:30 AM
              3 responses
              17 views
              0 likes
              Last Post NinjaTrader_Jesse  
              Working...
              X