Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Multiple plots in one panel

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

    Multiple plots in one panel

    I need some help with the syntax to create multiple plots within one panel. Here is what I tried. NJ tells me I am referencing an index out of bound so I must not be defining the second array - Values.
    "Initialize"
    Add(StrategyPlot(0));
    StrategyPlot(0).Plots[0].Pen.Color = Color.Green;
    StrategyPlot(0).Plots[1].Pen.Color = Color.Red;
    StrategyPlot(0).Plots[2].Pen.Color = Color.Blue;
    StrategyPlot(0).Plots[0].PlotStyle = PlotStyle.Bar;
    StrategyPlot(0).Plots[1].PlotStyle = PlotStyle.Bar;
    StrategyPlot(0).PanelUI = 2;
    "OnBarUpdate"
    StrategyPlot(0).Values[0].Set(ConfSignal1);
    StrategyPlot(0).Values[1].Set(ConfSignal2);
    StrategyPlot(0).Values[2].Set(ConfFilter);

    #2
    GuyFB, please work closely alongside this reference sample here and also ensure to have StrategyPlot placeholder indicator installed as needed.

    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

    Comment


      #3
      Bertran,
      So what you are saying is that you can not use "Values" with more than 1 value and should use multiple StrategyPlot. i.e. StrategyPlot(0), StrategyPlot(2) for multiple plots on a panel. Is that correct?

      Comment


        #4
        Yes, you would need to add several StrategyPlot placeholder indicators for multiple plots, see for example this sample here for multitime frame RSI - http://www.ninjatrader.com/support/f...ad.php?t=20625

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Mindset, 04-21-2026, 06:46 AM
        0 responses
        111 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by M4ndoo, 04-20-2026, 05:21 PM
        0 responses
        156 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by M4ndoo, 04-19-2026, 05:54 PM
        0 responses
        76 views
        0 likes
        Last Post M4ndoo
        by M4ndoo
         
        Started by cmoran13, 04-16-2026, 01:02 PM
        0 responses
        125 views
        0 likes
        Last Post cmoran13  
        Started by PaulMohn, 04-10-2026, 11:11 AM
        0 responses
        79 views
        0 likes
        Last Post PaulMohn  
        Working...
        X