Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Variable Not Optimizable

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

    Variable Not Optimizable

    Having issue with Optimization. I created a variable, but in Optimization section it doesn't appear. What I'm doing wrong?
    In another strategy the same code works great.
    Help please.

    Code:
    Code:
            [Display(ResourceType = typeof(Custom.Resource), Name = "SL", GroupName = "4. Orders", Order = 3)]
            [NinjaScriptProperty]
            public int SlSize
            {
                get;
                set;
            }
    The same code but with another variable is working fine in this Strategy (look screenshot):


    Code:
            [NinjaScriptProperty]
            [Display(Name="Period HMA", Order=2, GroupName="1. Symbol Parameters")]
            public int Period
            { get; set; }
    Captured with Lightshot

    #2
    Hello YevhenShynkarenko,

    I tried this property in a strategy and can see it listed, are you certain you have compiled this change in? Have you also tested closing the analyzer and re opening it?

    The only item I can see is that you used the ResourceType and that is not needed for your custom properties but this would not cause it to be hidden. You can simplify it like your other property:

    Code:
    [Display(Name = "SL", GroupName = "4. Orders", Order = 3)]
    [NinjaScriptProperty]
    public int SlSize { get; set; }

    I look forward to being of further assistance.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    42 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    20 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    29 views
    1 like
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    46 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    38 views
    0 likes
    Last Post CarlTrading  
    Working...
    X