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
    BertrandNinjaTrader Customer Service

    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
        BertrandNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by benmarkal, Yesterday, 12:52 PM
        3 responses
        23 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by helpwanted, Today, 03:06 AM
        1 response
        18 views
        0 likes
        Last Post sarafuenonly123  
        Started by Brevo, Today, 01:45 AM
        0 responses
        11 views
        0 likes
        Last Post Brevo
        by Brevo
         
        Started by pvincent, 06-23-2022, 12:53 PM
        14 responses
        244 views
        0 likes
        Last Post Nyman
        by Nyman
         
        Started by TraderG23, 12-08-2023, 07:56 AM
        9 responses
        388 views
        1 like
        Last Post Gavini
        by Gavini
         
        Working...
        X