The Short Answer
Two routes exist, and which suits you depends entirely on what happens next.
Export straight from MetaTrader when you need prices matching the trading account you actually use, complete with that broker’s spread and commission assumptions. Use a prepared dataset from a third-party provider when you want long price history quickly and broker-specific quirks matter less.
| What you want to do | Best route | Format |
| Reproduce your own broker’s backtest conditions | MetaTrader export script | JSON or CSV |
| Get years of EURUSD history fast | Prepared dataset from a provider | CSV |
| Open it in Excel | Either route | CSV |
| Load it into Expert Advisor Studio | Either route | JSON |
| Analyze in Python or R | Either route | CSV |
| Test across several price sources | Both, compared | Either |
Whatever you end up with, check four things before trusting it: the timezone, the timeframe, whether prices are bid or ask, and how many bars are missing. Skipping that check is how people spend a fortnight building strategies on a broken dataset.
Why This Pair in Particular
Worth a brief tangent. The euro against the dollar is the most heavily traded instrument in global forex, which produces two practical benefits for anyone studying price records: spreads stay tight, and archives run deeper than almost anything else available.
Deeper archives mean longer testing samples. Tighter spreads mean cost assumptions distort your results less. Neither guarantees that a system working here transfers to thinner pairs, and plenty don’t, but as a starting instrument for learning this workflow it’s hard to beat.

What This Dataset Actually Contains
Vague terminology causes more problems here than anything technical. A file labelled “EURUSD M15” could mean several different things.
| Field | What to establish |
| Symbol | EURUSD, plus any broker suffix such as .m or pro |
| Type | Individual ticks, or aggregated OHLC bars |
| Price basis | Bid, ask, or mid |
| Timezone | Server time or UTC, and they are rarely identical |
| Timeframes | M1, M5, M15, H1, D1, and so on |
| Range | Exact first and last timestamp |
| Format | CSV or JSON |
| Gaps | Removed, retained, or filled |
| Weekends | Included as empty periods, or excluded |
| Daylight saving | How the provider handles the twice-yearly change |
MetaTrader exports typically give you bid-side OHLC bars stamped in the broker’s server time. Most feeds work that way, though “most” is not “all”, so confirm rather than assume.
Ticks Against Bars
Ticks are individual price updates, arriving irregularly, sometimes several per second during active sessions. Bars aggregate those ticks into fixed intervals, keeping only the opening, high, low, and closing values.
| Aspect | Tick records | OHLC bars |
| Detail | Every quote change | Four values per interval |
| Size | Enormous, gigabytes per year | Manageable |
| Best for | Modelling execution and intrabar behavior | Strategy development and general analysis |
| Weakness | Slow, and often needs cleaning | Hides what happened inside each interval |
That final weakness matters more than beginners expect. A bar tells you the low reached 1.0840, but not whether that low came before or after the high, which determines whether your protective exit or your target triggered first.
CSV or JSON?
Straightforward choice, really.
CSV opens in Excel, Google Sheets, pandas, R, and virtually every charting package. Choose it for analysis or anything involving a spreadsheet.
JSON is what Expert Advisor Studio expects. Choose it when the destination is that software specifically.
Nothing stops you generating both. The export step costs seconds either way.
Exporting From MetaTrader 4
This is the route giving you prices from your own account, and the transcript version of these steps was recorded years ago, so treat interface details as approximate and check your build.
Step 1: Load more bars into the platform
Fresh MetaTrader installations hold very little price history. Open the EURUSD chart on M1, press and hold the Home key, and watch the chart march backwards as older bars arrive. When movement stops, repeat on M5, then M15, and so on through every timeframe you plan to use.

You do this once. After that, history accumulates naturally as new quotes arrive, which is honestly the better way to build a deep archive. Most broker feeds start you off with far less than you’d like.
Step 2: Remove the 65K ceiling
Tools, then Options, then the Charts tab. Two fields matter: max bars in history and max bars in chart. Both default to 65536 on a new installation, which caps everything you can export.
Press and hold the 9 key in each field until the number stops growing, then confirm. Hold Home again afterwards and considerably more history loads.
Worth knowing: your machine’s memory and your broker’s own archive still limit what actually arrives. Raising the ceiling permits more; it doesn’t create bars that were never there.
Step 3: Place the export script
- File, then Open Data Folder.
- Open MQL4, then Scripts.
- Paste the export script into that folder.
- Close the window, right-click Scripts in the Navigator panel, choose Refresh.
- The script name appears once MetaTrader compiles it.
MT5 users follow the same path through MQL5 instead, using the MT5 version of the script.


