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!
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
NinjaTrader
Error on calling 'OnBarUpdate' method on bar 5856
Collapse
X
-
Hello ppau2004,
The 5856 would be the CurrentBar at the time of the error. That just is to give an idea how many bars processed before seeing the error.
Checking a condition like you have shown is not likely the best way to try and debug this type of error as the bar number is likely going to be variable depending on the chart settings or data being used.
What you can do is first find what line is causing the error so we can see whats being used at that time. If you have a lot of code in OnBarUpdate it would help to start by commenting out some of that code and see if that lets the script work. If it does, uncomment some of that and find where it stops working. Once you know the line or general area that throws the error we can look at that and see what may be causing the error to happen.
Also if there was more to the error that may be relevant, if so please provide that in your next post.
I look forward to being of further assistance.
-
Error on calling 'OnBarUpdate' method on bar 5856
While testing my NinjaScript, I got an error message: Error on calling 'OnBarUpdate' method on bar 5856....
Could you please tell me what does that 5856 mean? Is that a property of Bar object?
e.g. I would like to do:
if (bar.index==5856)
{
//some code to test the error
//print ("Debug: varX =" +x );
}Tags: None
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by jaybedreamin, Today, 05:56 PM
|
0 responses
3 views
0 likes
|
Last Post
by jaybedreamin
Today, 05:56 PM
|
||
Started by DJ888, 04-16-2024, 06:09 PM
|
6 responses
18 views
0 likes
|
Last Post
by DJ888
Today, 05:12 PM
|
||
Started by Jon17, Today, 04:33 PM
|
0 responses
1 view
0 likes
|
Last Post
by Jon17
Today, 04:33 PM
|
||
Started by Javierw.ok, Today, 04:12 PM
|
0 responses
6 views
0 likes
|
Last Post
by Javierw.ok
Today, 04:12 PM
|
||
Started by timmbbo, Today, 08:59 AM
|
2 responses
10 views
0 likes
|
Last Post
by bltdavid
Today, 04:10 PM
|
Leave a comment: