Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

region variables/properties not recognized

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

    region variables/properties not recognized

    Watching the NT strategy video we are asked to create 'User Defined Inputs' something like this:
    private int rSIPeriod = 7; // Default setting for RSIPeriod
    private int stochDPeriod = 14; // Default setting for StochDPeriod
    private int mACDPeriod = 12; // Default setting for MACDPeriod
    private int aTMPeriod = 1; // Default setting for ATMPeriod
    private int smooth = 3; // Default setting for Smooth

    Yet when I go to compile it says these are not recognized (RSIPeriod, StochDPeriod, etc.) Is upper/lower case the cause or something else?

    #region Variables
    // Wizard generated variables
    private int rSIPeriod = 7; // Default setting for RSIPeriod
    private int stochDPeriod = 14; // Default setting for StochDPeriod
    private int mACDPeriod = 12; // Default setting for MACDPeriod
    private int aTMPeriod = 1; // Default setting for ATMPeriod
    private int smooth = 3; // Default setting for Smooth
    // User defined variables (add any user defined variables below)
    #endregion

    or

    #region Properties
    [Description("RSI period")]
    [GridCategory("Parameters")]
    public int RSIPeriod
    {
    get { return rSIPeriod; }
    set { rSIPeriod = Math.Max(1, value); }

    #2
    cowboy, with both parts in, it should compile fine. You would need to have both the variable declaration and public property, in your posted code you want to take extra care to ensure the closing bracket is added for your property i.e.

    [Description("RSI period")]
    [GridCategory("Parameters")]
    public int RSIPeriod
    {
    get { return rSIPeriod; }
    set { rSIPeriod = Math.Max(1, value); }
    }

    Probably just an issue as you copied it out of the region....

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    649 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    370 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    109 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    573 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    576 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X