Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Plot in strategy

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

    Plot in strategy

    Do u have any sample code of plotting from withing a strategy at the bottom of the main or some other panel?
    txs

    #2
    Yes, we have that sample here:
    Plotting from within a NinjaScript Strategy

    StrategyPlot(0).PanelUI = 1;
    StrategyPlot(1).PanelUI = 1;
    Ryan M.NinjaTrader Customer Service

    Comment


      #3
      Works gooood.. Is there a way to change the label that shows in the panel? I went in to indicators changed the "Label" but keeps reverting back to the default..

      Comment


        #4
        You have to change the label within the indicator itself. Help for custom label formatting is available here:
        Removing and Custom Formatting an Indicator’s Chart Label
        Ryan M.NinjaTrader Customer Service

        Comment


          #5
          I'm plotting from inside my strategy,, can this work for this?
          Add(StrategyPlot(0));
          StrategyPlot(0).Plots[0].Pen.Color = Color.Blue;
          StrategyPlot(0).PanelUI = 2;

          Comment


            #6
            Yes, that looks OK.
            Ryan M.NinjaTrader Customer Service

            Comment


              #7
              guess i was not too clear,, my ? I cant see how the references u gave me for renaming what shows in the pane will work for a plot from inside the strategy and not an external indicator.. ? or can it?

              Comment


                #8
                No, that won't work to change the label. You'll have to follow instructions in post #4
                Ryan M.NinjaTrader Customer Service

                Comment


                  #9
                  hear is how i finally handled this, renaming plot in strategy

                  Add(StrategyPlot(0));
                  StrategyPlot(0).Plots[0].Pen.Color = Color.Blue;
                  StrategyPlot(0).PanelUI = 2;
                  StrategyPlot(0).Name ="PNL Today " + profit.ToString("$#.#")+"\n";

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                  0 responses
                  647 views
                  0 likes
                  Last Post Geovanny Suaza  
                  Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                  0 responses
                  368 views
                  1 like
                  Last Post Geovanny Suaza  
                  Started by Mindset, 02-09-2026, 11:44 AM
                  0 responses
                  108 views
                  0 likes
                  Last Post Mindset
                  by Mindset
                   
                  Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                  0 responses
                  571 views
                  1 like
                  Last Post Geovanny Suaza  
                  Started by RFrosty, 01-28-2026, 06:49 PM
                  0 responses
                  573 views
                  1 like
                  Last Post RFrosty
                  by RFrosty
                   
                  Working...
                  X