Hey folks
I have recently had a very peculiar experience related to mt4 and thought I will add it here for expert comments by peers, and also hopefully prevent any similar mishap to other users.
I suspect that this might become quite drawn out so am starting a new thread.
Here we go...
I was testing an EA that used Constant Range Bars (using a commercial script).
Now I never rely on mt4 strategy tester back tests if an EA places market or limit orders as this would be different under live market conditions.
Since this particular EA placed only buy and sell stops at several pips gap, I thought the strategy tester should yield some reliable stats.
I ran the backtests and got excellent results - v excited to try it out live using micro lots on a live account.
Initially, it ran a winning streak, but eventually started loosing, which was totally against what backtests had shown.
I was mystified, to say the least. I was seeing the CRB candles form in front of my eyes during back test visual mode - and except for the odd loosing positions, the ea mostly came out the winner. It seemed as if somehow by some strange anomally the live trading candles were not forming as these were in the strategy tester.
After one of my loosing nights, (NY session) I decided to play back exactly the same data of the previous (loosing) night to try and see what the hell was going on. I took the same 1M file and put it in the offline folder to run the strategy tester. Guess what? All winners!! Where as in real trading, it had all been losses. Total of six trades, no room for coincidence here.
Suspecting an anomaly with the range bar script, I contacted the vendor of the script. He mentioned something that seemed to make sense:
Now you all know, when we test CRB based EAs in strategy tester we have to create an offline file with the range we want but name as m5 or m15 etc so strategy tester can access this... - the script vendor told me to save the offline crb file as a higher timeframe (such as h4 or daily). The reason he said was that mt4 used some kind of averaging of ticks within each candle (apparently hard coded), and that the strategy tester used these averages to rebuild candles - these averages were based on the standard mt4 timeframes, so - the larger the time frame, the more ticks would be recorded, etc.
So instead of running the strategy tester on 50 range bars saved as m5 offline chart, I did this as a 50 range bar saved as daily time frame, hoping that this would give me the real life scenario with ALL of the ticks as recorded in live data.
Result => more ticks in each candle, but still the same scenario - all winners in the back test compared with all loosers for the same period live trading.
So I called up mt4 support to try and find an answer. They cooly told me they did not support end clients, and that I should route my support request through my broker.
I have since done that (about 4 days back) with all supporting screen dumps etc. - and awaiting an explanation.
This is really a weird one. Facts:
1. We know that mt4 records live ticks (all of them) in m1 timeframe.
2. We construct crb candles from this m1 timeframe from a live trading account.
3. The candles build up differently during live trading vs playback through strategy tester even though the OHLC of the crb candles are exactly the same - so they look the same after the playback, but have been built (recorded) differently (i.e. the sequence of the ticks is misrepresented).
What do you all think? Deliberate conspiracy by metaquotes by having mt4 behave in such a way so as to lull us all into a false sense of security by having strategy tester present a rosy picture while the real life deal is not so sweet? Or perhaps, the brokers throwing in extra ticks into each bar which do not get recorded into the m1 timeframe some how?
Anyone here know inner workings of mt4 tick recording to throw further light on this?
P.S. - Please note that in all of the above, I have never used more than two months worth of data, which is the live data recorded with a live trading account running - so data quality issues can (I hope) be discounted.
I am adding the following for further clarity (hopefully), as I think the purpose of this thread is perhaps not being clearly understood by the readers:
Going by the posts here, it seems like I may not have been clear enough regarding the issue at hand here. Let me try again...
Firstly, the quality of data for backtesting is not at issue here. Some posts are suggesting ways of getting high quality tick data, which is fine, except irrelevant to the purpose of this thread.
Please re-read Post#1 to understand the issue.
All we are tring to establish here is:
1) Does MT4 record ALL in coming ticks in the m1 file, or not?
2) Is the data recorded in m1 reliable - in terms of being able to reconstruct, if required, the exact SEQUENCE of ticks (bid/ ask) that were coming in during a previous period (CAPTURED LIVE IN A 1M CHART).
3) Can the Strategy Tester playback the ticks recorded/ captured live in 1m file in a reliable manner in the EXACT SAME SEQUENCE as the ticks came in real time?
4) If the answer to any of the above is a 'NO' then is that a bug, a short coming, or a feature of MT4? Is this shortcoming an honest oversight or a deliberate attempt to tilt the playing field in favor of the brokers at a disadvantage to the retail traders?
5) In case he answer to any question in # 4 is a 'Yes' - for a product that possibly millions of users entrust with their hard earned money, shouldn't Metaquotes fix this and/ or at least disclose this shortcoming/ bias clearly?
6) If any of points 1 - 3 above are true, MT4 would fail even the very basic data integrity/ reliability criteria of an IT system?
7) Relating points 5 & 6 above, are the brokers aware of this issue, and are they turning a blind eye to the issue as it favors them in taking money from unsuspecting traders?
8) Finally, why is this a big deal? Read points 1 - 3 above - if this is an issue, then most strategy testing will provide skewed results, which shouldn't be acceptable to anyone of us.
We are lead to believe by Metaquotes that "m1 all ticks method" is the wholly grail of back testing your strategy in mt4 before trading live. If the 1m file integrity is at question, then any tests we do are unreliable and hence any trading we base on our strategy tests is flawed and will go against us. And how can you even trade live without reliably back testing the strategy?
I have recently had a very peculiar experience related to mt4 and thought I will add it here for expert comments by peers, and also hopefully prevent any similar mishap to other users.
I suspect that this might become quite drawn out so am starting a new thread.
Here we go...
I was testing an EA that used Constant Range Bars (using a commercial script).
Now I never rely on mt4 strategy tester back tests if an EA places market or limit orders as this would be different under live market conditions.
Since this particular EA placed only buy and sell stops at several pips gap, I thought the strategy tester should yield some reliable stats.
I ran the backtests and got excellent results - v excited to try it out live using micro lots on a live account.
Initially, it ran a winning streak, but eventually started loosing, which was totally against what backtests had shown.
I was mystified, to say the least. I was seeing the CRB candles form in front of my eyes during back test visual mode - and except for the odd loosing positions, the ea mostly came out the winner. It seemed as if somehow by some strange anomally the live trading candles were not forming as these were in the strategy tester.
After one of my loosing nights, (NY session) I decided to play back exactly the same data of the previous (loosing) night to try and see what the hell was going on. I took the same 1M file and put it in the offline folder to run the strategy tester. Guess what? All winners!! Where as in real trading, it had all been losses. Total of six trades, no room for coincidence here.
Suspecting an anomaly with the range bar script, I contacted the vendor of the script. He mentioned something that seemed to make sense:
Now you all know, when we test CRB based EAs in strategy tester we have to create an offline file with the range we want but name as m5 or m15 etc so strategy tester can access this... - the script vendor told me to save the offline crb file as a higher timeframe (such as h4 or daily). The reason he said was that mt4 used some kind of averaging of ticks within each candle (apparently hard coded), and that the strategy tester used these averages to rebuild candles - these averages were based on the standard mt4 timeframes, so - the larger the time frame, the more ticks would be recorded, etc.
So instead of running the strategy tester on 50 range bars saved as m5 offline chart, I did this as a 50 range bar saved as daily time frame, hoping that this would give me the real life scenario with ALL of the ticks as recorded in live data.
Result => more ticks in each candle, but still the same scenario - all winners in the back test compared with all loosers for the same period live trading.
So I called up mt4 support to try and find an answer. They cooly told me they did not support end clients, and that I should route my support request through my broker.
I have since done that (about 4 days back) with all supporting screen dumps etc. - and awaiting an explanation.
This is really a weird one. Facts:
1. We know that mt4 records live ticks (all of them) in m1 timeframe.
2. We construct crb candles from this m1 timeframe from a live trading account.
3. The candles build up differently during live trading vs playback through strategy tester even though the OHLC of the crb candles are exactly the same - so they look the same after the playback, but have been built (recorded) differently (i.e. the sequence of the ticks is misrepresented).
What do you all think? Deliberate conspiracy by metaquotes by having mt4 behave in such a way so as to lull us all into a false sense of security by having strategy tester present a rosy picture while the real life deal is not so sweet? Or perhaps, the brokers throwing in extra ticks into each bar which do not get recorded into the m1 timeframe some how?
Anyone here know inner workings of mt4 tick recording to throw further light on this?
P.S. - Please note that in all of the above, I have never used more than two months worth of data, which is the live data recorded with a live trading account running - so data quality issues can (I hope) be discounted.
I am adding the following for further clarity (hopefully), as I think the purpose of this thread is perhaps not being clearly understood by the readers:
Going by the posts here, it seems like I may not have been clear enough regarding the issue at hand here. Let me try again...
Firstly, the quality of data for backtesting is not at issue here. Some posts are suggesting ways of getting high quality tick data, which is fine, except irrelevant to the purpose of this thread.
Please re-read Post#1 to understand the issue.
All we are tring to establish here is:
1) Does MT4 record ALL in coming ticks in the m1 file, or not?
2) Is the data recorded in m1 reliable - in terms of being able to reconstruct, if required, the exact SEQUENCE of ticks (bid/ ask) that were coming in during a previous period (CAPTURED LIVE IN A 1M CHART).
3) Can the Strategy Tester playback the ticks recorded/ captured live in 1m file in a reliable manner in the EXACT SAME SEQUENCE as the ticks came in real time?
4) If the answer to any of the above is a 'NO' then is that a bug, a short coming, or a feature of MT4? Is this shortcoming an honest oversight or a deliberate attempt to tilt the playing field in favor of the brokers at a disadvantage to the retail traders?
5) In case he answer to any question in # 4 is a 'Yes' - for a product that possibly millions of users entrust with their hard earned money, shouldn't Metaquotes fix this and/ or at least disclose this shortcoming/ bias clearly?
6) If any of points 1 - 3 above are true, MT4 would fail even the very basic data integrity/ reliability criteria of an IT system?
7) Relating points 5 & 6 above, are the brokers aware of this issue, and are they turning a blind eye to the issue as it favors them in taking money from unsuspecting traders?
8) Finally, why is this a big deal? Read points 1 - 3 above - if this is an issue, then most strategy testing will provide skewed results, which shouldn't be acceptable to anyone of us.
We are lead to believe by Metaquotes that "m1 all ticks method" is the wholly grail of back testing your strategy in mt4 before trading live. If the 1m file integrity is at question, then any tests we do are unreliable and hence any trading we base on our strategy tests is flawed and will go against us. And how can you even trade live without reliably back testing the strategy?