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

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 aussugardefender, Today, 01:07 AM
    0 responses
    3 views
    0 likes
    Last Post aussugardefender  
    Started by pvincent, 06-23-2022, 12:53 PM
    14 responses
    238 views
    0 likes
    Last Post Nyman
    by Nyman
     
    Started by TraderG23, 12-08-2023, 07:56 AM
    9 responses
    384 views
    1 like
    Last Post Gavini
    by Gavini
     
    Started by oviejo, Today, 12:28 AM
    0 responses
    4 views
    0 likes
    Last Post oviejo
    by oviejo
     
    Started by pechtri, 06-22-2023, 02:31 AM
    10 responses
    125 views
    0 likes
    Last Post Leeroy_Jenkins  
    Working...
    X