TradeOnReplayDOCSSearch the whole guidetradeonreplay.com

Guide / Home and sessions

Bringing in price data

The app replays from one-minute bars. Import a file once and it is kept on this computer; every session you start from it reads the same data.

Trying it first: DEMO/USD

A new install opens with DEMO/USD, a practice market the app makes for you on the first start: two years of one-minute bars that move like a real currency pair, with quiet and busy hours and closed weekends. Press Try it now on DEMO/USD on the dashboard to start a session on it at once. Its prices are made up, so use it to learn the app, then bring in real data to backtest. It is on UTC, so the session shading lines up. You can delete it on the Data page.

Where the data comes from

  • MetaTrader 5: the importer can install a small script into your terminal. Run it on the chart you want, choose how far back to go, then press Refresh and the export appears in the list. A calendar of news events comes with it.
  • Dukascopy, free: in the import wizard, Open Dukascopy's data page opens their historical data export in your browser. Pick the instrument and dates, choose 1 minute, Bid and the GMT time zone, and download the CSV (they may ask you to sign in for free). Then choose the file in the wizard. Its first column says "Gmt time", so the app sets the clock to UTC by itself.
  • A file you already have: choose a CSV from HistData, Binance, TradingView, your broker, or anywhere else. Tab, comma and semicolon files are all detected, and so is a decimal comma.

The app does not download market data for you. Free sources such as Dukascopy allow personal downloads under their own terms, so you fetch the file in your browser and the app reads it.

Adding newer data to a dataset

Import a newer file for an instrument you already have and, on the confirm step, set Save as to Add to that dataset. Bars at minutes it does not have yet are added and every timeframe is rebuilt; minutes it already has are kept as they are, and the result says how many of each. The file must be on the same clock as the dataset; the wizard tells you if it is not.

What the importer reads

The file hasExample
Year first, with dots, dashes or slashes2024.01.31, 2024-01-31, 2024/01/31
No separators20240131
Day first31.01.2024 (Dukascopy), 31/01/2024, 31-01-2024
Month first (US)01/31/2024
A count since 19701704205800 in seconds, or in milliseconds, microseconds or nanoseconds (Binance, TradingView). The unit is told from the size of the number.
A time with a zone14:30:00Z, 14:30:00+03:00, 14:30 UTC

Column names are matched loosely (time, Gmt time, open_time, timestamp and date with time all work). With no header row the order is date, time, open, high, low, close, volume.

A date that does not exist (a 13th month, 30 February) is refused, never turned into a plausible-looking timestamp. Rows that cannot be read are skipped and counted in the report.

Tick data

A file of ticks, one row per price change with a bid and an ask, is read too. The app builds one-minute bars from the bid as it reads, and each minute keeps its real spread, the average of ask less bid over that minute, and its number of ticks as its volume. The import step says when a file is tick data and shows the first minutes built from it. Fills then use each minute's own spread, so a rollover spike in the data is a spike in your fills.

  • MetaTrader 5's own tick export (Symbols, Ticks, Export): read as it is. MT5 leaves a price empty when it did not change, and the last one is carried on.
  • The TradeOnReplay script: turn on Export real ticks in its inputs and choose how many months. Ticks are many, a million or more a month on a busy pair, so a few months is a good start. The export appears in the list marked ticks.
  • Dukascopy tick downloads (Gmt time, Ask, Bid), files with bid and ask columns from other downloaders, and TrueFX files, which have no header.

The file is read as it streams, so a large one does not fill memory; it takes longer than a file of bars, about the time it takes to read the file once. Bars a few seconds apart (second bars) are built into minutes the same way.

Fills from real ticks

The ticks themselves are kept with the dataset, about 16 bytes each, and the Data page shows how many. In a session, the ticks of the few days around where you are are kept in hand, and orders are filled by walking them in order:

  • A stop and a target hit in the same minute are settled by which the price really reached first, not by the tie-break setting.
  • A stop fills at the first tick past it, and a short's stop is tested against each tick's own ask.

Charts of a few seconds

On a dataset made from ticks, the main chart's timeframe picker also offers S5, S15 and S30: bars of 5, 15 and 30 seconds, built from the ticks. They are offered while the replay is inside the stretch the dataset has ticks for, and the time axis shows seconds. Orders on them fill from the ticks of each bar, never from the minute the bar sits in, which would hold seconds still to come. The session's other instruments keep one-minute bars.

On any dataset, with or without ticks, a pending order now fills at the minute the price reaches it, and the position it opens is only tested for its stop and target from then on. Before, on an hourly chart, a move earlier in the same hour could stop out a position that did not yet exist.

The date format

The import step shows the format it detected and lets you change it. Change it and the file is read again with your choice. This matters for dates like 03/04/2024, which could be 3 April or 4 March: when the data cannot settle it (no day above 12 in the first rows) the importer reads it day first and says so, and the first rows shown beneath tell you at a glance whether that was right.

The clock

Most files carry times with no time zone, so you say which clock they are on. This decides which market session a trade falls in and what hour and day it counts for. MetaTrader exports are usually in the broker's server time (often GMT+2 or +3), not your own: compare the first rows with a chart if unsure.

A file that states its own zone needs no answer. An epoch count is always UTC, and a trailing Z or +03:00 is applied as the row is read, so the clock is set to UTC for you. You can change the clock later without importing again; see Data and the clock.

What is this instrument?

Pick the market from the list (forex, metals, index CFDs, futures, stocks, crypto) and the contract size, smallest trade, lot step, spread and commission fill in. Any of them can still be changed. The one that matters most is the contract size: it is the account-currency value of a 1.00 move in price, per lot, and it multiplies every profit and loss figure. Typical values are 100,000 for forex, 100 for gold, 50 for an E-mini S&P 500 future, and 1 for a share or a coin. Where brokers differ (index CFDs especially) the picker says so; check your broker's contract specification.

For futures a lot is one contract, so only whole numbers make sense. For shares it is one share. Use split- and dividend-adjusted data for stocks, or the history will show jumps that never traded.

Warnings you may see

  • Bars are not one minute. Hourly or daily bars import, but orders and stops are checked bar by bar, so fills are less exact than on one-minute data.
  • Many decimals. A price carrying more decimals than the app can store at that size is rounded, and the warning says to how many. A value that still cannot be stored is skipped, never clipped.
  • Real holes. Gaps beyond a weekend are reported. Replay skips over them like any other missing bar.