mt5 strategy tester ticks - page 4

 
RaptorUK:
I'm not talking about missing ticks in the Strategy Tester but missing ticks while you are recording them.  If you count the ticks you see while you are recording data and you miss ticks then your count will be lower than it should have been.  It is very simple to determine if you have missed a tick while recording,  I just wondered if you did this and what you did when you found that you had missed a tick ?

As I wrote, I trust in that my real recorded time data is complete. Reasons for this:

1, Sometimes there were recorded nearly a thousand ticks per minute (equals to more than ten ticks per second!). It is high number enough to convince me that there is no problem with the EA performance. (And because of this figure I do not think that there were unrecorded ticks and the EA was not able to keep up with the pace)

2, The EA runs on dedicated Metatrader VPS which is maintained by professional service provider specially customised for trading (i.e. minimalising connection interruptions).

 
NyemaSanya:

As I wrote, I trust in that my real recorded time data on VPS is complete. Reasons for this:

1, Sometimes there were recorded nearly a thousand ticks per minute (equals to more than ten ticks per second!). It is high number enough to convince me that there is no problem with the EA performance.

2, The EA runs on dedicated Metatrader VPS which is maintained by professional service provider specially customised for trading.


By the way, I am curious, how can you determine if there is a missing tick when recording?

OK,  so you don't check so you don't know if your count is correct or not . . .  why didn't you just say.  How long does it take your OnTick() to execute ? if it hasn't finished before the next tick arrives won't you miss a tick  ? 

 

How to check ?  well . . . .  keep a count of the ticks as you go,  zero this counter when a new bar starts and increment it for each tick, compare your count to the Volume for bar 0,  if your count differs you have missed at least a tick.

 
RaptorUK:

OK,  so you don't check so you don't know if your count is correct or not . . .  why didn't you just say.  How long does it take your OnTick() to execute ? if it hasn't finished before the next tick arrives won't you miss a tick  ? 

 

How to check ?  well . . . .  keep a count of the ticks as you go,  zero this counter when a new bar starts and increment it for each tick, compare your count to the Volume for bar 0,  if your count differs you have missed at least a tick.

So, you just have found a nice task for yourself! ;-)
 
RaptorUK:

OK,  so you don't check so you don't know if your count is correct or not . . .  why didn't you just say.  How long does it take your OnTick() to execute ? if it hasn't finished before the next tick arrives won't you miss a tick  ? 

 

How to check ?  well . . . .  keep a count of the ticks as you go,  zero this counter when a new bar starts and increment it for each tick, compare your count to the Volume for bar 0,  if your count differs you have missed at least a tick.

Why do you insist on this point ?
 
angevoyageur:

Why do you insist on this point ?


Just came to my mind one another thing, showing how ridiculous his sticking is. To get the tick data of the tester I did run the EA without visualisation. That is far more faster than real life speed, to get one day takes less than half a minute. Even in this case all ticks were recorded....

 
NyemaSanya:

Just came to my mind one another thing, showing how ridiculous his sticking is. To get the tick data of the tester I did run the EA without visualisation. That is far more faster than real life speed, to get one day takes less than half a minute. Even in this case all ticks were recorded....

On a forward test, you ALWAYS miss some ticks (for a significative testing time). There is nothing you can do about that, these ticks simply don't arrived to your script/EA. See documentation :

The NewTick event is generated if there are new quotes, it is processed by OnTick() of Expert Advisors attached. In case when OnTick function for the previous quote is being processed when a new quote is received, the new quote will be ignored by an Expert Advisor, because the corresponding event will not enqueued.

With the tester, all is generated internally, so you don't miss a tick. And this is the problem.
 
angevoyageur:

On a forward test, you ALWAYS miss some ticks (for a significative testing time). There is nothing you can do about that, these ticks simply don't arrived to your script/EA. See documentation :

The NewTick event is generated if there are new quotes, it is processed by OnTick() of Expert Advisors attached. In case when OnTick function for the previous quote is being processed when a new quote is received, the new quote will be ignored by an Expert Advisor, because the corresponding event will not enqueued.

With the tester, all is generated internally, so you don't miss a tick. And this is the problem.


Sorry angevoyageur:


I do not agree neither with you nor with RaptorUK. It seems for me that you ignore basic logic. The EA is capable to record few hundred thousand ticks within a timeframe of minutes when running the tester. Which means that the Ontick() function has been completed within a fraction of millisecond.

But you are keeping to insist that the EA might not be able to record less ticks in real time, having much more time for execution of Ontick()?

I am sorry, but I think now this became a totally pointless conversation so I withdraw.
 

@NyemaSanya: You obviously do-not realize that you can miss a Tick while recording. RaptorUK already told you this. Ticks are new quotes broadcast from the broker's server. New quotes can be ignored by mt5 while its processing your Tick_Recorder. angevoyageur already told you this. Ticks are data-packets which have to travel in cyber-space and get to your terminal, you can miss ticks because of lost data-packets. Now Ubzen have told you this. 

All the legendary members of mql4, the creators of mql4 | mql5 all seem to conclude the same thing. Tick curve fitting comes close to Randomness. 

- If you still think you cannot miss a tick in real_life, then you need to research your stuff before arguing further.

- If you do-realize that you can miss a tick, then you need to answer the question of why your method is better.

Anyways, this is just the same argument over-and-over-and-over again. Read this topic.

 
NyemaSanya:


Sorry angevoyageur:


I do not agree neither with you nor with RaptorUK. It seems for me that you ignore basic logic. The EA is capable to record few hundred thousand ticks within a timeframe of minutes when running the tester. Which means that the Ontick() function has completed within a fraction of milliseconds.

But you are keep insisting that the EA might not be able to record less ticks in real time, having much more time for execution of Ontick()?

I am sorry, but I think now this became a pointless conversation so I withdraw.

Why react like that? There is nothing personnal here.

This isn't a question of agree or not. An EA on forward test always miss ticks, this is a fact. I find your first comment very interesting in that I never paid attention that Strategy Tester don't miss a tick as they are emulated on base of volume. I asked to RaptorUk why he insists because I find this issue secondary, I did not realize that you do not know what a tick is.

 

I made a test yesterday (9/4) on EURUSD, with a EA that only count ticks and compare MqlTick data :

 Ticks
 Volume (tick) as indicated by MT5 terminal on D1 chart
46 645
 Forward test D1
46 106
 Backtest on Daily46 489


  • So, even with almost nothing to do, EA on forward test, still miss hundreds ticks a day.
  • I am a little intrigued by the fact that backtest produced less ticks than daily volume.
Documentation on MQL5: Standard Constants, Enumerations and Structures / Data Structures / Structure for Current Prices
Documentation on MQL5: Standard Constants, Enumerations and Structures / Data Structures / Structure for Current Prices
  • www.mql5.com
Standard Constants, Enumerations and Structures / Data Structures / Structure for Current Prices - Documentation on MQL5
Reason: