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

In what order are parameters set when calling Indicator

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

    In what order are parameters set when calling Indicator

    i.e. in primary indicator, i have this order of parameters:


    Code:
    public DataSeries ZZZZZ
    {
    	get { return ZZZZZ1[0]; }
    }
    
    [XmlIgnore()]
    [Description("")]
    [GridCategory("Parameters - Timeframe")]
    public int DDDDD
    {
    	get { return DDDDD1; }	set { DDDDD1= value; }
    }
    
    [Browsable(false)]
    [Description("")]
    [GridCategory("Parameters - Timeframe")]
    public int BBBBB
    {
    	get { return BBBBB1; }	set { BBBBB1= value; }
    }
    
    [XmlIgnore()]
    [Description("")]
    [GridCategory("Parameters - Timeframe")]
    public int CCCCC
    {
    	get { return CCCCC1; }	set { CCCCC1= value; }
    }
    
    [Description("")]
    [GridCategory("Parameters - Timeframe")]
    public int AAAAAA
    {
    	get { return AAAAAA1; }	set { AAAAAA1=value; }
    }

    when i want to include (call) this indi into another indi, in what sequence(order) i should use the parameteres?

    for example:

    Code:
    Indi temp_var = primary_indi( param1, param2, param3 , param4, param5)
    does param1 sets - ZZZZ
    does param2 sets - DDD
    does param3 sets - BBB
    does param4 sets - CCC
    does param5 sets - AAA
    ?
    Last edited by ttodua; 01-06-2018, 10:54 AM.

    #2
    Hello TazoTodua,

    Thank you for your note.

    You should call them in the order they are listed, the top being first.

    From the calling indicator you should see these listed in Intellisense. See screen shot.

    Please let us know if you need further assistance.
    Attached Files
    Alan P.NinjaTrader Customer Service

    Comment


      #3
      So you say the "order" parameter decides the order of arguments for external call, am i right?

      otherwise, i was forced to call arguments ALHPABETICALLY.

      Comment


        #4
        and lets, another question, if in initialization, i do:


        Add(new Plot(Color.Blue, "BBBB"));
        Add(new Plot(Color.Blue, "AAAA"));


        (look the alpabetically reversed names), will they anyway added in this manner:

        BBBB -- Values[0]
        AAAA -- Values[1]

        am i right?

        Comment


          #5
          Hello TazoTodua,

          Yes, the order determines the input. For further analysis, I would suggest opening an new indicator and typing MACD( , which will display an intellisense box with the parameter the MACD indicator takes. Next you could open the MACD indicator and look how its parameters are listed.

          Similar to parameters, plots are also in the order that they are listed.

          Please let us know if you need further assistance.
          Alan P.NinjaTrader Customer Service

          Comment


            #6
            Originally posted by NinjaTrader_AlanP View Post
            Yes, the order determines the input.
            No, it doesn't.

            In NT7, the order of the parameters is determined alphabetically, not by how they are listed as properties.

            (NT8 is different, but this is an NT7 question, right?)

            For example, see @KeltnerChannel.cs.

            Comment


              #7
              Hello TazoTodua,

              Thank you for your patience.
              Originally posted by TazoTodua View Post
              when i want to include (call) this indi into another indi, in what sequence(order) i should use the parameteres?

              for example:

              Code:
              Indi temp_var = primary_indi( param1, param2, param3 , param4, param5)
              does param1 sets - ZZZZ
              does param2 sets - DDD
              does param3 sets - BBB
              does param4 sets - CCC
              does param5 sets - AAA
              ?
              The DataSeries ZZZZ would not be a parameter to enter values, although there is the Input Series as the first parameter (this is unrelated to your parameters).
              The order would be alphabetical at that point. For example: A, B, C, D.

              Please let me know if you have any questions.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by warreng86, 11-10-2020, 02:04 PM
              5 responses
              1,356 views
              0 likes
              Last Post NinjaTrader_Manfred  
              Started by Perr0Grande, Today, 08:16 PM
              0 responses
              3 views
              0 likes
              Last Post Perr0Grande  
              Started by elderan, Today, 08:03 PM
              0 responses
              5 views
              0 likes
              Last Post elderan
              by elderan
               
              Started by algospoke, Today, 06:40 PM
              0 responses
              10 views
              0 likes
              Last Post algospoke  
              Started by maybeimnotrader, Today, 05:46 PM
              0 responses
              12 views
              0 likes
              Last Post maybeimnotrader  
              Working...
              X