Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Error on calling OnBarUpdate

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

    Error on calling OnBarUpdate

    I get this error message when I try to use prints:

    Error on calling "OnBarUpdate" method on bar 482: Index (zero based) must be greater than or equal to zero and than the size of the argument list.

    What does this mean?

    Thanks.

    #2
    Hello AdeptistJune,

    Thanks for your post.

    This error can be seen when using String.Format. You would need to ensure that you are supplying arguments to String.Format with {0} {1} {2} etc. For example, if you are printing out 2 values, you would need to reference {0} and {1} for two formatting arguments

    Ultimately, you would need to debug the script to find the exact line of code that triggers the error in question.

    Below is a link to a forum post that demonstrates using prints to understand behavior.
    https://ninjatrader.com/support/foru...121#post791121

    Let us know if we may assist further.


    <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


      #3
      Thanks,

      I figured it out last night.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      557 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      324 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      101 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      545 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      547 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X