CopyTicksRange() in tester - page 2

 
Ryan L Johnson #:

Thank you for posting that info and a link to it. I did some additional reading there...

"Tick data may not coincide with minute bars for various reasons, for example because of connection losses or other failures when transmitting data from a source to the client terminal. The minute data is considered more reliable during tests" (emphasis added).

To me, that sounds like an outright warning about testing based on ticks in the MT5 Tester. The log that you posted in your OP confirms it.

I think you edited your original post, there was a link to custom chart creating? In any case, still looking for some confirmation in the docs that tester data is not 100% the same as data on the chart.
 
Dimitr Trifonov #:
I think you edited your original post, there was a link to custom chart creating? In any case, still looking for some confirmation in the docs that tester data is not 100% the same as data on the chart.

Not quite. I think it's readily apparent who removed it from this thread. 😐

I'll Message the link to you.

 
Ryan L Johnson #:

Not quite. I think it's readily apparent who removed it from this thread. 😐

I'll Message the link to you.

Custom symbols are irrelevant to the topic.

Please stop misleading people with your guesses.

 
Dimitr Trifonov #:
.

I tried to reproduce your issue, with a different EA of course, and I had no problem to get the correct value.

2026.01.02 17:37:36.042    Core 01    2025.09.26 03:57:08   stop loss triggered #2 sell 0.01 EURUSD 1.17338 sl: 1.16692 [#3 buy 0.01 EURUSD at 1.16692]
2026.01.02 17:37:36.042    Core 01    2025.09.26 03:57:08   deal #3 buy 0.01 EURUSD at 1.16692 done (based on order #3)
2026.01.02 17:37:36.042    Core 01    2025.09.26 03:57:08   deal performed [#3 buy 0.01 EURUSD at 1.16692]
2026.01.02 17:37:36.042    Core 01    2025.09.26 03:57:08   order performed buy 0.01 at 1.16692 [#3 buy 0.01 EURUSD at 1.16692]
2026.01.02 17:37:36.042    Core 01    2025.09.26 03:57:08   bar = 0 maxAsk = 1.16692 start = 2025.09.26 03:00:00 copiedTicks = 1639

Can you check in the symbol ticks history that the number of ticks you get by code matches ?

On my side :


 
Dimitr Trifonov #:
.

CS    0    23:00:54.398    Startup    Windows 11 build 26200, 2 x Apple Part 000 r0p0, x64, 1 / 3 Gb memory, 4 / 63 Gb disk, UAC, GMT+1

Are you running a virtualized Windows ? 

You really have not much available RAM and Disk space.

 

@Alain Verleyen

Your observation is correct, I use virtual machine.

As suggested I increased the RAM, now the configuration is:

And I got the same bad results.


However since you could not reproduce the issue on your side I decided to test with another MT5 broker on my side.  I used same virtual machine.

I tested on a real cent account and could not reproduce the issue.

I attach logs hereby.


The issue seems to be only on the demo account. The demo account is registered at some relatively unknown broker, my current guess is that maybe something is not configured correctly on their side?


In any case, in the following days I will check the ticks history as suggested and will post here what I've found.


@Alain Verleyen and @Ryan L Johnson thank you for your help so far :)

Alain Verleyen - angevoyageur - Trader's profile
Alain Verleyen - angevoyageur - Trader's profile
  • 2025.12.16
  • www.mql5.com
Trader's profile
Files:
20260103.log  2757 kb
 
Alain Verleyen #:

I tried to reproduce your issue, with a different EA of course, and I had no problem to get the correct value.

2026.01.02 17:37:36.042    Core 01    2025.09.26 03:57:08   stop loss triggered #2 sell 0.01 EURUSD 1.17338 sl: 1.16692 [#3 buy 0.01 EURUSD at 1.16692]
2026.01.02 17:37:36.042    Core 01    2025.09.26 03:57:08   deal #3 buy 0.01 EURUSD at 1.16692 done (based on order #3)
2026.01.02 17:37:36.042    Core 01    2025.09.26 03:57:08   deal performed [#3 buy 0.01 EURUSD at 1.16692]
2026.01.02 17:37:36.042    Core 01    2025.09.26 03:57:08   order performed buy 0.01 at 1.16692 [#3 buy 0.01 EURUSD at 1.16692]
2026.01.02 17:37:36.042    Core 01    2025.09.26 03:57:08   bar = 0 maxAsk = 1.16692 start = 2025.09.26 03:00:00 copiedTicks = 1639

Can you check in the symbol ticks history that the number of ticks you get by code matches ?

On my side :


From the 20260103.log

CS      0       23:01:25.394    Serendipity (EURUSD,H1) 2025.09.30 09:23:20   bar = 0 maxAsk = 1.17398 start = 2025.09.30 09:00:00 copiedTicks = 1366

ticks history log:

and yet (from same logs, a bit earlier):

CS      0       23:01:25.391    Trade   2025.09.30 09:23:20   stop loss triggered #3 sell 0.05 EURUSD 1.17206 sl: 1.17406 tp: 1.15137 [#5 buy 0.05 EURUSD at 1.17406]
CS      0       23:01:25.391    Trades  2025.09.30 09:23:20   deal #5 buy 0.05 EURUSD at 1.17406 done (based on order #5)
CS      0       23:01:25.391    Trade   2025.09.30 09:23:20   deal performed [#5 buy 0.05 EURUSD at 1.17406]
CS      0       23:01:25.391    Trade   2025.09.30 09:23:20   order performed buy 0.05 at 1.17406 [#5 buy 0.05 EURUSD at 1.17406]

Stop loss triggered at 1.17406

Anyways, since the problem is only with this Broker I will simply not use it for testing anymore

 
Dimitr Trifonov #:

From the 20260103.log

ticks history log:

and yet (from same logs, a bit earlier):

Stop loss triggered at 1.17406

Anyways, since the problem is only with this Broker I will simply not use it for testing anymore

If you can provide my with a login/password on this broker (in private), I can also check, to be sure it's not MT5 itself.
 
Alain Verleyen #:
If you can provide my with a login/password on this broker (in private), I can also check, to be sure it's not MT5 itself.
sent you a pm
 
Dimitr Trifonov #:
sent you a pm

Ok so I confirm the problem using the same broker as you.

2026.01.03 15:54:04.096    Core 01    2025.09.26 03:57:17   stop loss triggered #2 sell 0.01 EURUSD 1.17389 sl: 1.16705 [#3 buy 0.01 EURUSD at 1.16705]
2026.01.03 15:54:04.096    Core 01    2025.09.26 03:57:17   deal #3 buy 0.01 EURUSD at 1.16705 done (based on order #3)
2026.01.03 15:54:04.096    Core 01    2025.09.26 03:57:17   deal performed [#3 buy 0.01 EURUSD at 1.16705]
2026.01.03 15:54:04.096    Core 01    2025.09.26 03:57:17   order performed buy 0.01 at 1.16705 [#3 buy 0.01 EURUSD at 1.16705]
2026.01.03 15:54:04.096    Core 01    2025.09.26 03:57:17   bar = 0 maxAsk = 1.16697 start = 2025.09.26 03:00:00 copiedTicks = 2261

The ticks are correct though :

The OHLC values at that time also match the tick data :

2026.01.03 16:03:54.795    Core 01    2025.09.26 03:57:17                    [time]  [open]  [high]   [low] [close] [tick_volume] [spread] [real_volume]
2026.01.03 16:03:54.795    Core 01    2025.09.26 03:57:17   [0] 2025.09.26 03:00:00 1.16619 1.16697 1.16580 1.16697          2261        0             0

So the problem is not the ticks but why the stoploss is triggered at 1.16705 ?

I will investigate and ask for an answer to MQ.