Importing Data

Import is the first step in any work in MarketsReplay. Files are parsed in your browser and stored in your browser; no dataset is uploaded to a server when you import.

What you can import

  • CSV from HistData and similar historical-data sites, and generic OHLC CSV files.
  • MetaTrader 4/5 exports: bars (any timeframe) and MetaTrader 5's tick export with bid and ask columns.
  • HistData tick files — the monthly zips as downloaded, or the CSVs inside them.
  • Binary tick archives that keep bid/ask prices and real bar open times. With those, spread is not a constant you type in — it is the real spread the feed recorded, and a same-bar stop-loss / take-profit collision is resolved by the actual tick sequence instead of a convention.
  • Batch import: pick many files at once, or one .zip or .rar holding them — a whole year of month files, even a zip of HistData's own zips. The first file is reviewed; the rest go into the same dataset on their own, oldest first, and a summary lists each file at the end. A file of another instrument stops for its own review, and any file can be skipped. The file name is used to preselect the instrument when it can be parsed.
  • Overlaps are fine: bars or seconds the dataset already has are kept and the file's copies skipped — the review says how much before you confirm. A tick dataset only grows forward, so import its months oldest first (a batch does that for you).
  • The dataset remembers the names of the files it came from; they show with it on the dashboard and in the New test dialog.

Pick the instrument and the base timeframe when the app asks; a tick or second-level archive is kept as the base series, and whatever replay timeframe you choose later is built on top of it rather than replacing it.

The validation report

Nothing is imported silently. After parsing, the app shows what it found before you trade on it:

  • the covered date range and bar count;
  • gaps in the series, so you know which periods are missing;
  • time-of-day coverage, because many free sources are incomplete outside peak hours;
  • malformed rows, which are skipped and reported rather than guessed at.

If a file cannot be recognized, import fails with a message and your library is left unchanged.

Sizing

  • Roughly 48 bytes per candle (about 11 MB for one year of M1 data for a single instrument), plus a version index and a small backup manifest.
  • Tick tiers are stored in compact binary chunks instead of objects, which is what keeps multi-year tick datasets usable in a browser.
  • Large files are chunked so the browser never has to hold a whole multi-year array in memory at once.

Two years of M1 candles for four instruments is tens of megabytes, not gigabytes. If your browser is nearly full, the app tells you instead of losing data.

Dataset versions and sharing

Every dataset carries a version and the provenance it was imported with (source file, instrument, base timeframe, window origin). A test pins the dataset version it started on, so a result you saved weeks ago still describes the same data it was produced from, even after you import more of it.

You can export datasets for use in another browser, for a teammate, or for your own archive, in JSON, CSV, or zip formats, and import the same file on another machine. Datasets you imported are yours to keep; the raw files came from your data source, and the app does not redistribute historical data on your behalf.

Next