Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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 Kaledus, Today, 01:29 PM
    0 responses
    0 views
    0 likes
    Last Post Kaledus
    by Kaledus
     
    Started by PaulMohn, Today, 12:36 PM
    1 response
    14 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Started by yertle, Yesterday, 08:38 AM
    8 responses
    36 views
    0 likes
    Last Post ryjoga
    by ryjoga
     
    Started by rdtdale, Today, 01:02 PM
    1 response
    6 views
    0 likes
    Last Post NinjaTrader_LuisH  
    Started by alifarahani, Today, 09:40 AM
    3 responses
    17 views
    0 likes
    Last Post NinjaTrader_Jesse  
    Working...
    X