Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Non plotting series

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

    Non plotting series

    In an indicator I have 4 AddPlots... and I define, update and access them as in the code below.

    However, the 4th one (Atr)... I don't want to show up on the chart... I just want to access it from code in my strategy... do I use AddDataSeries instead, if so what should the parameter(s) be?

    Also, if I did plot it... is there a way to get it into a separate panel?

    Code:
                    IsOverlay                    = true;
                    ...
                    AddPlot(Brushes.Orange, "Upper");
                    AddPlot(Brushes.Blue, "PDC");
                    AddPlot(Brushes.Orange, "Lower");
                    AddPlot(Brushes.Orange, "Atr");
                    ...
                Upper[0] = pdc + atr;            
                PDC[0] = pdc;
                Lower[0] = pdc - atr;
                AtrSeries[0] = atr;
                ...
            [Browsable(false)]
            [XmlIgnore()]
            public Series<double> Upper
            {
                get { return Values[0]; }
            }
            
            [Browsable(false)]
            [XmlIgnore()]
            public Series<double> PDC
            {
                get { return Values[1]; }
            }
            
            [Browsable(false)]
            [XmlIgnore()]
            public Series<double> Lower
            {
                get { return Values[2]; }
            }
            
            [Browsable(false)]
            [XmlIgnore()]
            public Series<double> Atr
            {
                get { return Values[3]; }
            }

    #2
    Hello BrianARice,

    Thanks for your post.

    If you don't wish to see the plot, set the color to be transparent and then you can access as you have been in your strategy.

    You would not be able to set it into a separate panel.

    Alternatively, you could just use the ATR() directly in the strategy.
    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Ok... that worked great... one of the things I was concerned about was that the Y Axis would still include the 4th data series... but when it's set to Transparent it doesn't.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by algospoke, 04-17-2024, 06:40 PM
      5 responses
      46 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Started by arvidvanstaey, Today, 02:19 PM
      1 response
      4 views
      0 likes
      Last Post NinjaTrader_Zachary  
      Started by mmckinnm, Today, 01:34 PM
      3 responses
      5 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by f.saeidi, Today, 01:32 PM
      2 responses
      8 views
      0 likes
      Last Post f.saeidi  
      Started by alifarahani, 04-19-2024, 09:40 AM
      9 responses
      55 views
      0 likes
      Last Post NinjaTrader_Jesse  
      Working...
      X