Hey guys,
I'm not sure about other platforms, but I'll ask based on how mt4/mt5 works.
Here's the definition of the start function:-
In EAs, start() is called (and executed) immediately after a new tick comes. If a new tick has come during the execution of start(), this tick will be ignored, that is start() will not be called for execution when such a tick comes. All quotes received during the execution of start() will be ignored. The commencement of start() for execution is performed by the client terminal only, provided the previous operation session has been completed, the control has been returned to the client terminal, and start() is waiting for a new tick.
My question: Does this mean that backtesting in strategy tester actually operate the EA's algorithms without fail for each and every tick? Or is there some kind of internal simulation which ignores ticks in some set frequency?
Regards
Kevin Wong
Backtesting with tick data. How does it work?
-
ticktrader
- Posts: 2
- Joined: Fri Nov 20, 2015 2:28 pm
Re: Backtesting with tick data. How does it work?
Hi Ticktrader,
We interpret that the MT4 manual is saying that in live situations, every tick is not guaranteed to be processed. This means that if your execution code in the start()/ontick() code is lengthy, you potentially will miss out of processing ticks if they come in in quick succession.
As for back-testing, as far as we understand, all ticks are being processed sequentially. You can obviously test this out by placing an incremental counter and seeing whether it matches with the ticks in the final report.
Hope this helps.
We interpret that the MT4 manual is saying that in live situations, every tick is not guaranteed to be processed. This means that if your execution code in the start()/ontick() code is lengthy, you potentially will miss out of processing ticks if they come in in quick succession.
As for back-testing, as far as we understand, all ticks are being processed sequentially. You can obviously test this out by placing an incremental counter and seeing whether it matches with the ticks in the final report.
Hope this helps.
-
ticktrader
- Posts: 2
- Joined: Fri Nov 20, 2015 2:28 pm
Re: Backtesting with tick data. How does it work?
Got it. Thanks!
This would be off-topic - but is there a way to change the location of the files generated for testing on a different drive/folder for the mt4 platform's strategy tester? The files generated are rather large it would be better if I can have mt4's strategy tester somehow look into another directory. I've the MT4 installation folder on drive D, but somehow the MT4 Data Folder is in the default C drive. Seems like Tickstory automatically points to the folder as well once I pointed it to my MT4 Installation folder. the Sorry I had to ask here as there seems to be no questions of such nature on google
This would be off-topic - but is there a way to change the location of the files generated for testing on a different drive/folder for the mt4 platform's strategy tester? The files generated are rather large it would be better if I can have mt4's strategy tester somehow look into another directory. I've the MT4 installation folder on drive D, but somehow the MT4 Data Folder is in the default C drive. Seems like Tickstory automatically points to the folder as well once I pointed it to my MT4 Installation folder. the Sorry I had to ask here as there seems to be no questions of such nature on google
Re: Backtesting with tick data. How does it work?
Hi Ticktrader,
MT4 automatically places the data in your Windows-defined user "AppData" directory location. You can override this by working in "portable mode" which will force MT4 to store the data in the installation folder instead.
To do this, in Tickstory go to File->Settings->MT4 Settings and specify the command-line parameter "/portable" (without the quotes). Then launch MT4 and set it up as usual (you will need to log in once, etc - or you could copy over the files from your existing Data directory). Once this is complete, you should be able to reset the Installation folder in Tickstory and have it detect the new Data directory (you may need to remove the old Data directory if it causes any issues).
Obviously to work in portable mode, you need to make sure that the installation folder is not in a protected location such as "Program Files (x86)", but instead somewhere like "D:\Metatrader" or new folder that you have created.
Hope this helps.
MT4 automatically places the data in your Windows-defined user "AppData" directory location. You can override this by working in "portable mode" which will force MT4 to store the data in the installation folder instead.
To do this, in Tickstory go to File->Settings->MT4 Settings and specify the command-line parameter "/portable" (without the quotes). Then launch MT4 and set it up as usual (you will need to log in once, etc - or you could copy over the files from your existing Data directory). Once this is complete, you should be able to reset the Installation folder in Tickstory and have it detect the new Data directory (you may need to remove the old Data directory if it causes any issues).
Obviously to work in portable mode, you need to make sure that the installation folder is not in a protected location such as "Program Files (x86)", but instead somewhere like "D:\Metatrader" or new folder that you have created.
Hope this helps.
