Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strange Bug with Indicator Parameter Section Fields and Enum's

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

    Strange Bug with Indicator Parameter Section Fields and Enum's

    I have just spent the past hours pulling my hair out trying to understand why the following two snippets from some indicators would compile or not.

    Before I show them, I have a set custom public Enum's in the UserDefinedMethods Class (I have changed the enum name in the samples below).

    The first snippet compiles perfectly:

    Code:
    [Description("Custom Enum Type"), Category("Parameters")]
    [NinjaTrader.Gui.Design.DisplayName("PressureCalculation Type")]
    public CustomTypes CustomType
    {
                get { return this.customType; }
                set { this.customType = value; }
    }
    Note the order/layout of the "[Description("") ...] tag.

    The second snipped will not compile at all and I get errors at not being able to find the Enum (are you missing the assembly error).

    Code:
    [Description("Custom Enum Type")]
    [Category("Parameters")]
    [NinjaTrader.Gui.Design.DisplayName("PressureCalculation Type")]
    public CustomTypes CustomType
    {
                get { return this.customType; }
                set { this.customType = value; }
    }
    Simply splitting the Description and Category fields causing the compile to fail. Why would you care you may ask??

    Well functionally who cares, but when trying to use Intellisence to allow to me easily add indicators in other indicators and strategies, it works fine with the second snippet, but will not correctly show the methods with the first.

    Maybe it is something I am doing wrong here, but I can reproduce this easily now - including after restarting NT several times.

    #2
    dnuff, thanks for posting - I'm not sure if this is a supported use of enums, will need to check with development on this and will update this thread.

    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
    549 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X