OK, we’re getting closer! A little sleep helps, and fuzzy’s PMs also help
First of all the first line of code I posted above was complete nonsense:
datetime serverTime = Time;
Replace it with
datetime serverTime = TimeCurrent();
and things might work!
During backtest calendar XML files were not being created in the \tester\files folder. That’s why the calendar did not work initially. After copying files manually, and with the above change in my code, the calendar basically works, see screenshot.
Now one of the remaining problems is performance: backtesting one single day took about 7 minutes on a fast XEON. I tried to reduce file read frequency, but no change so far.
Attachments:You must be logged in to view attached files.
A good trader is a realist who wants to grab a chunk from the body of a trend, leaving top- and bottom-fishing to people on an ego trip. (Dr. Alexander Elder)