• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Indicator signature

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

    Indicator signature

    I have the following indicator code where the parameters are declared in the order int period, double breakOutLimit. In the generated code the order in the parameter signature is double breakOutLimit, int period and the indicator fails to compile when I call the indicator with the order int, double.

    Does this mean the parameters are always reversed from how they are declared or are they randomized.

    #region Properties
    [Browsable(false)]
    // this line prevents the data series from being displayed in the indicator properties dialog, do not remove
    [XmlIgnore()]
    // this line ensures that the indicator can be saved/recovered as part of a chart template, do not remove
    public DataSeries Plot0
    {
    get
    {
    return Values[0];
    }
    }

    [Description("")][GridCategory("Parameters")]
    public int Period
    {
    get
    {
    return period;
    }
    set
    {
    period = Math.Max(3, value);
    }
    }

    [Description("")][GridCategory("Parameters")]
    public double BreakOutLimit
    {
    get
    {
    return breakOutLimit;
    }
    set
    {
    breakOutLimit = Math.Max(0, value);
    }
    }
    #endregion
    ************************************************** ********************
    public aslope aslope(double breakOutLimit, int period)
    {
    return aslope(Input, breakOutLimit, period);
    }

    /// <summary>
    /// Enter the description of your new custom indicator here
    /// </summary>
    /// <returns></returns>
    public aslope aslope(Data.IDataSeries input, double breakOutLimit, int period)
    {

    #2
    bjmoose, it would be alphabetical per default that's correct. You can sequence them though differently for the UI display with this tip - http://www.ninjatrader.com/support/f...ead.php?t=4770
    BertrandNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by rainbow47, Today, 06:10 AM
    0 responses
    3 views
    0 likes
    Last Post rainbow47  
    Started by stenberg98, Today, 04:53 AM
    2 responses
    7 views
    0 likes
    Last Post NinjaTrader_Marco  
    Started by wukefuha, Today, 03:20 AM
    1 response
    6 views
    0 likes
    Last Post NinjaTrader_Marco  
    Started by mbcmbc, Yesterday, 10:12 PM
    1 response
    9 views
    0 likes
    Last Post NinjaTrader_ChrisSch  
    Started by fx.practic, Today, 03:44 AM
    1 response
    14 views
    0 likes
    Last Post NinjaTrader_Marco  
    Working...
    X