You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
I currently have some obligations I need to take care of, but later tonight I will try to recreate the situation and see if I can come up with a solution for you!
Ok, I have done some tests and these are my findings as it pertains to my own setup.
In essence, it sucked! Not only does it not make any sense for it to start the testing without being connected to the trader server, but it offers no robust way around it, especially if it depends on the trade server to generate the ".fxt" data files for the test and requires the contract information for the testing environment. It just does not make any sense. As far as I am concerned, its a major bug, that will obviously never get fixed.
I see two possible work-arounds, which I have yet to test.
Please note, that both methods described above, have not been tested, and the ideas are only theoretical. In practice, they may not save the situation.
If anyone else has experience with this and a solution, I am sure the OP will appreciate it.
After reading over my previous post looking for errors to correct, I noticed something that I overlook the first time.
Even though the test started before the login process, I see now that the setting of the spread and actual start of the test only took place after the login process.
So, I'm left wondering If I am not maybe letting the OP's experience cloud my judgment, and it is in fact waiting for the download, but only in the case where data is already available.
I am going to redo the tests again in a different way and see if I am not analysing it incorrectly.
Ok, I redid the test, but with data preloaded (there was no way around this issue), but this time I set the spread to floating (instead of a fixed value). I did this to see if it would actually collect the trade server's currently reported spread (which it did). These were the timing results:
Viewing the logs with new eyes, it does look like that the test is paused until the trade server connects before setting the spread and continuing the test. However, it does not seem to wait for the MQL5 website login to complete, only the login to the trade server.
I also redid the test with a fixed spread and the timing values were equivalent. So, even in my previous posts, the log posted does show that the spread was only set after the trader server connection.
So, my question to the OP is this:
Ok, I redid the test, but with data preloaded (there was no way around this issue), but this time I set the spread to floating (instead of a fixed value). I did this to see if it would actually collect the trade server's currently reported spread (which it did). These were the timing results:
Viewing the logs with new eyes, it does look like that the test is paused until the trade server connects before setting the spread and continuing the test. However, it does not seem to wait for the MQL5 website login to complete, only the login to the trade server.
I also redid the test with a fixed spread and the timing values were equivalent. So, even in my previous posts, the log posted does show that the spread was only set after the trader server connection.
So, my question to the OP is this:
Hello Fernando,
I really admire your willingness to help, your way of solving problems and your style, so THANK YOU!
I switched to Moving Average.ex4 for now as well. My conclusions are the same as yours. If the .fxt file generated by MT4 itself is used, the backtesting starts after MT4 is connected to the trade account. But it seems that I have to be a troublemaker. The .fxt file I need to use is produced by a third-party application. It contains tick price data and also the fixed spread number. The thing is that this spread number is NOT used for the backtest (MT4 always uses the spread written in the Tester window) but in spite of this fact, the tester does not wait for the connection to the trade account in this case and starts running before the connecting is finished. Where the tester finds out the value of the current (floating) spread, remains a miracle for me. I think I deleted all the files where MT4 could store prices.
Thank you once again for all the research you did for us!
Don’t worry, you are not a troublemaker. I am well aware of TDS. With TDS (or files produced by TickStory), the spread is in the “.fxt” file itself using a special encoding and TDS calls the MetaTrader terminal in a way that “hacks” its internal functioning to “override” it and read the spread from the files instead of the standard way. That is probably also why it does not wait for the trade server connection, since they have always recommended running tests with the trade-server disconnected and with all contract and server data preloaded.
Since I have not used Birt’s TDS for a very long time, I don’t know if it currently has any parameters that could alter its functionality and force it to wait for the connection, so please look into that first.
If not, then the only alternative I believe should function, is the special indicator via the template file I mentioned before.
Don’t worry, you are not a troublemaker. I am well aware of TDS. With TDS (or files produced by TickStory), the spread is in the “.fxt” file itself using a special encoding and TDS calls the MetaTrader terminal in a way that “hacks” its internal functioning to “override” it and read the spread from the files instead of the standard way. That is probably also why it does not wait for the trade server connection, since they have always recommended running tests with the trade-server disconnected and with all contract and server data preloaded.
Since I have not used Birt’s TDS for a very long time, I don’t know if it currently has any parameters that could alter its functionality and force it to wait for the connection, so please look into that first.
If not, then the only alternative I believe should function, is the special indicator via the template file I mentioned before.
Hello Fernando,
you are a genius! I inserted a loop into the initialization section of some indicator, placed this indicator into tester.tpl and IT WORKS!! Thank you so much, I do not know how would I continue without you. I am going to order a coding of EA from you one day for sure!
You are welcome! Good to know you resolved the issue.