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

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

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

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

                Comment


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

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by burtoninlondon, 04-28-2024, 12:38 AM
                  3 responses
                  32 views
                  0 likes
                  Last Post burtoninlondon  
                  Started by burtoninlondon, 05-01-2024, 10:13 AM
                  2 responses
                  24 views
                  0 likes
                  Last Post burtoninlondon  
                  Started by LillyMarv, Today, 06:47 AM
                  0 responses
                  2 views
                  0 likes
                  Last Post LillyMarv  
                  Started by Salahinho99, Today, 04:13 AM
                  0 responses
                  16 views
                  0 likes
                  Last Post Salahinho99  
                  Started by junkone, 04-28-2024, 02:19 PM
                  8 responses
                  93 views
                  1 like
                  Last Post brucerobinson  
                  Working...
                  X