Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
OnBarUpdate Stops Updating
Collapse
X
-
Which instrument?
What time of day?
What is the bar type of the chart?
These questions are a bit rhetorical, but there is a
big difference, for ex, between Gold and Silver
futures, or the ES vs Cattle futures.
But, yeah, if you're talking about ES in the mid-morning,
you may have a problem.
-=o=-
Since we're talking Strategy, you might want to add some
debugging prints to make sure you print something for
every bar processed.
-=o=-
The most common explanation is a pretty easy one:
There are simply very few to no ticks happening.
I mean, if there is very little buy/sell activity, which can
happen during off hours, esp for certain instruments,
then OnBarUpdate() might fire much less often, esp on
tick based bar charts, such as Tick, Range, Renko, etc.
Just my 2˘.
-
Thanks for your response.
It IS ES -- Range Charts. This can happen any time of day, but it's not due to lack of ticks. Price movement continues. My tick counter stays stuck at last number. The only bars I don't process are the ones following the end of my bar updates.
Comment
-
Hello Doctor JR,
Thank you for your post.
I agree with bltdavid's suggestion of adding debugging prints.
In order to better understand how the code is working, it will be necessary to use Print to see how the conditions are evaluating.
Below is a link to a forum post that demonstrates using prints to understand behavior and includes a link to a video recorded using the Strategy Builder to add prints.
The prints should include the time of the bar and should print all values from all variables and all hard coded values in all conditions that must evaluate as true for an action to be triggered. It is very important to include a text label for each value and for each comparison operator in the print to understand what is being compared in the condition sets.
Let me know if you need any assistance creating a print.
Save the output from the output window to a text file and provide this with your reply.
I'll be happy to assist with analyzing the output.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
596 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
343 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
103 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
556 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
554 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment