Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

CS1518 while porting indicator from Ninja 7 to 8

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

    CS1518 while porting indicator from Ninja 7 to 8

    Hi

    my previous NInja 7 code was something like this

    #region Properties

    [Description("balh")]
    [GridCategory("Parameters")]
    public int Aggression
    {
    get { return aggression; }
    set { aggression = Math.Max(1, Math.Min(3,value)); }
    }

    It doesnt compile in Ninja 8 like that.

    So i changed it to

    [Range(1, 3)]
    [NinjaScriptProperty]
    [Display(Name="Aggression", Description="Blah", Order=1, GroupName="Parameters")]
    public int aggression
    { get; set; }

    i still get that error. This is common with almost all the properties defined in the indicator. Would appriciate any help.
    Thanks!

    #2
    Hello sgkcfc,

    The range is between 1 and 3. Do you have a default value of 1 being assigned in State.DataLoaded?

    You have mentioned: "i still get that error. ". What is the error message you are getting? On what line is there? What is the code on that line?
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    633 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    364 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    105 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    567 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    568 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X