I ask because sometimes my strategy analyzer gives me an error in the log that says "Error on calling 'OnBarUpdate' method on bar 1696"; But the error occurs BEFORE anything prints from my Print(Time[0]) statement. How can that be? I'd expect to have 1695 Print statements executed before getting an error on bar 1696.
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
understanding steps in strategy analyzer
Collapse
X
-
understanding steps in strategy analyzer
When I run strategy analyzer with a Print(Time[0]) in OnBarUpdate, I notice it doesn't start printing to the screen until about 5 minutes into the strategy analyzer. What is occurring in that 5 minutes?
I ask because sometimes my strategy analyzer gives me an error in the log that says "Error on calling 'OnBarUpdate' method on bar 1696"; But the error occurs BEFORE anything prints from my Print(Time[0]) statement. How can that be? I'd expect to have 1695 Print statements executed before getting an error on bar 1696.Tags: None
-
Hello YD777,
Thanks for opening the thread.
The prints should occur as OnBarUpdate() is being iterated in the Strategy Analyzer.
It could be that you are loading a large amount of data before the Strategy Analyzer begins calling OnBarUpdate(). I would suggest to test with a smaller period of time to see if your prints still take as long to show up in the output window.
I have attached a very simple strategy that prints to the output window and does some very simple trades. I tested this with a Time frame from January 1 2017 to May 31st 2017. I observed that the prints did not occur when data was loading, but were printing while the Strategy Analyzer was reporting "Running backtest on ES 06-17 ..."
I've created a video demonstrating as well: https://www.screencast.com/t/kFV2Iipj
Please let me know if I may be of further assistance.Attached Files
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by CarlTrading, Yesterday, 09:41 PM
|
1 response
15 views
0 likes
|
Last Post
|
||
|
Started by CarlTrading, Today, 02:41 AM
|
0 responses
6 views
0 likes
|
Last Post
by CarlTrading
Today, 02:41 AM
|
||
|
Started by CaptainJack, Yesterday, 11:44 PM
|
0 responses
17 views
0 likes
|
Last Post
by CaptainJack
Yesterday, 11:44 PM
|
||
|
Started by CarlTrading, 03-30-2026, 11:51 AM
|
0 responses
32 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:51 AM
|
||
|
Started by CarlTrading, 03-30-2026, 11:48 AM
|
0 responses
31 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:48 AM
|

Comment