Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to keep the selected enum variables ?

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

    How to keep the selected enum variables ?

    Hello,

    I am not too much familiar with public enum variables.
    I am using the Pivots indicator where there are two sets of public enum variables :
    Code:
    [TypeConverter("NinjaTrader.Custom.ResourceEnumConverter")]
    public enum HLCCalculationMode
    {
        CalcFromIntradayData,
        DailyBars,
        UserDefinedValues
    }
    
    [TypeConverter("NinjaTrader.Custom.ResourceEnumConverter")]
    public enum PivotRange
    {
        Daily,
        Weekly,
        Monthly,
    }
    The problem I have is those variables are reset to their primary default (1st choice of their respective list) every time I reload the Ninjascript (F5) or when I add a new indicator, or sometimes when I reload historical data or opening the tab in the morning ...

    For example, if I chose "DailyBars" or "Weekly", the indicator come back to "CalcFromIntradayData" or "Daily".

    Is there any possibility to keep stored my choice ?
    I am ready to copy the script in a custon indicator.

    Thanks

    #2
    Hello alizes,

    Thank you for writing in.

    With the current release there is a bug with enums being reset back to their default values after a compile and a refresh of the chart.

    This should be resolved in release NT8 R7 and you can track the fix in the release notes section of our helpguide under ID 11504.

    Please let us know if you need further assistance.
    Alan P.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

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