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

XNGUSD (Natural Gas) Historical Data CSV Free Download

Natural gas (XNGUSD) is the most volatile instrument in this collection — weather-driven, seasonally explosive and impossible to model with equity-style assumptions. The dataset starts March 2022, right at the start of the European energy crisis, and captures the August 2022 spike, the 2023–2024 collapse back to normal levels and the full 2024–2026 cycle. If you trade natgas, or you want to prove your risk engine survives a genuinely wild instrument, this is the dataset.

391,260

OHLC candles across 9 timeframes.

M1 → MN1

Nine separate CSV files in one ZIP.

Mar 2022 – Oct 2026

Live dataset, exported 19 October 2026.

CSV

Timestamp, Open, High, Low, Close, TickVolume, Spread.

5.21 MB

ZIP size, plain uncompressed CSV inside.

XNGUSDm

MT5 export symbol — rename to match your broker.

XNGUSD Historical Data — Timeframe Breakdown

FileRowsFromTo
XNGUSDm_PERIOD_M1_OHLC.csv100,0002026-07-072026-10-19
XNGUSDm_PERIOD_M5_OHLC.csv100,9142025-05-052026-10-19
XNGUSDm_PERIOD_M15_OHLC.csv100,2492022-06-272026-10-19
XNGUSDm_PERIOD_M30_OHLC.csv54,0122022-03-202026-10-19
XNGUSDm_PERIOD_H1_OHLC.csv27,0442022-03-202026-10-19
XNGUSDm_PERIOD_H4_OHLC.csv7,3192022-03-202026-10-19
XNGUSDm_PERIOD_D1_OHLC.csv1,4262022-03-202026-10-19
XNGUSDm_PERIOD_W1_OHLC.csv2402022-03-202026-10-18
XNGUSDm_PERIOD_MN1_OHLC.csv562022-03-012026-10-01

M1, M5 and M15 contain the most recent 100,000 candles (the MetaTrader 5 terminal window). M30 and above carry the full broker history since .

CSV Columns Explained

ColumnMeaningBacktesting Note
TimestampBroker candle open time (server time).Check the server offset before aligning with NYMEX/ICE session data.
Open, High, Low, CloseXNGUSD candle prices.Validate High ≥ max(Open, Close) and Low ≤ min(Open, Close).
TickVolumeBroker tick activity inside the candle.Not exchange volume — use it as an activity proxy.
SpreadRecorded broker spread.Keep it: energy CFDs widen at the daily rollover and around the weekly EIA inventory report.

How to Use the XNGUSD Data

  1. Download the ZIP and extract the nine CSV files.
  2. For MT5: import the CSVs into a custom symbol (Market Watch → Symbols → Create Custom Symbol → Import Bars) and run Strategy Tester backtests on the exact series.
  3. For Python: load with pandas, parse the Timestamp column, sort ascending and build features (returns, range, session flags).
  4. Run a data-quality pass first: duplicate timestamps, OHLC violations and unexpected gaps are the three checks that catch most bad imports.
  5. Keep the daily settlement break and weekend gaps in your assumptions — energy CFDs widen spreads at rollover and gap over weekends.
import pandas as pd

df = pd.read_csv("XNGUSDm_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["ret"]   = df["Close"].pct_change()

print(df.tail())
print(df[["range", "body", "TickVolume", "Spread"]].describe())

Also Known As

XNGUSD is listed under several names depending on the broker: XNGUSD, NATGAS, NGAS, Henry Hub CFD. The dataset works with any of them — rename the files or the custom symbol to match your MT5 Market Watch exactly.

XNGUSD Historical Data — FAQ

How far back does the XNGUSD data go?

XNGUSD data spans Mar 2022 – Oct 2026 overall. M30, H1, H4, D1, W1 and MN1 hold the full broker history; M1, M5 and M15 contain the most recent 100,000 candles each (the MT5 terminal window). All files end with the latest bar at export time — 19 October 2026.

What does XNGUSD mean?

XNGUSD is the broker symbol for the natural gas CFD — XNG stands for the gas contract, USD for its dollar quotation, and the trailing “m” (XNGUSDm) is this broker’s server suffix. Other brokers list the same instrument as NATGAS, NGAS or GAS. Rename the files to match your own MT5 Market Watch.

Which MT5 symbol name does this dataset use?

The files are exported from the XNGUSDm symbol (broker “m” suffix). Rename them to match your own broker’s symbol — XNGUSD, NATGAS, NGAS, Henry Hub CFD. The CSV structure (Timestamp, Open, High, Low, Close, TickVolume, Spread) is identical across brokers.

Can I use this data for MT5 backtesting and machine learning?

Yes. Every file is plain CSV: Timestamp, Open, High, Low, Close, TickVolume, Spread. Energy CFDs trade nearly around the clock on weekdays with a daily settlement break — the series reflects the broker’s real sessions, including spread widening at the daily rollover and the weekend gaps. Load it as an MT5 custom symbol for Strategy Tester runs, or directly in pandas.

Related Datasets

Need an EA Tested on This Data?

We build MT5 Expert Advisors for energy CFDs and validate them on clean datasets like this one — with realistic spread, rollover and gap assumptions.

Build an EA Get Custom Data
🚀 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. ×