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

[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
    Kate W.NinjaTrader Customer Service

    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 thumper57, Today, 04:30 PM
      0 responses
      3 views
      0 likes
      Last Post thumper57  
      Started by OllieFeraher, 05-09-2024, 11:14 AM
      5 responses
      16 views
      0 likes
      Last Post MisterTee  
      Started by jackiegils, Yesterday, 11:05 PM
      1 response
      10 views
      0 likes
      Last Post marcus2300  
      Started by Skifree, Today, 02:50 PM
      0 responses
      8 views
      0 likes
      Last Post Skifree
      by Skifree
       
      Started by owen5819, Today, 02:24 PM
      1 response
      12 views
      0 likes
      Last Post owen5819  
      Working...
      X