When running the strategy analyzer and printing the date to the output window at every entry to onbarupdate, I expected dates to appear for every day and only once and then the run would cease ... sequentially from time frame start to end date. However the start to end date cycle is repeated, accompanied by a few other additional confusing aspects. I can live with it but would like to know why.
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Strategy Analyzer appears to recycle from start to end date?
Collapse
X
-
Strategy Analyzer appears to recycle from start to end date?
Why does the following happen?
When running the strategy analyzer and printing the date to the output window at every entry to onbarupdate, I expected dates to appear for every day and only once and then the run would cease ... sequentially from time frame start to end date. However the start to end date cycle is repeated, accompanied by a few other additional confusing aspects. I can live with it but would like to know why.
Tags: None
-
for the indicator---
public string format1="MM/dd/yyyy HH:mm";
public string format2="HH:mm";
Print("entered LV3indicator OnBarUpdate"
+" "+Time[0].ToString(format1)
+"//"+Time[0].ToString(format2)
+" "+Time[0].DayOfWeek);
for the strategy---
public string format1="MM/dd/yyyy HH:mm";
public string format2="HH:mm";
Print("entered LV3strategy OnBarUpdate"
+" "+Time[0].ToString(format1)
+"//"+Time[0].ToString(format2)
+" "+Time[0].DayOfWeek);
Comment
-
Thanks. Which timeframe are you testing on? OnBarUpdate() is called for each bar, so each bar in the day will trigger this print then. To see the sequence better, add for example the CurrentBar processed info in -
Print("entered LV3strategy OnBarUpdate" +" Bar " + CurrentBar + " " +Time[0].ToString(format1) +"//"+Time[0].ToString(format2) +" "+Time[0].DayOfWeek);
Comment
-
the time frame is one day however the indicator [written for me by Lance] works with two time frames to make getdaybar work the way I want it to. I have no idea how or what he did. but it does not seem like that would cause the recycling thru the start/stop time frame window.
see attachments
Comment
-
per post #1
"Why does the following happen?
When running the strategy analyzer and printing the date to the output window at every entry to onbarupdate, I expected dates to appear for every day and only once and then the run would cease ... sequentially from time frame start to end date. However the start to end date cycle is repeated, accompanied by a few other additional confusing aspects. I can live with it but would like to know why."
so I think I understand that duplicate calls should be expected as the analyzer run progresses. my question is ... why does the analyzer run from start date to end date, and then repeats that cycle?
Comment
-
duplicate calls make sense to me, no prob there. that is not my concern. I just still don't understand why the analyzer runs from start date to end date more than once? but no matter, I think the print to output window as it is will serve my debugging/checking/tracing purposes.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by NullPointStrategies, Today, 05:17 AM
|
0 responses
50 views
0 likes
|
Last Post
|
||
|
Started by argusthome, 03-08-2026, 10:06 AM
|
0 responses
126 views
0 likes
|
Last Post
by argusthome
03-08-2026, 10:06 AM
|
||
|
Started by NabilKhattabi, 03-06-2026, 11:18 AM
|
0 responses
68 views
0 likes
|
Last Post
|
||
|
Started by Deep42, 03-06-2026, 12:28 AM
|
0 responses
42 views
0 likes
|
Last Post
by Deep42
03-06-2026, 12:28 AM
|
||
|
Started by TheRealMorford, 03-05-2026, 06:15 PM
|
0 responses
46 views
0 likes
|
Last Post
|

Comment