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 Mindset, 04-21-2026, 06:46 AM
    0 responses
    88 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by M4ndoo, 04-20-2026, 05:21 PM
    0 responses
    134 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by M4ndoo, 04-19-2026, 05:54 PM
    0 responses
    68 views
    0 likes
    Last Post M4ndoo
    by M4ndoo
     
    Started by cmoran13, 04-16-2026, 01:02 PM
    0 responses
    118 views
    0 likes
    Last Post cmoran13  
    Started by PaulMohn, 04-10-2026, 11:11 AM
    0 responses
    67 views
    0 likes
    Last Post PaulMohn  
    Working...
    X