Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Can Indicator add another Indicator to show on Chart?

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

    Can Indicator add another Indicator to show on Chart?

    I have developed and Indicator that call several other Indicators. For display purposes, the other Indicators (such as SMA & MACD), are needed to be added to the Chart. Since all of the parameters for all of the other Indicator, are included in my Indicator, it would be great, if there was a way to add these indicators to the Chart from my Indicator.

    Is it possible?

    #2
    Shai, that's an item on our feedback list for potential enhancement - however presently unfortunately only strategies could add indicators in for display purposes.

    BertrandNinjaTrader Customer Service

    Comment


      #3
      Originally posted by Shai Samuel View Post
      I have developed and Indicator that call several other Indicators. For display purposes, the other Indicators (such as SMA & MACD), are needed to be added to the Chart. Since all of the parameters for all of the other Indicator, are included in my Indicator, it would be great, if there was a way to add these indicators to the Chart from my Indicator.

      Is it possible?
      You will have to create new Plots and assign the Plots the values of the indicators.

      Comment


        #4
        Originally posted by koganam View Post
        You will have to create new Plots and assign the Plots the values of the indicators.
        Thanks Koganam.

        - Can this be done from an Indicator?
        - Can the new plot be assined a new panel?

        Comment


          #5
          Originally posted by Shai Samuel View Post
          Thanks Koganam.
          - Can this be done from an Indicator? - Yes; Plots can only be drawn, natively, in indicators.
          - Can the new plot be assined a new panel? - No. Indicator plots will be plotted on the panel on which the indicator is loaded.

          Comment


            #6
            Sorry for resurrecting this old thread, but ...

            Many times in NT7 I have wished for this exact feature.

            I want the ability for an indicator to Add() another indicator to
            the chart (naturally the added indicator plots/displays on the chart)
            and I want to access that added indicator object the same as I might
            do inside strategy code.

            I see that NT8 has AddChartIndicator() but this looks to be a method
            reserved for use by strategies -- in fact, it's looks like nothing more
            than the old Add() method renamed to AddChartIndicator().

            Does NT8's NinjaScript support a method for an indicator to add
            another indicator to the chart?

            Ie, what's the current status of this thread's request with regards to NT8?

            Comment


              #7
              Hello,
              I am unsure of what is meant by the following:
              and I want to access that added indicator object the same as I might
              do inside strategy code.
              Could you please elaborate on your request? Please be thorough so I can write a feature request for you.
              Shawn B.NinjaTrader Customer Service

              Comment


                #8
                Hi,

                Thank you ShawnB, for following up. G, this is a post from 2 years ago, when I had little experience, and so many water move under the bridge since...

                Anyway, the reply I got from koganam, was sufficient.

                The only addition I can think of, which is relevant in any case, with, our without additional indicators, is to choose a plot to show on a different panel, since plots might be of totally different value range (for example: one plot can be of value range of 1..-1, and another can be price range.

                I understand this might be complicated, for the UI.

                Comment


                  #9
                  Originally posted by NinjaTrader_ShawnB View Post
                  Could you please elaborate on your request? Please be thorough so I can write a feature request for you.
                  Sure. Inside Initialize() of an NT7 Strategy I can do,

                  Code:
                    EMA ind = EMA(20);
                    ind.CalculateOnBarClose = this.CalculateOnBarClose;
                    ind.PaintPriceMarkers = false;
                    ind.Plots[0].Pen.Color = Color.Red;
                    ind.Plots[0].Pen.DashStyle = DashStyle.Dash;
                    ind.Plots[0].Pen.Width = 1;
                    ind.Name = string.Empty;
                    Add(ind);
                  which adds the EMA indicator to the chart, along with some custom settings I may wish to make. If desired, I could also do,

                  Code:
                    Add(EMA(20));
                    Add(EMA(Median, 34));
                  But all this code is illegal in an NT7 Indicator, since an indicator's Initialize() cannot use Add() to add another indicator to the chart.

                  In other words, in NT7, the Indicator class did not support an overload for the Add() method that allowed other indicators to be programmatically added to a chart. The Strategy class in NT7 supports this, but the Indicator class in NT7 did not.

                  So, the question is, does NT8 allow an indicator's Initialize() to Add() another indicator?

                  Granted the method names "Initialize" and "Add" may have changed in NT8, but I presume you get my point.

                  Simple question.

                  Comment


                    #10
                    Hello bltdavid,

                    The ability to add an indicator to your chart from a script is also limited to strategies in NT 8.
                    Use the AddChartIndicator() to add an indicator to the strategy only for the purpose of displaying it on a chart


                    I have included the ChartIndicators and AddChartIndicator() Help Guides to assist you further.
                    Shawn B.NinjaTrader Customer Service

                    Comment


                      #11
                      Ah, ok ... thanks.

                      Is there an feature request open to add this capability to NT8?

                      Comment


                        #12
                        Hello bltdavid,

                        I have just submitted a feature request on your behalf. I will update this post with a id for this request if/when one is available.
                        Shawn B.NinjaTrader Customer Service

                        Comment


                          #13
                          Is there a id# for this feature request?

                          Comment


                            #14
                            Hello,

                            Yes, the ID for this feature request is SFT-899
                            Shawn B.NinjaTrader Customer Service

                            Comment

                            Latest Posts

                            Collapse

                            Topics Statistics Last Post
                            Started by judysamnt7, 03-13-2023, 09:11 AM
                            4 responses
                            59 views
                            0 likes
                            Last Post DynamicTest  
                            Started by ScottWalsh, Today, 06:52 PM
                            4 responses
                            36 views
                            0 likes
                            Last Post ScottWalsh  
                            Started by olisav57, Today, 07:39 PM
                            0 responses
                            7 views
                            0 likes
                            Last Post olisav57  
                            Started by trilliantrader, Today, 03:01 PM
                            2 responses
                            22 views
                            0 likes
                            Last Post helpwanted  
                            Started by cre8able, Today, 07:24 PM
                            0 responses
                            10 views
                            0 likes
                            Last Post cre8able  
                            Working...
                            X