Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

[Range(0, 1), NinjaScriptProperty] - Entering .001 throws Error

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

    [Range(0, 1), NinjaScriptProperty] - Entering .001 throws Error

    Error Message:
    Value of property 'a' of NinjaScript 'b' is .001 and not in the valid range between 0.01 and 2147483647

    Setup
    [Range(0, 1), NinjaScriptProperty]
    [Display(ResourceType = typeof(Custom.Resource), Name = "a", GroupName = "Swing", Order = 2)]
    public double testVar
    { get; set; }

    Entering .01 works as expected.

    #2
    Hello bmdenton23,

    Thank you for your note.

    I've tested setting this just as you have there, and I'm not getting the same error when I apply it to the chart and put in 0.001 or .001.

    What version of NinjaTrader 8 are you using? You can find this under Help > About. If it's anything other than 8.0.20.1, you'll want to update first before we do more digging so we can eliminate it being an issue resolved by a previous update.

    To update NinjaTrader, please follow the steps below:
    • First, copy your license key from NinjaTrader under Help> License Key then exit NinjaTrader
    • Click on the link: http://ninjatrader.com/PlatformDirect
    • Enter your license key and press Submit
    • Select 'NinjaTrader 8'
    • Select 'Download'
    • Critical: Before running the installer, ensure NinjaTrader is closed.
    Once you've made sure you're up to date, you can import this test indicator called aaaTestRange. It'll print the value of testVar that you set in the indicator preferences to the bottom right corner of the chart. Does this work as expected on your installation?

    Thanks in advance; I look forward to assisting you further.
    Attached Files

    Comment


      #3
      NinjaTrader_Kate Thanks for your reply. I got too focused on believing there was a NT bug. I was passing the variable into the constructor of another Indicator which in turn passed the variable into the constructor of a 3rd Indicator, the third of which had a minimum range of 0.01. The NT error message even specified the third indicator but due to the similar indi name I overlooked it. Problem solved, thanks for your help.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by argusthome, Yesterday, 10:06 AM
      0 responses
      17 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      16 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      14 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      9 views
      0 likes
      Last Post TheRealMorford  
      Started by Mindset, 02-28-2026, 06:16 AM
      0 responses
      38 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Working...
      X