Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Default Enum Value not displaying

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

    Default Enum Value not displaying

    I've got an enum that I use as a drop down that I've defaulted to a value, but it seems to not use my default value.

    Is there something more I need to do to get default Enums to work?

    Code:
    public enum TF {	FALSE,TRUE	}

    Code:
    private TF 	fibretracement = TF.FALSE;


    Code:
    		[Description("Add Fibonacci Retracement")]
    		[Category(" A. MULTI-DIVERGENCE")]
    		public TF FibRetracement
    		{
    			get { return fibretracement; }
    			set { fibretracement = value; }
    		}
    This seems to still default me to TRUE instead of the defaulted FALSE.


    Thanks

    Matt

    #2
    tazatek,

    Hmm. Have you set a default for this script via the UI menu already? If so that would overwrite what you have in your code.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      possibly.... I forgot about that functionality. I might have set this while I was "playing".

      I've reset it and it works (as expected).

      Thanks

      Matt

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Hwop38, 05-04-2026, 07:02 PM
      0 responses
      172 views
      0 likes
      Last Post Hwop38
      by Hwop38
       
      Started by CaptainJack, 04-24-2026, 11:07 PM
      0 responses
      328 views
      0 likes
      Last Post CaptainJack  
      Started by Mindset, 04-21-2026, 06:46 AM
      0 responses
      252 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, 04-20-2026, 05:21 PM
      0 responses
      354 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by M4ndoo, 04-19-2026, 05:54 PM
      0 responses
      181 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Working...
      X