Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Trouble adding multiple indicators to chart

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

    Trouble adding multiple indicators to chart

    I would like to have two or more instances of an indicator within my strategy. If I use the close of a more granular data series, ie use 1 minute for my BOP2, I can get two BOP lines in one panel when I apply my strategy to a chart. However, if I want to use the 0 data series and adjust the smoothing factor to have two or more lines in the same panel, when applied it has no panel two and shares a panel with the data series. Any help would be greatly appreciated. Thank you.

    Code:
    else if (State == State.DataLoaded)
    
    {
    
    StdDev1 = StdDev(Period);
    
    // OBV1 = OBV();
    
    Momentum1 = Momentum(MomentumPeriod);
    
    Range1 = Range(Close);
    
    SMA1 = SMA(Range1, Period);
    
    // SMA2 = SMA(OBV1, ADXPeriod);
    
    BOP1 = BOP(Close, BOP1Period);
    
    BOP2 = BOP(Close, BOP2Period);
    
    // ADX1 = ADX(ADXPeriod);
    
    BOP1.Plots[0].PlotStyle = PlotStyle.Line;
    
    BOP1.Panel = 2;
    
    AddChartIndicator(BOP1);
    
    BOP2.Plots[0].PlotStyle = PlotStyle.Line;
    
    BOP2.Panel = 3;
    
    AddChartIndicator(BOP2);
    
    Momentum1.Panel = 4;
    
    AddChartIndicator(Momentum1);
    ​

    #2
    Hello zrobfrank,

    I see that you are trying to set the panels yourself in code however that is not currently supported and may cause problems. Do you still see the problem if you only do AddChartIndicator and don't try to manipulate the panel?
    Code:
    // remove this BOP1.Panel = 2;
    
    AddChartIndicator(BOP1);
    JesseNinjaTrader Customer Service

    Comment


      #3
      That'll have to do. Thank you, Jesse.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by fx.practic, 10-15-2013, 12:53 AM
      5 responses
      5,406 views
      0 likes
      Last Post Bidder
      by Bidder
       
      Started by Shai Samuel, 07-02-2022, 02:46 PM
      4 responses
      98 views
      0 likes
      Last Post Bidder
      by Bidder
       
      Started by DJ888, Yesterday, 10:57 PM
      0 responses
      8 views
      0 likes
      Last Post DJ888
      by DJ888
       
      Started by MacDad, 02-25-2024, 11:48 PM
      7 responses
      160 views
      0 likes
      Last Post loganjarosz123  
      Started by Belfortbucks, Yesterday, 09:29 PM
      0 responses
      9 views
      0 likes
      Last Post Belfortbucks  
      Working...
      X