Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

value is in range but NT says it's not in range

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

    value is in range but NT says it's not in range

    Hi,
    Please see attached screenshot of error. The values are in allowed int range but NT rejects.
    thanks,
    David
    Attached Files

    #2
    Hello David,

    Thanks for your post.

    I have moved your thread post to the Strategy Development section of the Forums since your inquiry is related to a custom NinjaScript strategy.

    Are you assigning a default value greater than 0 to the xBars input in State.SetDefaults in your strategy?

    If not, assign a default value greater than 0 to 'xBars' in OnStateChange() when the State == State.SetDefaults.

    Have you added debugging prints throughout the strategy to determine how 'xBar' is evaluating in your script?

    To understand how a script is behaving, prints should be added throughout the script that print out the variable in question to see how it is behaving.

    Below is a link to a forum post that demonstrates how to use prints to understand behavior.
    https://ninjatrader.com/support/foru...121#post791121
    <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by NullPointStrategies, 03-13-2026, 05:17 AM
    0 responses
    88 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    151 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    80 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    53 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    62 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X