Independent market intelligence
Research over noise · Risk before return
Forex guide · Backtest execution

Forex backtest delay and the first EUR/USD quote

A signal has a timestamp. So does the next quote a model can use. Follow three delays on the same EUR/USD ticks and see when they select the same quote, a different price or no quote before the deadline.

In simple terms

We replayed 196 EUR/USD signals with a shared three-second deadline. The 250 ms request found a quote in 165 cases and the 1,000 ms request in 140. Among the 1,000 ms cases with a quote, Ask rose in 60, fell in 49 and stayed the same in 31 compared with the signal quote.

On this page
01

From a signal to a usable quote

A backtest can generate a signal at time t and then look up a quote at the modeled request time. We compare requests scheduled at t, t + 250 ms and t + 1,000 ms. All three use the same Bid and Ask records and the same deadline.

02

The EUR/USD ticks and the clock

The July 2024 HistData archive records Bid, Ask and time to the millisecond. We add five hours to the source’s fixed EST (UTC−5) to align the records with UTC. The original file order resolves equal timestamps. Ask is the quoted buy-side price and Bid is the quoted sell-side price in this replay.

03

The same signal events for every delay

We reuse the 196 Ask crossings from the Buy Stop and Buy Stop Limit study. The signals occurred on weekdays from July 2 through July 31, 2024, in UTC. In that study each crossing was the first later Ask at least 3 pips above the reference Ask. Here the crossing only supplies a signal timestamp and a comparison quote.

04

The first quote and the common deadline

Starting at the signal row, take the first quote at or after the modeled request time and strictly before t + 3,000 ms. At 0 ms the signal row itself qualifies by design. At a positive delay the qualifying row must reach or follow the later request time. If the window ends first, we record a miss.

t + d ≤ t_quote < t + 3,000 ms

Three request times, one deadline

Three request times, one deadlinet + ms02501,0003,000
Signal · 0 ms250 ms1,000 msDeadline · 3,000 ms
Each lookup starts at its request marker and scans forward to the first quote. All three stop at the same exclusive deadline.
05

Two clocks and two price sides

Request wait is the time from the modeled request to its first eligible quote. Elapsed time is measured from the signal, so it equals the delay plus the request wait. We subtract the 0 ms quote from the delayed quote separately for Ask and Bid. A positive Ask difference means a higher quoted buying price. A positive Bid difference means a higher quoted selling price.

t_quote − t = d + (t_quote − (t + d))

06

How many requests found a quote?

The 0 ms model selected all 196 signal quotes. At 250 ms, 165 requests found a quote (84.18%) and 31 missed the deadline. At 1,000 ms, 140 found a quote (71.43%) and 56 missed. In 40 signals, the two delayed requests selected exactly the same source row.

Quote found before the deadline

0 ms

Quote found
196
No quote
0

250 ms

Quote found
165
No quote
31

1,000 ms

Quote found
140
No quote
56
Both delays select the same row
40
Each delay starts with the same signals. The 0 ms request includes the recorded signal quote.
07

How long did the quotes take to appear?

Among successful lookups, the median wait after request time was 313 ms at 250 ms and 353.5 ms at 1,000 ms. Measured from the signal instead, the medians were 563 ms and 1,353.5 ms. Each median describes the cases with a quote at that delay. Misses have their own count.

Two ways to measure waiting

250 ms

Wait from request
313 ms
Elapsed from signal
563 ms

1,000 ms

Wait from request
353.5 ms
Elapsed from signal
1,353.5 ms
The medians cover requests with a qualifying quote. The reference point for each measurement is shown in the label.
08

How far did the quotes move?

At 250 ms, Ask was higher in 66, unchanged in 47 and lower in 52 matched cases. At 1,000 ms those counts were 60, 31 and 49. The 1,000 ms Ask differences ranged from −7.6 to +10.5 pips, with a median of 0 pips. The figure also shows Bid changes.

Ask and Bid changes from the signal quote

Ask · 250 ms

Higher
66
Unchanged
47
Lower
52

Bid · 250 ms

Higher
73
Unchanged
49
Lower
43

Ask · 1,000 ms

Higher
60
Unchanged
31
Lower
49

Bid · 1,000 ms

