Free learning tools Test your finance and trading knowledge before you build, buy, or automate.
FREE GOLD CSV DATASET - MT5 / PYTHON READY

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.

Rows

100,000 OHLC candles plus header.

Timeframe

M30, useful for swing, intraday and gold EA testing.

Symbol Format

XAUUSDm broker suffix. Rename/mapping may be needed for other brokers.

Use Cases

MT5 testing, Python backtests, feature engineering and ML experiments.

CSV Columns Explained

ColumnMeaningBacktesting Note
TimestampBroker candle open time.Use it as the index in Python and verify timezone before comparing another broker.
Open, High, Low, CloseGold candle prices.Validate that High is not below Open/Close and Low is not above Open/Close.
TickVolumeNumber of broker ticks inside the candle.Tick volume is broker-feed activity, not centralized exchange volume.
SpreadRecorded broker spread value.Do not ignore spread when testing scalpers or pending orders.

How to Use This XAUUSD CSV Correctly

  1. Download the CSV and run it through the XAUUSD CSV Data Quality Checker.
  2. Check missing candles, duplicate timestamps, abnormal jumps, bad OHLC rows and spread behavior.
  3. Normalize symbol naming if your broker uses XAUUSD, XAUUSDm, XAUUSD.pro or another suffix.
  4. For Python, sort candles ascending by timestamp before calculating indicators.
  5. 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

Good For

Researching gold volatility, M30 swing behavior, rough EA logic, feature engineering and CSV import testing.

Not Enough For

Claiming live profitability without tick data, bid/ask execution, slippage, news risk and broker-specific testing.

Best Next Step

Use the EA Backtest Reality Checker before trusting any curve.

Custom Work

Need M1, tick-level, broker-specific exports or an EA built around this? Request a custom data or EA quote.

🚀 Invite friends — Earn $5 You both get $5 credit on Go Ad · opencode.ai AI-Powered Coding Agent — Try Free Build apps, fix bugs & ship faster with opencode. Get $5 free credit when you join. × Ad · quo.com QuoPhone — $20 Visa Gift Card Free Sign up to Quo, subscribe 3 months, get a $20 Visa gift card. Atif's referral gift for you. ×