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 SalmaTrader, 07-07-2026, 10:26 PM
                  0 responses
                  50 views
                  0 likes
                  Last Post SalmaTrader  
                  Started by CarlTrading, 07-05-2026, 01:16 PM
                  0 responses
                  22 views
                  0 likes
                  Last Post CarlTrading  
                  Started by CaptainJack, 06-17-2026, 10:32 AM
                  0 responses
                  16 views
                  0 likes
                  Last Post CaptainJack  
                  Started by kinfxhk, 06-17-2026, 04:15 AM
                  0 responses
                  22 views
                  0 likes
                  Last Post kinfxhk
                  by kinfxhk
                   
                  Started by kinfxhk, 06-17-2026, 04:06 AM
                  0 responses
                  23 views
                  0 likes
                  Last Post kinfxhk
                  by kinfxhk
                   
                  Working...
                  X