I have the same issue/query. Anyone have any ideas on how to get the tester to delay its startup until after the login credentials have been validated? (when tester is started by way of command line) The issue I have is that the tester will compile an fxt file before the hst data has been updated (doesn't update until the account has logged into the server). Thus the history file used for the backtest is outdated from the outset of the backtesting session.
Hi Gordon, yep it is fully automated, I've thought about the possibility of copying the hst file but the question is where to get the up-to-date hst file? MT4 doesn't commit the history data to the hst file until the MT4 terminal closes, until then it is all memory resident. So I'd need to open a terminal, have it stay open for some indeterminant period of time such that all the hst files were updated, have the terminal close, then copy the hst files to where I need them (or reopen the terminal yet again to start the backtest). It seems like an odd flaw, launch the terminal to do a backtest but don't let the tester have the chance to acquire and use any recent price data.
[...] MT4 doesn't commit the history data to the hst file until the MT4 terminal closes, until then it is all memory resident.
gordon, I'm assuming it's something that would be straight-forward to implement by way of just modifying the existing Period Converter script, does this seem like a reasonable starting point?
Hi gordon, I think I may have a workable solution as you outlined by way of making some minor adaptions to some existing period converter code I have. One question I have is based on the differences, if any, between accessing data by way of Open versus iOpen(). From my experience working with charts I gather that when the Open function is called the data returned is data which is currently only resident in memory (ram) and is not data queried from or pulled out of the hst file as currently existing on the hard-drive. What about iOpen()? Does it access historical data that is currently memory-resident or does it bypass the memory-resident data that has yet to be committed to disk and instead it opens and reads the hst data from the file on the hard-drive? I know I can code and verify, but figured I'd ask just in case there was an obvious answer akready out there.
[...] What about iOpen()? Does it access historical data that is currently memory-resident or does it bypass the memory-resident data that has yet to be committed to disk and instead it opens and reads the hst data from the file on the hard-drive?
iOpen() will trigger an updating of the history from the server, but it will always return immediately and return invalid data until history is fully loaded. After it is fully loaded iOpen() will serve the data from memory and continually update the memory, it will act like if you had just opened an invisible chart (very similar to an iCustom() call).
Please enable the necessary setting in your browser, otherwise you will not be able to log in.