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 argusthome, 03-08-2026, 10:06 AM
        0 responses
        65 views
        0 likes
        Last Post argusthome  
        Started by NabilKhattabi, 03-06-2026, 11:18 AM
        0 responses
        41 views
        0 likes
        Last Post NabilKhattabi  
        Started by Deep42, 03-06-2026, 12:28 AM
        0 responses
        23 views
        0 likes
        Last Post Deep42
        by Deep42
         
        Started by TheRealMorford, 03-05-2026, 06:15 PM
        0 responses
        26 views
        0 likes
        Last Post TheRealMorford  
        Started by Mindset, 02-28-2026, 06:16 AM
        0 responses
        52 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Working...
        X