Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Problems adding IGTDSequential to a strategy

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

    Problems adding IGTDSequential to a strategy

    Hi

    I have created custom indicators and added them to my strategy successfully before.

    I am trying to add the IGTDSequential indicator to a strategy.
    I used Add(IGTDSequential()); in order to add it to my strategy and it compiled fine. Only that line was used in the initialize() portion of the strategy to see if it gets added. I am not using it further in the strategy logic for now.

    Once compiled, I tried a backtest in strategy analyzer with my old strategy logic and the results are ok. So I go into the Chart tab and see if IGTDSequential is added properly. But unfortunately IGTDSequential seems not to be added and nothing from that indicator is appearing on the strategy chart in strategy analyzer. I right click and select "indicators" and the name IGTDSequential is not appearing in the active indicators list either. So it seems it did not get added but the strategy code was compiled with no problem.

    I did not see any error in the log tab either.

    This may be causing the problem : I know that the indicator itself has at least a dozen parameters that needs to be specified but in the strategy code it needs none in order to compile. And the hint popup text that appears when hovering over the indicator name in the strategy code seems to be saying it needs no parameters in order to function.

    Can you tell me why this is the case ?
    How do I tell the strategy that the indicator does need parameters in order to operate.


    I can modify it if needed to add to a strategy but I need some hint as to what is going wrong. Can the NT support staff give me a hint ?

    Thanks in advance.


    link to the indicator : http://www.ninjatrader-support2.com/...tid=-1&lpage=1

    #2
    Hello,

    Can you start pretty basic? Can you add say SMA to the strategy? In other words, is it the adding or the indicator that is causing the issue?
    DenNinjaTrader Customer Service

    Comment


      #3
      Thanks for your quick reply.

      Yes I can add any of the basic indicator (including SMA) and my own custom indicators too.
      This is specific to this indicator.

      After trial and error I found something that might be the problem :
      the parameters that need to be passed are declared under the public properties section with a category that is different from the "Parameters" category.

      So for example : the original code would use [Category("1-Parameters")].
      I changed it to [Category("Parameters")]

      After that change, the parameter is showing up as needed to be specified when I Add the indicator to the strategy. The strategy will now not compile properly unless you specify that parameter when you add the indicator in your code. Try it you will see better what I am saying .

      So as a general rule, does every parameter that needs to be passed to the indicator class have to be declared using the category : [Category("Parameters")] in order to be able to call that indicator within a strategy ?

      If yes why is that ? can you point me to the coding reasoning behind what I observed through trial and error ?

      Thanks in advance
      Last edited by qewcool; 04-11-2010, 03:13 AM.

      Comment


        #4
        Hello,

        I will have someone reply to you on Monday. Thank you for your patience.
        DenNinjaTrader Customer Service

        Comment


          #5
          qewcool,

          Parameters categorized as "Parameters" need to be passed in, this is correct. I am not sure what you mean by what is the programmatic reason for this. The category "Parameters" is the only category NT looks at for parameters of your strategy for the indicator method call. What you add in custom categories is not supported and as such will not show up in the method call.
          Josh P.NinjaTrader Customer Service

          Comment


            #6
            Thanks for the answer.

            I did not know that custom parameters are not passed as a rule.

            I will continue working on this.

            Comment


              #7
              I want to control the order in which parameters appear in the signature of indicators. The order in which they appear in the Indicator GUI window is controlled by adding the "\t" to the GUI.Design.DisplayName propery.

              However that order is different from which they appear when you want to call the Indicators in another Indicator or Strategy. The order in which the parameters appear in that signature seems to be alphabetical based on the actual Property name used to store the parameter value.

              Is there another way to achieve the same order as the GUI without having to rename the Property in an alphabetical order?
              Last edited by aviat72; 04-18-2010, 08:52 PM.

              Comment


                #8
                Hi aviat72,

                Thanks for posting, someone will reply shortly, later today.
                TimNinjaTrader Customer Service

                Comment


                  #9
                  aviat72,

                  Unfortunately this is not possible. You will just have to name the underlying property variables in the alphabetical order you want to be using.
                  Josh P.NinjaTrader Customer Service

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                  0 responses
                  648 views
                  0 likes
                  Last Post Geovanny Suaza  
                  Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                  0 responses
                  369 views
                  1 like
                  Last Post Geovanny Suaza  
                  Started by Mindset, 02-09-2026, 11:44 AM
                  0 responses
                  108 views
                  0 likes
                  Last Post Mindset
                  by Mindset
                   
                  Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                  0 responses
                  572 views
                  1 like
                  Last Post Geovanny Suaza  
                  Started by RFrosty, 01-28-2026, 06:49 PM
                  0 responses
                  574 views
                  1 like
                  Last Post RFrosty
                  by RFrosty
                   
                  Working...
                  X