Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Indicator can access other indicator?

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

    Indicator can access other indicator?

    Hello,

    Suppose I add Macd indicator to chart and i add my own indicator that purpose is catch divergence via Macd-Price relation. When my own indicator decide to there is a divergence or not, It must be know Macd parameters thet before inserted to same chart if so. If not so it use default macd settings.

    So, How can i access other indicator to added same chart at my own indicator?

    Thanks.

    #2
    Hi aytacasan,

    You can access the MACD indicator: http://www.ninjatrader-support.com/H...helpguide.html

    However there is no way to access the indicator properties if you are changing them from the UI, instead of your script. You will need to plot the MACD from the script.
    TimNinjaTrader Customer Service

    Comment


      #3
      Hi Tim,

      Are you sure about this. One hour ago when i explore indicator class i see it has ChartControl property. And ChartControl property has Indicators collection. Hımmmmmmm i'll try it. Maybe i can access from one indicator to other indicator properties like this:

      foreach(Indicator in this.ChartControl.Indicators)
      {
      if (Indicater is MACD)
      {
      int fast = MACD(Indicator).Fast;
      }
      }

      Comment


        #4
        aytacasan, this might work for you, but unfortunately the ChartControl methods and specifics are not supported by us so you would need to explore it on your own unfortunately.

        Comment


          #5
          Hi again,

          I tryed the code and i see that working perfectly. So we are access from any indicator on chart to another indicator on chart too.

          And please explain me what is mean ChartControl not supported us?Is ChartControl Microsoft's C# inline class? Who is us? Ninja's company or support forum. Does not make sense to me.

          Maybe i'm thinking wrong but please explain me why?

          Thanks.

          Comment


            #6
            aytacasan, great you got it working - we provide support for the documented NinjaScript methods and properties (our NinjaScript language reference in the helpguide) and then reference samples posted here in the forum. There are certainly other 'under the hood' methods available, but if you work with those you would be on your own and code could break going from one release to another.

            Comment


              #7
              Hi,

              My idea is ChartControl is core class like Indicator or Strategy. So Ninja's have to support this all releases. I did not agree with you but, nevertheless I understand you exactly that what is you mean. Thanks for your explaination.

              Regards.

              Comment


                #8
                You're welcome and I can understand where you're coming from, too - we're always looking to expand our educational coverage and offers so your suggestions are noted.

                Comment


                  #9
                  Thanks for your understanding.
                  Have a nice day.

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                  0 responses
                  597 views
                  0 likes
                  Last Post Geovanny Suaza  
                  Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                  0 responses
                  343 views
                  1 like
                  Last Post Geovanny Suaza  
                  Started by Mindset, 02-09-2026, 11:44 AM
                  0 responses
                  103 views
                  0 likes
                  Last Post Mindset
                  by Mindset
                   
                  Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                  0 responses
                  556 views
                  1 like
                  Last Post Geovanny Suaza  
                  Started by RFrosty, 01-28-2026, 06:49 PM
                  0 responses
                  555 views
                  1 like
                  Last Post RFrosty
                  by RFrosty
                   
                  Working...
                  X