Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Encapsulating Enuns

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

  • NinjaTrader_ZacharyG
    replied
    Hello GKonheiser,

    We'll be continuing our discussion through the support emails per your recent email.

    Leave a comment:


  • GKonheiser
    replied
    Hi Zac,

    I have now declare the enum in the user defined strategy file and implemented as you suggested but im getting the error:

    The type or namespace name 'DevBase' could not be found (are you missing a using directive or an assembly reference?)

    Leave a comment:


  • GKonheiser
    replied
    Hi Zac,

    I have now declare the enum in the user defined strategy file and implemented as you suggested but im getting the error:

    The type or namespace name 'DevBase' could not be found (are you missing a using directive or an assembly reference?)

    Leave a comment:


  • NinjaTrader_ZacharyG
    replied
    Hello GKonheiser,

    Thank you for your inquiry.

    You would need to make this enum public. You can then create a private IBase variable.

    Example:
    Code:
    // outside of your class
    public enum IBase { wma, sma, linReg };
    
    // inside of your class
    private IBase iBase = IBase.wma;
    
    #region Properties
    public IBase TheIBase
    {
         get { return iBase; }
         set { iBase = value; }
    }
    Please, let us know if we may be of further assistance.

    Leave a comment:


  • GKonheiser
    started a topic Encapsulating Enuns

    Encapsulating Enuns

    Morning

    If I have a private emun,

    Code:
    private enum iBase{wma,sma,linReg};
    what is the correct way to encapsulate it so the properties are exposed in the UI?

Latest Posts

Collapse

Topics Statistics Last Post
Started by i2w8am9ii2, Today, 06:29 PM
1 response
3 views
0 likes
Last Post NinjaTrader_EricB  
Started by Kirk Thorns, Today, 05:34 PM
0 responses
6 views
0 likes
Last Post Kirk Thorns  
Started by JobDjassem, Today, 05:24 PM
0 responses
9 views
0 likes
Last Post JobDjassem  
Started by Kirk Thorns, Today, 05:06 PM
0 responses
11 views
0 likes
Last Post Kirk Thorns  
Started by CyberNate, Today, 03:11 PM
5 responses
29 views
0 likes
Last Post CyberNate  
Working...
X