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