Download MetaTrader 5

Discussion of article "The algorithm of ticks’ generation within the strategy tester of the MetaTrader 5 terminal"

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

New article The algorithm of ticks’ generation within the strategy tester of the MetaTrader 5 terminal is published:

MetaTrader 5 allows us to simulate automatic trading, within an embedded strategy tester, by using Expert Advisors and the MQL5 language. This type of simulation is called testing of Expert Advisors, and can be implemented using multithreaded optimization, as well as simultaneously on a number of instruments. In order to provide a thorough testing, a generation of ticks based on the available minute history, needs to be performed. This article provides a detailed description of the algorithm, by which the ticks are generated for the historical testing in the MetaTrader 5 client terminal.


Author: MetaQuotes Software Corp.

Wackena
648
Wackena  

Please translate remaining part into English.

Each impulse wave has a length step in points, which is calculated by the formula:

step=(High-Low-1)/(количество волн)+1
Bill Wilson
119
Bill Wilson  

Google Transulation is a good tool

 Russian to English translationShow romanization

step = (High-Low-1) / (number of waves) +1
Paul
784
Paul  

I disagree with this statement:

Strategy Tester of the MetaTrader 5 terminal uses only one mode of price modeling in testing - the generation of ticks on the basis of existing historical data on minute time frames of the used symbols. The remaining modes of simulations in MetaTrader 4 were removed because despite their high speed, they failed to provide a high accuracy of testing
 

Used intelligently, the MT4 open prices only model is as accurate as the all ticks model. 

The following approach will create an EA which backtests almost identically in the open prices only model.

  • Entries and exit strategies use the close of the previous bar and/or indicators with shift=1
  • If stoplosses and takeprofits are used, they are several multiples of ATR

 This approach also tends to produce the most robust strategies, since forex prices approach completely random behaviour at tick level.

 Paul

 

 

tektronic
137
tektronic  
phampton:

I disagree with this statement:

Strategy Tester of the MetaTrader 5 terminal uses only one mode of price modeling in testing - the generation of ticks on the basis of existing historical data on minute time frames of the used symbols. The remaining modes of simulations in MetaTrader 4 were removed because despite their high speed, they failed to provide a high accuracy of testing
 

Used intelligently, the MT4 open prices only model is as accurate as the all ticks model. 

The following approach will create an EA which backtests almost identically in the open prices only model.

  • Entries and exit strategies use the close of the previous bar and/or indicators with shift=1
  • If stoplosses and takeprofits are used, they are several multiples of ATR

 This approach also tends to produce the most robust strategies, since forex prices approach completely random behaviour at tick level.

 Paul

 

 

I disagree the above statement also. I also posted comments about this 'Open prices' option availability in this link https://www.mql5.com/en/forum/1036 but it appears no reaction on it. So, please, take consider introduction of the Open prices option. tek
Strategy Tester - Open Prices only comment
  • www.mql5.com
I noted you dont provide open prices only option in MT5 .
William Kreider
542
William Kreider  

I'm pretty much confused on this Algorithm. I understand parts of it and then other parts i'm don't.

It looks like in regards to support points it basically takes the Volume of the historical bar and if it's higher than 11 (11 being the max number of support points) then use 11 however if this is not true then what is the formula for computing the number of support points. 

Better yet any more material on this would be great. I've beat google down to within a bit of it's binary life and have only been able to come up with two documents pertaining to this 'Miracle' Algorithm. I don't mind reading documents

thanks 

luckybaby123
8
luckybaby123  
madhatt30:

I'm pretty much confused on this Algorithm. I understand parts of it and then other parts i'm don't.

It looks like in regards to support points it basically takes the Volume of the historical bar and if it's higher than 11 (11 being the max number of support points) then use 11 however if this is not true then what is the formula for computing the number of support points. 

Better yet any more material on this would be great. I've beat google down to within a bit of it's binary life and have only been able to come up with two documents pertaining to this 'Miracle' Algorithm. I don't mind reading documents

thanks 

I think this article is helpful to you. https://www.mql5.com/en/articles/75

Btw, the algorithm of ticks ' generation in MT4 is really confused especially the modes of control points.

Kun Li
391
Kun Li  
Can you give us a sample of code on the algorithm of ticks’ generation. I am very curious about this algorithm and How calculated the time corresponding each Tick generated by the Algorithm of Ticks’ Generation? Thanks!!!
ugo
50
ugo  
Hi guys, I think I need some help.

I have an indicator for micro scalping. It gives very good results on the Tester M1 time frame - Every tick
When it goes live the results are poor!

After banging my head against the wall for several days, I came down to the conclusions that the difference is due to this "algorithm of ticks’ generation".

Any suggestions?
For example, could I filter the live data? if yes, how?

thanks for your help.

ugo
Alain Verleyen
Moderator
31472
Alain Verleyen  
ugo:
Hi guys, I think I need some help.

I have an indicator for micro scalping. It gives very good results on the Tester M1 time frame - Every tick
When it goes live the results are poor!

After banging my head against the wall for several days, I came down to the conclusions that the difference is due to this "algorithm of ticks’ generation".

Any suggestions?
For example, could I filter the live data? if yes, how?

thanks for your help.

ugo
Scalper (relying on tick data) are probably not testable with the Strategy Tester.
Uwe Goetzke
1514
Uwe Goetzke  
angevoyageur:
Scalper (relying on tick data) are probably not testable with the Strategy Tester.

If you do not use any additional indicators you could catch the auto generated ticks from the saved history bars, throw them away and insert the ticks for the same minute from a previous saved tick feed.

A binary tick feed saved to disc takes about 50 MBytes for one currency  for one week so I think that only small periods are testable (if you do have to save your own tick data and cannot get ticks data from other sources).

But this may be enough to verify your algorithms.

Good luck, ugo58

12
To add comments, please log in or register