Hi , MT4 generates tick data from larger timeframes (starting with M1 first) . see lots of information here .
https://www.mql5.com/en/articles/1490
MT4 (and I am guessing MT5 as well) "fakes" the tick data based on the minute values, as ydrol stated slightly differently above. Basically, they are actually an "educated guess" based on within which minute they would be expected to appear.
Edit:
(adding this to further explain the idea of how I think the fake ticks are made)
Because
the tick data I am talking about is a specific time value of less than 1
minute, they are basically (depending on your source) one price value
(no OHLC like the other timeframes) and one volume value for that
specific instant they represent. In real operation, those ticks that appear within minute X
then are calculated together to ultimately become the OHLC and full
volume for minute X. The lowest time frame value that the tester uses
is the one minute time frame, not the ticks, so to recreate the ticks,
they have to use some method to do so. So what I think they do is extrapolate
the tick data given that the minute data is known. For price, they
basically "forge" false tick data based on what the minute information
actually is. Obviously, within that minute there is a "tick" value that
corresponds to the all 4 major points of a bar, so they have those
guaranteed to be within it, one tick each. And based on the volume,
they spread it out through some specific method to make it so the entire
volume is distributed among those fake ticks, usually well more than just the 4 "known" ones. But if they were all
combined, would accurately reflect the minute bar they are derived from. The same is basically true to calculate the higher time frames, except the opposite direction. The minute bar values are known, and 5 are added for the 5 min, 10 for the 10 min, etc., as Pipperoni shows below.
In this article: Tester in the Terminal MetaTrader 4 that you can read here: https://www.mql5.com/en/articles/1490 (thanks ydrol)
I find this:
Important: before starting the testing make sure that all necessary price data of other timeframes is pumped, and that this data is correct. Standard History Center provides the correctness of all timeframes, because it
automatically recalculates from the minute data all other periods.
Considered that we go from a high definition 1 min to lower definition 5 min ...and that the 5 min is "Calculated from the minute data (to all other periods)" how can than the tick data be "recreated" ?
We see also that in the higher TF we have only 1 entry per bar and they contain thus no other info than open high low close.
Unless somebody can enlighten us ... I am afraid that JD4 is correct and that the BT can not now the ticks. In this way back testing a Trailing SL is a USELESS.
If the 1 min bar can as well be A or B ... than the Back test becomes very imprecise. Because an execution like I see on FXCM takes about 1 to several seconds. And don't believe the promotional blabla, because I have run a high frequency EA from a VPS with a 1ms latency connection to the broker ... and I see how much delay real time execution has .... So if we don't know if a minute bar is A or B ... than we are testing in the dark ! The broker will NOT execute your order when the spike is to narrow, because there is not enough time or/and because your order is in a queue and the liquidity at the spike is insufficient . All EA's need precise data to be able to back test them.
-. The tick data generated by MT4 is 'fake' data. This is mentioned in the article..
To generate price movements between control points, interpolation based on the predefined templates is used
It's a fancy way of saying 'guess'.
-. You can get real tick data from external sources ( Search Dukascopy, TickStory, Birts ) and 'force' the real ticks into MT4. I say 'force' rather than 'import' because MT4 has no support for this. The external programs have to push the real 'tick' files into MT4 and make them read only so MT4 will not overwrite them with 'fake' ticks, when you click '[Start]'
-There is still an issue with variable spreads during backtesting with MT4. The spread is fixed at present in MT4. Some external programs have ways to deal with this. Not sure how. I suspect Birts TDS has some MQL wrappers around the broker inputs (Ask,Bid ,Series ) and outputs ( OrderSend, OrderModify) that must be used? (just a guess)
-.Also you must pay attention to timezones of imported data vs that of the broker. Import tools can take care of that for you.
The cynic in me thinks that, as MQ customers are the brokers and not the users, there is no urgency to support full accurate backtesting out of the box.
Pipperoni: Where is this tick data coming from ???
| Tester generated
'Strategy Tester: Modes of Modeling during Testing - MQL4 Articles |
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
https://www.youtube.com/watch?v=k-IOl3_hoLE
Where is this tick data coming from ???