Backfill Medved Trader's charts and history from data files on your own disk — in CSV, TAB, JSON or XML — instead of from a data feed.
LOCAL Backfill is a data source like any other, except that it reads plain files from a folder you choose. Point it at a folder, drop in a file per symbol, and MT will merge that data into its own store the next time it backfills that symbol. It's the way to get data into MT that no feed of yours carries: a symbol your provider doesn't cover, history older than your feed goes back, tick data exported from another application, or data you generate yourself.
LOCAL Backfill only supplies backfill. It never streams live quotes, and it never writes to or deletes your files.
Go to Settings → Data Sources → Configure Accounts and select LOCAL Backfill.
One file per symbol, per kind of data. The name tells MT both things:
{type}_{SYMBOL}.{ext}
| Prefix | Holds | Example |
|---|---|---|
ohlc_ | Intraday bars | ohlc_AAPL.csv |
tick_ | Individual trades and quote changes | tick_MSFT.json |
hist_ | Daily end-of-day bars | hist_SPY.xml |
The extension picks the format: csv, tab, json or
xml. MT tries them in that order and uses the first file it finds, so don't keep two
formats for the same symbol and type.
Use the symbol exactly as MT shows it — the string you'd type into a symbol
box, including any type character: AAPL, $SPX, @ESZ25,
.TSLA_260515C800. There is no symbol column inside the files; if one is present it's
ignored.
Symbols containing a character Windows won't allow in a file name are adjusted: a colon becomes an
underscore, and any other invalid character becomes an exclamation mark. So RY:TSX is read
from ohlc_RY_TSX.csv.
Everything sits flat in the one folder. MT builds the exact file name and looks for it — it doesn't search, pattern-match, or descend into subfolders. If a file isn't found, the log records the exact name it expected, so you never have to guess.
Any date or time that .NET can parse will work, but ISO 8601 is what you want:
2026-08-13T09:30:00, with milliseconds for ticks
(2026-08-13T09:30:00.100). Unix/epoch numbers are not supported.
In CSV and TAB files the timestamp can be one datetime column or a separate
date and time pair — MT works out which from the header and joins the
two halves itself.
Intraday times must be UTC. Medved Trader stores intraday ticks in UTC, and LOCAL
Backfill takes your timestamps exactly as written — it does not convert time zones. Feed it
market-local times and every bar lands hours away from where it belongs. This applies to
ohlc_ and tick_ files; hist_ files carry a plain trading date
with no time, so the question doesn't arise there.
Copying data out of MT's Raw Data window gives you Date,Time,Price,Bid,Ask,Volume, which
LOCAL Backfill reads — but those times are written in the time zone MT displays, not UTC. Convert
them before feeding them back in.
ohlc_SYMBOL.csv .tab .json .xml
| Field | Required | Notes |
|---|---|---|
datetime | Yes | Or date + time as two columns. UTC. |
close | Yes | |
open | No | Defaults to the previous bar's close |
high, low | No | Default to that bar's close |
volume | No | vol is also accepted |
Supply 1-minute bars. MT expands each bar into open, high, low and close ticks spaced across a one-minute window. Coarser bars still load, but all four prices land inside the first minute of the period rather than spread across it.
datetime,open,high,low,close,volume
2024-01-02T09:30:00,185.50,186.20,185.10,185.90,123456
2024-01-02T09:31:00,185.90,186.50,185.75,186.30,98765
Or with the date and time in separate columns:
Date,Time,Open,High,Low,Close,Volume
06/10/26,09:30:00,185.50,186.20,185.10,185.90,123456
06/10/26,09:31:00,185.90,186.50,185.75,186.30,98765
An array of objects. Long or short field names, detected per row:
[
{"datetime":"2024-01-02T09:30:00","open":185.50,"high":186.20,"low":185.10,"close":185.90,"volume":123456},
{"datetime":"2024-01-02T09:31:00","open":185.90,"high":186.50,"low":185.75,"close":186.30,"volume":98765}
]
[
{"t":"2024-01-02T09:30:00","o":185.50,"h":186.20,"l":185.10,"c":185.90,"v":123456},
{"t":"2024-01-02T09:31:00","o":185.90,"h":186.50,"l":185.75,"c":186.30,"v":98765}
]
<bars>
<bar><datetime>2024-01-02T09:30:00</datetime><open>185.50</open><high>186.20</high><low>185.10</low><close>185.90</close><volume>123456</volume></bar>
</bars>
tick_SYMBOL.csv .tab .json .xml
| Field | Required | Notes |
|---|---|---|
datetime | Yes | Or date + time as two columns. UTC. |
price, volume | No | The trade |
bid, ask | No | The quote |
A record can be a trade, a quote change, or both — omit or zero whatever doesn't apply. A row
with price and volume both 0 but a bid or ask present is treated as a
quote-only tick: the bid/ask updates and no trade is recorded. That's how you supply bid/ask history.
datetime,price,volume,bid,ask
2024-01-02T09:30:00.100,185.50,200,185.49,185.51
Or with the date and time in separate columns:
Date,Time,Price,Bid,Ask,Volume
06/10/26,14:15:36,185.50,185.49,185.51,200
06/10/26,14:15:37,0,185.50,185.52,0
[
{"datetime":"2024-01-02T09:30:00.100","price":185.50,"volume":200,"bid":185.49,"ask":185.51},
{"datetime":"2024-01-02T09:30:00.200","price":0,"volume":0,"bid":185.50,"ask":185.52},
{"datetime":"2024-01-02T09:30:00.300","price":185.51,"volume":100}
]
Short names work here too — note that price is c:
[
{"t":"2024-01-02T09:30:00.100","c":185.50,"v":200,"b":185.49,"a":185.51},
{"t":"2024-01-02T09:30:00.200","c":0,"v":0,"b":185.50,"a":185.52}
]
<ticks>
<tick><datetime>2024-01-02T09:30:00.100</datetime><price>185.50</price><volume>200</volume><bid>185.49</bid><ask>185.51</ask></tick>
<tick><datetime>2024-01-02T09:30:00.200</datetime><price>0</price><volume>0</volume><bid>185.50</bid><ask>185.52</ask></tick>
</ticks>
hist_SYMBOL.csv .tab .json .xml
| Field | Required | Notes |
|---|---|---|
date | Yes | A plain trading date — no time, no time zone |
close | Yes | |
open | No | Defaults to the previous day's close |
high, low | No | Default to that day's close |
volume | No |
Daily history is the one place with no day limit — supply as much as you have.
date,open,high,low,close,volume
2023-12-29,185.00,186.50,184.75,185.20,45678900
2024-01-02,185.20,187.10,184.90,186.80,52345600
Use date here rather than datetime:
[
{"date":"2023-12-29","open":185.00,"high":186.50,"low":184.75,"close":185.20,"volume":45678900},
{"date":"2024-01-02","open":185.20,"high":187.10,"low":184.90,"close":186.80,"volume":52345600}
]
[
{"t":"2023-12-29","o":185.00,"h":186.50,"l":184.75,"c":185.20,"v":45678900},
{"t":"2024-01-02","o":185.20,"h":187.10,"l":184.90,"c":186.80,"v":52345600}
]
The root is <history> and rows use <date>, not
<datetime>:
<history>
<bar><date>2023-12-29</date><open>185.00</open><high>186.50</high><low>184.75</low><close>185.20</close><volume>45678900</volume></bar>
</history>
| Data | How far back |
|---|---|
| Intraday OHLC | Your Intraday OHLC Backfill setting — up to 120 days |
| Ticks | Your Intraday TICK Backfill setting — default 5 days, up to 120 |
| Daily history | No limit |
Rows older than those windows are read but not kept. Medved Trader's own limit on how many days of tick data it stores applies on top of this, so raising the backfill setting alone won't make MT hold more intraday data than it's configured to store.
There's no cap on file size or row count, but a file is read into memory whole — a multi-hundred-megabyte tick file will cost you the memory to match. Symbols are backfilled one at a time, up to 20 at once.
Nothing. Files are opened, read, and left exactly as they were — never moved, renamed, rewritten or deleted. Every backfill re-reads the file from disk, so updating a file is enough to make the new data available; there's no cache to clear and no import step to repeat.
| Symptom | Usually |
|---|---|
| Nothing loads for a symbol | The file name doesn't match. The log records the exact name MT looked for — compare it against what's in the folder, watching for the symbol's type character and the character substitutions above. |
| A CSV or TAB file loads nothing | A required column is missing or misspelled in the header row. The log names the column it couldn't find. |
| Some rows are missing | Rows whose date can't be parsed, and rows dated before 1901, are skipped silently. Check the format of the timestamps in the rows that vanished. |
| Bars land at the wrong time of day | The timestamps aren't UTC. See Timestamps above. |
| Bars are there but flat or missing prices | A price of 0 is read as "not supplied" and filled in from the close. Supply real values, or leave the field out deliberately. |
| Data older than a few days never appears | The backfill day settings, or MT's tick storage limit, are trimming it. See Limits. |