Hi,
Are memory locations for initialize and execute fixed in streaming mode from run to run.
By run I mean (init + execs) say once a minute.
I was assuming these functions were reloaded at each bars update.
I was surprised to see FileWatcher file changed event handler taken.
Thanks!
Are memory locations for initialize and execute fixed in streaming mode from run to run.
By run I mean (init + execs) say once a minute.
I was assuming these functions were reloaded at each bars update.
I was surprised to see FileWatcher file changed event handler taken.
Thanks!
Rename
In Streaming mode, at the end of an interval another bar is added to the BarHistory and the Strategy is run as shown in the Backtesting Process Diagram. Each block's method like Initialize and Execute() are further explained below the diagram.
It appears that, in streaming mode, variables that are defined to be static in the definitions area persist from run to run. In other words, it seems (so far as this point is concerned) a streaming strategy (many back test runs during a market session) does not re-initialize such variables to values set in the definitions area. It initializes only once at the beginning. This is a good thing and I hope it does not change. The alternative is to save vars that are desired to persist during a session in a file or in globals. If you chop this file int parts so as not to have a very large file then there is the problem of where to keep the file name from run to run. I define the current file name as a static variable and it persists.
In summaru static variables defined in the definitions area
a) Are re-initialized in a back test run for each back test run
b) Are initialized in the first back test run in streaming mode. From then on values assigned during various back test runs throughout the session are kept.
In summaru static variables defined in the definitions area
a) Are re-initialized in a back test run for each back test run
b) Are initialized in the first back test run in streaming mode. From then on values assigned during various back test runs throughout the session are kept.
Your Response
Post
Edit Post
Login is required