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

Can't Access Custom Indicator Parameters in Strategy

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

    Can't Access Custom Indicator Parameters in Strategy

    Hello,

    I have a custom indicator that i need to use in one of my strategies. When i call the method in my strategy, it only take 1 parameter. But, when i attach it to the chart, there are several other parameters that can be set. And, in my strategy i need to set all those parameters in order to properly code my strategy.

    I have taken a look at the indicator code and i am unable to figure out how to allow all those indicator parameters to be set from my strategy code.

    Please suggest.

    Thanks,
    Umer

    #2
    Hello Umer,

    Thank you for your post.

    Can you provide the custom indicator here or in an e-mail to support[at]ninjatrader[dot]com so I may test this matter on my end?

    If you wish to send an e-mail to support[at]ninjatrader[dot]com please attach the indicator, place 'ATTN: Patrick - 824621' in the subject line and a reference to this thread in the body of the e-mail: http://www.ninjatrader.com/support/f...ad.php?t=57131

    I look forward to assisting you further.

    Comment


      #3
      Hello Patrick,

      Thank you for your reply.

      I am under NDA and can't share the indicator details. I can ask the client for permission but i dont have much hope of him agreeing.

      In any case, can't you let me know how to set parameters of an indicator when using it in a strategy?

      Thanks,
      Umer

      Comment


        #4
        Hello Umer,

        Thank you for your response.

        I have created a video on this item, you can view this video at the following link: http://screencast.com/t/hreIJ1xrQmg

        Please let me know if you have any questions.

        Comment


          #5
          Hello Patrick,

          Thank you for the effort.

          I am aware of the iNtellisense offered by NinjaTrader. But in my case, the intellisense shows only one parameter. But, as i explained earlier, i need to set 5 in total; all of which are available to set when i attach the indicator to a chart.

          Hope this clarifies things a bit more.

          Thanks.
          Umer

          Comment


            #6
            Hello Umer,

            Thank you for your response.

            If the IntelliSense doe snot show additional parameters you will need to investigate the indicator it self or follow up with the developer on this matter.

            Comment


              #7
              Originally posted by NinjaTrader_PatrickH View Post
              you will need to investigate the indicator it self
              Can you please let me know what exactly to look for? I mean how do you allow a parameter to be set externally?

              Thanks,
              Umer

              Comment


                #8
                Hello Umer,

                Thank you for your response.

                For example a Period int can be accessed when it's properties are set up in the following manner:
                Code:
                [Description("Numbers of bars used for calculations")]
                [GridCategory("Parameters")]
                public int Period
                {
                get { return period; }
                set { period = Math.Max(1, value); }
                }
                Check the Properties section of the Indicator and compare to the code above to ensure the parameters are set properly.

                Comment


                  #9
                  Originally posted by Master.Aurora View Post
                  Hello Patrick,

                  Thank you for the effort.

                  I am aware of the iNtellisense offered by NinjaTrader. But in my case, the intellisense shows only one parameter. But, as i explained earlier, i need to set 5 in total; all of which are available to set when i attach the indicator to a chart.

                  Hope this clarifies things a bit more.

                  Thanks.
                  Umer
                  The indicator is a class. If you know what you want to set, just set it, using standard OOP dot notation. e.g, if there is a parameter called UnseenParam, in the class SomeIndi(), provided that it's properties were declared public, all you need to do is access the parameter with SomeIndi().UnseenParam.
                  Last edited by koganam; 04-10-2013, 11:44 AM.

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by RaddiFX, Today, 10:15 AM
                  2 responses
                  13 views
                  0 likes
                  Last Post RaddiFX
                  by RaddiFX
                   
                  Started by patrickmlee007, Today, 09:33 AM
                  2 responses
                  17 views
                  0 likes
                  Last Post patrickmlee007  
                  Started by magnatauren, 08-15-2020, 02:12 PM
                  5 responses
                  206 views
                  0 likes
                  Last Post RaddiFX
                  by RaddiFX
                   
                  Started by rene69851, 05-02-2024, 03:25 PM
                  1 response
                  22 views
                  0 likes
                  Last Post rene69851  
                  Started by ETFVoyageur, Yesterday, 07:05 PM
                  5 responses
                  45 views
                  0 likes
                  Last Post ETFVoyageur  
                  Working...
                  X