Download MetaTrader 5

Tester: Tester in the Terminal MetaTrader 4: It Should Be Known

To add comments, please log in or register
MetaQuotes Software Corp.
Moderator
182646
MetaQuotes Software Corp.  

New article Tester in the Terminal MetaTrader 4: It Should Be Known has been published:

The elaborate interface of the terminal MetaTrader 4 is a forefront, but beside this the terminal includes a deep-laid tester of strategies. And while the worth of MetaTrader 4 as a trading terminal is obvious, the quality of the tester's strategy testing can be assessed only in practice. This article shows the advantages and conveniences of testing in MetaTrader 4.

Not all programs for technical analysis (TA) have the option of testing, so much not every terminal! Even if a program is stated to have a tester and has the option of testing, it may have errors or architectural restrictions and prohibitions. That is why during the tester development for the terminal MetaTrader 4 it was very important to include in advance the architectural solutions, which would hinder the existence of a whole class of strategies, based on the knowledge of future. There are two ways of program testing of any strategy:

  • Based on the already composed bars, prepare in advance a data file, which would contain all required values of prices, indicators and other parameters, and then send this file to the tester (it generates the necessary sequence with theoretical possibility to dip into the future). The information is received in the form of already composed bars without modelling the formation of price bars;


  • prepare a file containing only modelled price, and send into the tester entry the price changes (price ticks), like in real life. Here the tester has no future inherently.

The triangle "Current Time" denotes a place, where the tester is located at the present point of time. In the first case we see the past time (Last), where the tester has processed data, and the future time (Future), where the tester will operate. Both, past and future, are already calculated (indicators, close price, open price, High and and Low), the tester just follows this sequence. And if there is a possibility of seeing future (real or error), the results of testing need a thorough verification. And closing already known possibilities does not ensure that there are no other possibilities. This is eventually a constant problem for a tester developer or tester users.

In the second case we have only the past time (Last), there is no future inherently (a dark square). In this approach we always have the information only about the past, and no information about the future, like in real trading. With each new tick (price change) in the tester we move in the present, the current-time triangle moves to the right onto the new known time and receives new prices. Each new tick creates the Present, increases the information about the Past and still has dark unknown Future before it. In this case the tester has no the possibility of seeing a future inherently, irrespective of mistakes, a trader could commit when writing a strategy.

Exactly this is the difference between two approaches. The first approach of creating the tester provides the illusionary simplicity and quickness of testing, the second one gives the assurance, that all written strategies will behave absolutely the same way as in real-time trading at equal price changes. That is why the sequences, modelled for the tester, are stored as files, containing snapshots of the bar state (fxt file), which can be opened like a usual chart using the menu "File" - >> "Open Offline".

Author: MetaQuotes Software Corp.

Jean-Luc Plagnaud
300
Jean-Luc Plagnaud  

Thank you for this article.

It will save time in answering all the time the same questions in the forums !

Rosh
93
Rosh  
You're welcome. Thank you.
MQL4 Comments
16319
MQL4 Comments  

First of all thanks for the article. It really helped me to understand the results obtained during testing and to trust the testing process (do have to be careful with my own indicators thought :p)

 

I have a question regarding "Modeling on a diferent timeframe of a symbol tested".

I'm trying to test an EA that uses multiple timeframes, but I'm having trouble viewing both charts. According to the snapshot in the article your able to follow sereval timeframes for the same symbol in "Visual Mode", could you drop a hint on how to open multiple timeframe charts?

 

Thanks,

SC

OldZ
116
OldZ  

Thank you .it is very useful.

MQL4 Comments
16319
MQL4 Comments  
Is there a function to evaluate the end of strategy tester before the real stop and in time to make the last operation like the writing of a file? Thanks.
To add comments, please log in or register