I would like to know if it is possible to set strategy tester to always start testing on the last completed bar on the chart, like Daily period if we choose today date to start. I need it especially for 5 and 15 min time frame. I have already try to set max bars in the chart to 1 or 2 in chart options, but strategy tester doesn't work then,it's probably too less bars to test I guess. Please let me know if there is any EA or script or any other way to do that. If there is no way to do that maybe there is a way to set custom start date like 04.05.2016 17:45 min. I would really appreciate any ideas.
In the Strategy Tester, you cannot specify the starting bar, only the Starting Date (thus it will always start on the first bar of that day).
However, you can just place a very simple condition in your "OnTick()" event so that it only starts processing after a certain start date/time like so:
input datetime dtStartTesting = D'2016.05.04 17:45';
if( TimeCurrent() < dtStartTesting ) return;
// Rest of code ...
To add comments, please log in or register