Higher
66
Unchanged
35
Lower
39
Each side compares its own delayed and signal quotes. Requests without a quote are outside these counts.
09

Example 1. A higher Ask after the delay

The earliest signal with a higher 1,000 ms Ask was 2024-07-02 07:01:47.685 UTC. Its Ask was 1.07351. The 1,000 ms lookup selected Ask 1.07353 at 07:01:48.754 UTC, a difference of +0.2 pip. The candle panel shows the surrounding minutes and the tick panel shows the exact quote.

Example 1 · M1 Ask candles around the signal

2024-07-02 · UTC

Signal Quote records 542
Example 1 · M1 Ask candles around the signalEUR/USD · M1 Ask · UTC1.073001.073201.073401.073602024-07-02 06:54 UTC · Open 1.07313 · High 1.07319 · Low 1.07313 · Close 1.073192024-07-02 06:55 UTC · Open 1.07319 · High 1.07322 · Low 1.07319 · Close 1.073222024-07-02 06:56 UTC · Open 1.07324 · High 1.07330 · Low 1.07320 · Close 1.073202024-07-02 06:57 UTC · Open 1.07320 · High 1.07322 · Low 1.07319 · Close 1.073202024-07-02 06:58 UTC · Open 1.07320 · High 1.07324 · Low 1.07319 · Close 1.073232024-07-02 06:59 UTC · Open 1.07323 · High 1.07323 · Low 1.07320 · Close 1.073212024-07-02 07:00 UTC · Open 1.07321 · High 1.07347 · Low 1.07321 · Close 1.073462024-07-02 07:01 UTC · Open 1.07345 · High 1.07354 · Low 1.07338 · Close 1.073542024-07-02 07:02 UTC · Open 1.07352 · High 1.07355 · Low 1.07347 · Close 1.073542024-07-02 07:03 UTC · Open 1.07355 · High 1.07355 · Low 1.07339 · Close 1.073402024-07-02 07:04 UTC · Open 1.07339 · High 1.07356 · Low 1.07338 · Close 1.073562024-07-02 07:05 UTC · Open 1.07355 · High 1.07360 · Low 1.07340 · Close 1.073442024-07-02 07:06 UTC · Open 1.07344 · High 1.07347 · Low 1.07340 · Close 1.073402024-07-02 07:07 UTC · Open 1.07339 · High 1.07351 · Low 1.07339 · Close 1.073502024-07-02 07:08 UTC · Open 1.07349 · High 1.07349 · Low 1.07339 · Close 1.0734706:5407:0107:08
Open
1.07345
High
1.07354
Low
1.07338
Close
1.07354
The signal marker identifies the minute containing the signal quote. Open the tick panel to see the timing in milliseconds.

Example 1 · The later quote has a higher Ask

2024-07-02 · UTC

AskBidSignal · 0 ms250 ms1,000 msDeadline · 3,000 ms
Example 1 · The later quote has a higher AskEUR/USD · Bid / Ask · t + ms1.073481.073501.073521.0735402501,0003,0002024-07-02 07:01:47.685 UTC · Ask 1.07351 · Bid 1.07348 · Source row 67440 · Elapsed from signal 0 ms2024-07-02 07:01:48.548 UTC · Ask 1.07351 · Bid 1.07350 · Source row 67441 · Elapsed from signal 863 ms2024-07-02 07:01:48.651 UTC · Ask 1.07352 · Bid 1.07350 · Source row 67442 · Elapsed from signal 966 ms2024-07-02 07:01:48.754 UTC · Ask 1.07353 · Bid 1.07352 · Source row 67443 · Elapsed from signal 1,069 ms2024-07-02 07:01:48.857 UTC · Ask 1.07354 · Bid 1.07352 · Source row 67444 · Elapsed from signal 1,172 ms
Ask
1.07353
Bid
1.07352
Source row
67443
Elapsed from signal
1,069 ms

Modeled delay · 0 ms

Request time
First quote time
Ask
1.07351
Bid
1.07348
Wait from request
0 ms

Modeled delay · 250 ms

Request time
First quote time
Ask
1.07351
Bid
1.07350
Wait from request
613 ms

Modeled delay · 1,000 ms

Request time
First quote time
Ask
1.07353
Bid
1.07352
Wait from request
69 ms
Compare the selected rows and Ask values for the three requests.
10

