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 CarlTrading, 03-31-2026, 09:41 PM
      1 response
      72 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      39 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      63 views
      2 likes
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      63 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      53 views
      0 likes
      Last Post CarlTrading  
      Working...
      X