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

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Hwop38, 05-04-2026, 07:02 PM
    0 responses
    160 views
    0 likes
    Last Post Hwop38
    by Hwop38
     
    Started by CaptainJack, 04-24-2026, 11:07 PM
    0 responses
    307 views
    0 likes
    Last Post CaptainJack  
    Started by Mindset, 04-21-2026, 06:46 AM
    0 responses
    245 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    348 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    178 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Working...
    X