From the minute candle to the tick

The M1 Ask candles aggregate the archived quote rows. The signal marker identifies its minute and exact price. The ticks use elapsed milliseconds along the horizontal axis. Choose a tick to read its UTC timestamp, Bid, Ask and source row. The three request markers and the deadline show where each lookup starts and ends.

11

Example 2. A lower Ask after the delay

The earliest signal with a lower 1,000 ms Ask was 2024-07-02 14:01:19.749 UTC. Its Ask was 1.07348. The later lookup selected Ask 1.07346 at 14:01:20.780 UTC, a difference of −0.2 pip. The replay uses the same delays and deadline as in the first example.

Example 2 · M1 Ask candles around the signal

2024-07-02 · UTC

Signal Quote records 1,282
Example 2 · M1 Ask candles around the signalEUR/USD · M1 Ask · UTC1.073001.073501.074002024-07-02 13:54 UTC · Open 1.07308 · High 1.07317 · Low 1.07304 · Close 1.073162024-07-02 13:55 UTC · Open 1.07317 · High 1.07337 · Low 1.07317 · Close 1.073302024-07-02 13:56 UTC · Open 1.07332 · High 1.07332 · Low 1.07308 · Close 1.073112024-07-02 13:57 UTC · Open 1.07311 · High 1.07323 · Low 1.07311 · Close 1.073122024-07-02 13:58 UTC · Open 1.07314 · High 1.07320 · Low 1.07306 · Close 1.073202024-07-02 13:59 UTC · Open 1.07320 · High 1.07327 · Low 1.07316 · Close 1.073192024-07-02 14:00 UTC · Open 1.07318 · High 1.07332 · Low 1.07312 · Close 1.073302024-07-02 14:01 UTC · Open 1.07330 · High 1.07349 · Low 1.07330 · Close 1.073422024-07-02 14:02 UTC · Open 1.07341 · High 1.07348 · Low 1.07328 · Close 1.073472024-07-02 14:03 UTC · Open 1.07348 · High 1.07350 · Low 1.07339 · Close 1.073502024-07-02 14:04 UTC · Open 1.07349 · High 1.07349 · Low 1.07332 · Close 1.073472024-07-02 14:05 UTC · Open 1.07347 · High 1.07349 · Low 1.07337 · Close 1.073462024-07-02 14:06 UTC · Open 1.07345 · High 1.07368 · Low 1.07345 · Close 1.073572024-07-02 14:07 UTC · Open 1.07356 · High 1.07362 · Low 1.07342 · Close 1.073422024-07-02 14:08 UTC · Open 1.07343 · High 1.07355 · Low 1.07335 · Close 1.0735113:5414:0114:08
Open
1.07330
High
1.07349
Low
1.07330
Close
1.07342
The candle panel shows the surrounding minutes. The request comparison uses the individual records below.

Example 2 · The later quote has a lower Ask

2024-07-02 · UTC

