Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Error on loading NT

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

    Error on loading NT

    I keep getting a warning when I boot up NT that says one of my custom indicator NT properties is out of range. I have the range set where I want it and I have set the property to an in-range value within the body of OnStateChange() State==State.SetDefaults. What else do I need to do to stop this error message coming up every time I load NT?

    [NinjaScriptProperty]
    [Range(.1, int.MaxValue)]
    [Display(Name="ATR multiplier", Description="Determines box height", Order=1, GroupName="Parameters")]
    public double atrMultiplier
    { get; set; }

    #2
    Hi Chippy, thanks for posting. The MaxValue should be double.MaxValue because int.MaxValue goes higher than what a double-precision variable can store. If your getting this error it means it's not being set at all or it's being set to an illegal value. You would need to reduce the script down a bit to find the exact cause of the error message.

    Kind regards,
    -ChrisL

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    156 views
    1 like
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    90 views
    1 like
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    140 views
    2 likes
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    130 views
    1 like
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    107 views
    0 likes
    Last Post CarlTrading  
    Working...
    X