Step 4: Run it.
Drag the script onto your EURUSD chart. A small dialog appears asking for three values:
- Maximum bar count: I generally set 200,000. First time round, 100,000 is plenty, since you won’t have accumulated much yet.
- Spread: Entering the current figure works fine. Leaving zero rounds upward to the next ten points, so a typical EURUSD spread of three to five becomes ten, while a wider pair sitting at twenty-three becomes thirty. Conservative, deliberately.
- Commission per lot: My account with JFD charged six dollars per lot, so I entered six.
Confirm, and the upper left corner reports what was written: 200,000 bars on M1, the same on M5, decreasing counts on higher timeframes, and something like 1,576 daily bars.

Step 5: Find the output.
File, Open Data Folder, MQL4, then the subfolder named Files. Your exports are sitting there.
Loading Into Expert Advisor Studio
Open the software, go to Data, and either drag the exports onto the drop zone or click to upload. I drag them, out of habit.
Check the result before building anything. The Generator’s source selector should now show your broker’s dataset, and clicking through reveals the exact range covered. Mine read from 21 February 2018 through to the moment I recorded that lecture in December 2019.
Why the History Center Is the Wrong Source
Tools, then History Center, looks like the obvious place to get EURUSD prices. It usually isn’t.
Try it and MetaTrader warns you plainly: you are about to pull records from MetaQuotes rather than from the firm holding your account. That warning exists for a reason. Prices differ between feeds, sometimes noticeably, and a system built on one company’s quotes may behave differently on another’s.
That said, the earlier version of this article overstated the case. The right source depends on your purpose:
| Purpose | Preferred source |
| Reproducing your live execution environment | Your own broker |
| General market research | Any reputable standardized dataset |
| Checking whether rules survive different quotes | Several independent sources, compared |
| Building on a brand-new account with thin history | Third-party, then re-verify against your broker later |
Testing across multiple sources is arguably the most useful of those and the one almost nobody does. If a system only works on one feed, that tells you something important.
Opening the CSV in Excel
Avoid double-clicking. Excel’s automatic parsing mangles dates and drops leading zeros, and you may not notice until results look strange.
- Open Excel first, then Data, then the From Text/CSV option.
- Pick the file, check the delimiter preview.
- Set the timestamp column to Text initially, then convert deliberately.
- Confirm decimals parsed correctly, since regional settings turn 1.0840 into 10840 on some machines.
Spot-check a handful of rows against a chart before doing anything serious with it.
Using It in Python
import pandas as pd
df = pd.read_csv(“eurusd_m15.csv”, parse_dates=[“time”])
df = df.sort_values(“time”).drop_duplicates(“time”)
print(df[“time”].diff().value_counts().head())
That last line is the useful one. It counts the gaps between consecutive timestamps, and on clean M15 records you should see mostly fifteen-minute intervals with weekend gaps appearing as a small cluster of larger values. Anything else warrants investigation.
Checking the Timezone
Server time and your local clock rarely match. When I recorded the original walkthrough it was fifteen minutes past midnight where I was, while the dataset showed just after quarter past ten in the evening, because the server ran on GMT.
Two hours of difference shifts every session boundary in your analysis. Rules filtering for the London open will target the wrong hours entirely.
Establish the offset by comparing a known event: the daily bar boundary, or the Sunday market open, against your own clock. Then write it down somewhere, because you will forget.
Quality Checks Before You Trust Anything
The original article claimed a maximum gap of three days proved there were no missing days. That reasoning doesn’t hold, since a three-day interval describes an ordinary weekend and says nothing about missing intraday bars.
Here’s what actually needs checking:
| Check | Why it matters |
| First and last timestamp | Confirms the range covers what you need |
| Total bar count against expected | Reveals wholesale gaps |
| Duplicate timestamps | Distorts every calculation downstream |
| Missing intraday bars | Common around holidays and server maintenance |
| OHLC consistency | High must contain open and close; low likewise |
| Implausible jumps | Flags bad quotes that survived into the export |
| Zero-volume bars | Sometimes padding rather than real activity |
| Weekend intervals | Should appear regularly and predictably |
| Daylight saving transitions | Two per year, and they shift everything by an hour |
| Spread and commission units | Points against pips confuses cost models constantly |
Ten minutes on these checks saves considerably more later. I’ve learned that expensively.
Spread, Commission, and Swap Units
Units cause more errors here than any other single thing.
Spread in the export dialog is measured in points, not pips. On a five-digit EURUSD quote, ten points equals one pip. Entering zero triggers the rounding described earlier, which produces a deliberately pessimistic assumption rather than a realistic one, and that’s the point: better to be surprised upward.
Real spreads vary by session anyway. Widening around rollover and major releases is normal, and a fixed figure in your test cannot capture that.
Commission gets entered in your trading account’s currency, per lot. Six dollars per lot means your test charges that on every position.
Swap applies to positions held past rollover and doesn’t appear in the export dialog at all. Anything holding overnight needs swap values pulled separately from your broker’s contract specification.
How Much History Is Enough?
More than you think, and this is where the original article made its strongest point.
Run a system across a short sample and it might show a lovely curve. Extend the same logic across several more years and that curve frequently falls apart, because the short window happened to suit the rules.
Rough guidance rather than rules:
- Fewer than a few hundred positions across the test proves very little.
- Several thousand positions across multiple years is where results start meaning something.
- Include at least one period of high volatility and one quiet trading stretch.
- Reserve a segment you never optimize against, then check performance there separately.
A ruleset producing 3,400 positions across a deep sample deserves more attention than one producing forty across six months, even if the second curve looks prettier.
Common Problems
| Symptom | Likely cause |
| Script missing from Navigator | Placed in the wrong folder, or not refreshed |
| Far fewer bars than expected | Bar ceiling still at 65536, or Home not held long enough |
| Empty export on higher timeframes | Those charts never loaded; open each one first |
| Timestamps look wrong by hours | Server timezone, not an error |
| Excel shows dates as numbers | Spreadsheet parsing, not the export |
| Backtest differs from a colleague’s | Different price source, spread, or commission assumptions |
| Gaps around specific dates | Holiday closures or server maintenance, usually legitimate |
About the Tools Mentioned
Straight disclosure, since the earlier version buried this.
Expert Advisor Studio and the export scripts described above are products I’m connected to commercially. That doesn’t make them unsuitable, and the MetaTrader steps work regardless of what you load the results into, but you should know the relationship exists when weighing the recommendation.
Free options for obtaining EURUSD price history include your broker’s own tools, several public dataset repositories, and various open-source export scripts. Anything charging for basic currency history is worth questioning, given how widely available it is.
Frequently Asked Questions
Is EURUSD price history free?
Generally yes. Broker exports cost nothing beyond having a trading account, demo ones included, and several providers publish substantial archives at no charge. Paid services typically sell either tick-level detail, longer coverage reaching back decades, or cleaned datasets with documented gap handling. For most development work on bars, free sources are entirely adequate. Assess what you’re actually paying for before subscribing, since “premium” occasionally means nothing more than a tidier interface around public information.
Why do two sources show different prices for the same minute?
Because currency trading happens over the counter rather than on a central exchange, so no single official price exists. Each firm aggregates quotes from its own liquidity providers, producing small differences in every bar, plus variation in spread and in exactly when a bar opens. Discrepancies of a fraction of a pip are normal. Larger divergences suggest a timezone mismatch or a feed problem, both worth investigating before building anything on the numbers.
Can I load exported records back into MetaTrader?
Yes, through the History Center’s load function, though results vary and the platform sometimes overwrites what you add when it reconnects. Format requirements are strict regarding column order and timestamp structure. Many people find it easier to work with external analysis tools than to fight the platform’s own archive. If you do attempt it, back up the existing archive first, because the operation is not easily reversed.
What timeframes should I export?
Export every timeframe you might realistically use, since regenerating later means repeating the whole loading process. M1 is the most valuable because higher intervals can be rebuilt from it, though rebuilding requires care around session boundaries. Bear in mind that M1 covering several years is a large file, so storage and processing time both increase. Most people settle on M1, M15, H1, and D1 as a practical starting set.
Does this method work for other currency pairs?
Yes, identically. Load each chart, hold Home until movement stops, then run the script on that symbol. GBPUSD, USDJPY, AUDUSD and the rest behave the same way, though quote precision differs: JPY pairs carry three decimals rather than five, which changes what a point represents. Adjust spread and commission values per instrument, since they vary considerably, and never assume settings from one pair transfer to another.
How far back does broker history usually go?
Rarely as far as people hope. New accounts often start with only months of intraday records, and depth varies by timeframe, with daily bars typically reaching much further back than minute bars. Coverage extends gradually as your platform stays connected and collects new quotes. Anyone needing a decade of minute-level detail immediately will need a third-party archive, since waiting for a broker feed to accumulate that is not realistic.
Should I remove weekend gaps before analysis?
Depends what you’re doing. Backtesting usually handles them fine, since the market genuinely was closed and treating that as missing information would be wrong. Statistical work involving continuous returns sometimes needs adjustment, because a Friday-to-Monday move spans more real time than the timestamps suggest. Document whichever choice you make. Undocumented cleaning is how two people using the same source reach incompatible conclusions and never work out why.
What does “cleaned” mean when a provider advertises it?
Usually some combination of duplicate removal, outlier filtering, gap documentation, and timezone standardization. The trouble is that “cleaned” carries no agreed definition, so one provider’s filtering removes genuine volatility spikes while another leaves obvious errors untouched. Ask what specifically was changed and how. If no methodology is published, treat the label as marketing and run your own checks anyway, using the table earlier on this page as a starting point.
Disclosure: Educational content only. Some tools referenced here are commercially connected to the author, as noted above. Nothing on this page constitutes a recommendation to trade, and past price behavior does not indicate future movement.

Petko Aleksandrov