AskBidSignal · 0 ms250 ms1,000 msDeadline · 3,000 ms
Example 2 · The later quote has a lower AskEUR/USD · Bid / Ask · t + ms1.073301.073351.073401.073451.0735002501,0003,0002024-07-02 14:01:19.749 UTC · Ask 1.07348 · Bid 1.07346 · Source row 89233 · Elapsed from signal 0 ms2024-07-02 14:01:19.852 UTC · Ask 1.07349 · Bid 1.07346 · Source row 89234 · Elapsed from signal 103 ms2024-07-02 14:01:19.955 UTC · Ask 1.07348 · Bid 1.07346 · Source row 89235 · Elapsed from signal 206 ms2024-07-02 14:01:20.162 UTC · Ask 1.07347 · Bid 1.07345 · Source row 89236 · Elapsed from signal 413 ms2024-07-02 14:01:20.265 UTC · Ask 1.07347 · Bid 1.07344 · Source row 89237 · Elapsed from signal 516 ms2024-07-02 14:01:20.522 UTC · Ask 1.07346 · Bid 1.07344 · Source row 89238 · Elapsed from signal 773 ms2024-07-02 14:01:20.780 UTC · Ask 1.07346 · Bid 1.07343 · Source row 89239 · Elapsed from signal 1,031 ms2024-07-02 14:01:20.934 UTC · Ask 1.07344 · Bid 1.07343 · Source row 89240 · Elapsed from signal 1,185 ms2024-07-02 14:01:21.038 UTC · Ask 1.07344 · Bid 1.07342 · Source row 89241 · Elapsed from signal 1,289 ms2024-07-02 14:01:21.142 UTC · Ask 1.07343 · Bid 1.07341 · Source row 89242 · Elapsed from signal 1,393 ms2024-07-02 14:01:21.347 UTC · Ask 1.07343 · Bid 1.07342 · Source row 89243 · Elapsed from signal 1,598 ms2024-07-02 14:01:21.653 UTC · Ask 1.07341 · Bid 1.07339 · Source row 89244 · Elapsed from signal 1,904 ms2024-07-02 14:01:21.757 UTC · Ask 1.07340 · Bid 1.07338 · Source row 89245 · Elapsed from signal 2,008 ms2024-07-02 14:01:22.117 UTC · Ask 1.07338 · Bid 1.07337 · Source row 89246 · Elapsed from signal 2,368 ms2024-07-02 14:01:22.170 UTC · Ask 1.07336 · Bid 1.07335 · Source row 89247 · Elapsed from signal 2,421 ms2024-07-02 14:01:22.273 UTC · Ask 1.07336 · Bid 1.07334 · Source row 89248 · Elapsed from signal 2,524 ms
Ask
1.07346
Bid
1.07343
Source row
89239
Elapsed from signal
1,031 ms

Modeled delay · 0 ms

Request time
First quote time
Ask
1.07348
Bid
1.07346
Wait from request
0 ms

Modeled delay · 250 ms

Request time
First quote time
Ask
1.07347
Bid
1.07345
Wait from request
163 ms

Modeled delay · 1,000 ms

Request time
First quote time
Ask
1.07346
Bid
1.07343
Wait from request
31 ms
The 1,000 ms request selects a lower Ask than the signal quote in this example.
12

Example 3. A missed quote before the deadline

At 2024-07-02 18:10:08.555 UTC the 250 ms lookup selected a quote at 18:10:08.864 UTC. The 1,000 ms lookup found no quote from its request time through the last eligible millisecond. The common deadline was 18:10:11.555 UTC. The space without records on the tick chart is part of the observation.

Example 3 · M1 Ask candles around the signal

2024-07-02 · UTC

Signal Quote records 538
Example 3 · M1 Ask candles around the signalEUR/USD · M1 Ask · UTC1.073201.073401.073601.073802024-07-02 18:03 UTC · Open 1.07328 · High 1.07331 · Low 1.07326 · Close 1.073282024-07-02 18:04 UTC · Open 1.07329 · High 1.07334 · Low 1.07328 · Close 1.073322024-07-02 18:05 UTC · Open 1.07333 · High 1.07336 · Low 1.07331 · Close 1.073362024-07-02 18:06 UTC · Open 1.07337 · High 1.07342 · Low 1.07337 · Close 1.073412024-07-02 18:07 UTC · Open 1.07341 · High 1.07345 · Low 1.07338 · Close 1.073402024-07-02 18:08 UTC · Open 1.07339 · High 1.07346 · Low 1.07339 · Close 1.073452024-07-02 18:09 UTC · Open 1.07344 · High 1.07350 · Low 1.07344 · Close 1.073492024-07-02 18:10 UTC · Open 1.07349 · High 1.07357 · Low 1.07344 · Close 1.073442024-07-02 18:11 UTC · Open 1.07345 · High 1.07352 · Low 1.07345 · Close 1.073492024-07-02 18:12 UTC · Open 1.07348 · High 1.07363 · Low 1.07348 · Close 1.073622024-07-02 18:13 UTC · Open 1.07363 · High 1.07365 · Low 1.07355 · Close 1.073652024-07-02 18:14 UTC · Open 1.07364 · High 1.07365 · Low 1.07360 · Close 1.073602024-07-02 18:15 UTC · Open 1.07361 · High 1.07364 · Low 1.07357 · Close 1.073622024-07-02 18:16 UTC · Open 1.07362 · High 1.07365 · Low 1.07359 · Close 1.073602024-07-02 18:17 UTC · Open 1.07359 · High 1.07360 · Low 1.07352 · Close 1.0735918:0318:1018:17
Open
1.07349
High
1.07357
Low
1.07344
Close
1.07344
The signal is visible in its minute. The chart below shows why a later request can miss even in a minute with quotes.

