Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

MaEnvelopes set user-defined value

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

    MaEnvelopes set user-defined value

    i'd like to be able to enter the value for "envelopePercentage".

    The examples I have are for integers:
    #region Properties
    /// <summary>
    /// </summary>
    [Description("Period for fast MA")]
    [GridCategory("Parameters")]
    public int Fast
    {
    get { return fast; }
    set { fast = Math.Max(1, value); }
    }
    #endregion

    Can someone update these lines for the %? I think it is Double, but I'm still getting errors.

    #2
    Hello PLeary,

    That is correct, you would have to use a Double for this so that you can have a decimal value.

    Here is a link to our Help Guide that goes over the different variable types that you may view.


    Code:
    #region Variables
                private double myInput0 = 1; // Default setting for MyInput0
    #endregion
    
    
    #region Properties
    
    [Description("Double Variable")]
    [GridCategory("Parameters")]
    public double MyInput0
    {
          get { return myInput0; }
          set { myInput0 = Math.Max(0.001, value); }
    }
    #endregion
    JCNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    571 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    331 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    101 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    549 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    550 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X