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 FilesJimNinjaTrader Customer Service
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by Javierw.ok, Today, 04:12 PM
|
0 responses
2 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
|
||
Started by alifarahani, Today, 09:40 AM
|
6 responses
40 views
0 likes
|
Last Post
by alifarahani
Today, 03:18 PM
|
||
Started by Waxavi, Today, 02:10 AM
|
1 response
18 views
0 likes
|
Last Post Today, 03:03 PM | ||
Started by Kaledus, Today, 01:29 PM
|
5 responses
15 views
0 likes
|
Last Post Today, 02:56 PM |
Comment