Example 3 · The 1,000 ms lookup misses

2024-07-02 · UTC

AskBidSignal · 0 ms250 ms1,000 msDeadline · 3,000 ms
Example 3 · The 1,000 ms lookup missesEUR/USD · Bid / Ask · t + ms1.073521.073541.073561.0735802501,0003,0002024-07-02 18:10:08.555 UTC · Ask 1.07354 · Bid 1.07353 · Source row 111513 · Elapsed from signal 0 ms2024-07-02 18:10:08.710 UTC · Ask 1.07355 · Bid 1.07354 · Source row 111514 · Elapsed from signal 155 ms2024-07-02 18:10:08.864 UTC · Ask 1.07356 · Bid 1.07354 · Source row 111515 · Elapsed from signal 309 ms2024-07-02 18:10:09.121 UTC · Ask 1.07357 · Bid 1.07354 · Source row 111516 · Elapsed from signal 566 ms2024-07-02 18:10:09.224 UTC · Ask 1.07357 · Bid 1.07355 · Source row 111517 · Elapsed from signal 669 ms2024-07-02 18:10:09.276 UTC · Ask 1.07355 · Bid 1.07353 · Source row 111518 · Elapsed from signal 721 ms
Ask
1.07356
Bid
1.07354
Source row
111515
Elapsed from signal
309 ms

Modeled delay · 0 ms

Request time
First quote time
Ask
1.07354
Bid
1.07353
Wait from request
0 ms

Modeled delay · 250 ms

Request time
First quote time
Ask
1.07356
Bid
1.07354
Wait from request
59 ms

Modeled delay · 1,000 ms

Request time
First quote time
No quote
The 250 ms request finds a quote. No record qualifies for the 1,000 ms request before the same deadline.
13

Why two delays can select the same tick

If the first quote at or after the 250 ms request also occurs at or after the 1,000 ms request, both lookups select that row. The quoted prices and elapsed time from the signal then match. The wait measured from the request time still differs by 750 ms.

14

What this sample measures

The results describe price and quote availability under the chosen signal set, archive and three-second deadline. The tape contains quotes. Live orders also depend on processing, transmission and the execution policy. A broker’s execution record supplies the outcome, time, price and quantity of an actual order.

15

Reproduce the replay

The evidence JSON contains the three lookups for every signal, exact event rows and candle data for the figures. The script takes the original July tick ZIP and the prior Buy Stop study’s evidence JSON, with both checksums recorded. The illustrated examples are the earliest in their outcome groups.

python3 eurusd-signal-delay-replay.py HISTDATA_COM_ASCII_EURUSD_T_202407.zip eurusd-buy-stop-limit-guide-evidence.json --output evidence.replayed.json

16

What to log in a live system

Keep separate timestamps for the signal, the request, the broker response and the execution. Record the clock reference, Bid, Ask and any order or deal ID. With those records you can compare the measured stages with the hypothetical delay used in a backtest.

Frequently asked questions

Which quote qualifies at 0 ms?

The signal row itself qualifies. The lookup starts with that row and includes the request timestamp.

What happens if a quote arrives exactly at the deadline?

The shared deadline is exclusive. A quote at t + 3,000 ms falls outside the replay window.

Can a longer delay give a lower quoted Ask?

Yes. In this sample the 1,000 ms Ask was lower in 49 cases with a quote. Other cases had a higher or unchanged Ask.

Can 250 ms and 1,000 ms select the same quote?

Yes. Both select the same row when the first quote after the earlier request also qualifies for the later request.

Why can I not read the request wait from M1 candles?

A minute candle summarizes a full minute. The wait needs the millisecond timestamp of the first quote that qualifies after the request.

Do the price differences measure realized slippage?

They measure changes between archived quotes. To measure realized slippage, compare an execution price with an explicitly chosen reference.

Primary sources

Created by the MyProfitFactor editorial team.

Copying or republication without attribution and an active link to the original material is prohibited. Usage policy.