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

Error on calling 'OnBarUpdate'

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

    Error on calling 'OnBarUpdate'

    I have a custom indicator that was converted from NT7 to NT8, it compiles ok but when applied to a chart, I keep getting the error "Error on calling 'OnBarUpdate' method on bar 50. Index was outside the bounds of the array". I have not been able to get this error to go away. I don't know what I'm missing. Any help would be appreciated. The source code is attached for reference
    Attached Files

    #2
    Hello mlarocco,

    Below is a link to a forum post on indexing errors.
    Hello, I want to create an indicator that show data in a chart but calculate in other charttime different to the time of the chart where is showed. For example:


    Indexes for collections like series or arrays appear like this [1]. This would be an index of 1, or the second element in the collection (as collection indexes start with 0).

    The next step is to identify which index is invalid.

    What is the line of code causing the error in your script?
    (Comment out all of the code until the error stops, uncomment one line at a time and test to see which line causes the error to return)​

    What indexes are used on that line?
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by rhyminkevin, Today, 04:58 PM
    1 response
    41 views
    0 likes
    Last Post Anfedport  
    Started by iceman2018, Today, 05:07 PM
    0 responses
    5 views
    0 likes
    Last Post iceman2018  
    Started by lightsun47, Today, 03:51 PM
    0 responses
    7 views
    0 likes
    Last Post lightsun47  
    Started by 00nevest, Today, 02:27 PM
    1 response
    14 views
    0 likes
    Last Post 00nevest  
    Started by futtrader, 04-21-2024, 01:50 AM
    4 responses
    49 views
    0 likes
    Last Post futtrader  
    Working...
    X