XAUUSD M30 Historical Data CSV Free Download
Download a real 100,000-row XAUUSDm M30 OHLC CSV file for gold EA backtesting, Python research, data-quality testing and strategy validation. The page also explains the exact columns and the checks you should run before trusting any backtest.
100,000 OHLC candles plus header.
M30, useful for swing, intraday and gold EA testing.
XAUUSDm broker suffix. Rename/mapping may be needed for other brokers.
MT5 testing, Python backtests, feature engineering and ML experiments.
CSV Columns Explained
| Column | Meaning | Backtesting Note |
|---|---|---|
| Timestamp | Broker candle open time. | Use it as the index in Python and verify timezone before comparing another broker. |
| Open, High, Low, Close | Gold candle prices. | Validate that High is not below Open/Close and Low is not above Open/Close. |
| TickVolume | Number of broker ticks inside the candle. | Tick volume is broker-feed activity, not centralized exchange volume. |
| Spread | Recorded broker spread value. | Do not ignore spread when testing scalpers or pending orders. |
How to Use This XAUUSD CSV Correctly
- Download the CSV and run it through the XAUUSD CSV Data Quality Checker.
- Check missing candles, duplicate timestamps, abnormal jumps, bad OHLC rows and spread behavior.
- Normalize symbol naming if your broker uses XAUUSD, XAUUSDm, XAUUSD.pro or another suffix.
- For Python, sort candles ascending by timestamp before calculating indicators.
- For MT5 testing, include spread, slippage, commission and broker stop-level assumptions.
Python Backtesting Starter
This starter keeps the logic simple: load the file, parse time, sort history and create a basic candle range feature. It is intentionally not a trading recommendation.
import pandas as pd
df = pd.read_csv("XAUUSDm_PERIOD_M30_OHLC.csv")
df["Timestamp"] = pd.to_datetime(df["Timestamp"])
df = df.sort_values("Timestamp").set_index("Timestamp")
df["range"] = df["High"] - df["Low"]
df["body"] = (df["Close"] - df["Open"]).abs()
df["direction"] = (df["Close"] > df["Open"]).astype(int)
print(df.tail())
print(df[["range", "body", "TickVolume", "Spread"]].describe())
What This Dataset Can and Cannot Prove
Researching gold volatility, M30 swing behavior, rough EA logic, feature engineering and CSV import testing.
Claiming live profitability without tick data, bid/ask execution, slippage, news risk and broker-specific testing.
Use the EA Backtest Reality Checker before trusting any curve.
Need M1, tick-level, broker-specific exports or an EA built around this? Request a custom data or EA quote.
Choose the next useful step
Most visitors arrive with one question: build, test, price, or trust. These shortcuts keep the path practical.