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 CarlTrading, 03-31-2026, 09:41 PM
      1 response
      128 views
      1 like
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      73 views
      1 like
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      116 views
      2 likes
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      109 views
      1 like
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      88 views
      0 likes
      Last Post CarlTrading  
      Working...
      X