DataConvert
A free, open-source tool that converts historical market data CSV files into partiqon's BAR6 binary format. Runs entirely on your computer — your raw data never leaves your machine.
Step 1 — Install Python
DataConvert is a Python script. If you don't have Python, download it from python.org (version 3.9 or newer). During installation, check the box "Add Python to PATH".
To verify Python is installed, open a terminal (Windows: press Win + R, type cmd, press Enter) and type:
You should see something like Python 3.11.5. Any version 3.9+ works.
Step 2 — Download DataConvert
Go to github.com/hangmann/bar6-dataconvert and download the ZIP file (click the green Code button → Download ZIP). Extract the ZIP to any folder, for example C:\DataConvert.
The only file you need is dataconvert.py.
Step 3 — Get your market data CSV
You need historical price data for the instrument you want to test. Several sources work out of the box:
| Source | Format | How to get it |
|---|---|---|
| Dukascopy | Tick CSV | dukascopy.com → Research Tools → Historical Data Feed. Free, requires registration. Select currency pair, date range, tick data, export CSV. |
| MT4 / MT5 | Bar CSV or .hst | In MT4/MT5: Tools → History Center → select instrument → Export. |
| TradingView | CSV export | Open chart → click the download icon below the chart. |
| NinjaTrader | CSV | NinjaTrader → Tools → Historical Data → Export. |
| TradeStation | CSV | Insert → Data Window → File → Save As CSV. |
| Binance | Klines CSV | data.binance.vision → spot/monthly/klines → pick pair and interval → download ZIP. |
| Bybit / Kraken | OHLCV CSV | Exchange history export. Use --format bybit. |
Step 4 — Run DataConvert (GUI — easiest)
Open a terminal in the DataConvert folder (on Windows: hold Shift, right-click the folder → "Open PowerShell window here") and run:
A window opens. Here's what to fill in:
- Input File: click Browse and select your CSV (or .hst) file.
- Format: leave on "auto" — it detects Dukascopy, MT4, TradingView, etc. automatically. Change only if auto-detection fails.
- Symbol: the name you want to use in partiqon. Examples:
EURUSD,BTCUSDT,DAX40. Keep it short, no spaces. - Timeframe: in minutes. 1 = M1, 5 = M5, 60 = H1, 1440 = D1. For tick data this is the aggregation target.
- Output File: where to save the .bin file. Click Browse to choose a location.
Click Convert & Write .bin. The log at the bottom shows progress. When it says "DONE", your file is ready.
Step 4 (alternative) — Command line
If you prefer the command line:
Swap INPUT.csv for your actual file, OUTPUT.bin for where to save, EURUSD for your symbol name, and 5 for timeframe in minutes.
Common examples
Step 5 — Upload to partiqon
In the partiqon workspace, go to Settings → Data and upload your .bin file. Select the symbol and timeframe that match what you used during conversion. partiqon confirms the file is valid and shows you the date range it covers.
Supported input formats
| Format name | What it handles |
|---|---|
auto | Auto-detects from file extension and content (recommended) |
dukascopy | Dukascopy tick CSV (LocalTime, Ask, Bid, AskVolume, BidVolume) |
mt4 / mt5 | MetaTrader 4/5 bar CSV |
mt4hst | MT4 binary .hst history file |
tradingview | TradingView export (time, open, high, low, close, volume) |
ninjatrader | NinjaTrader bar CSV |
tradestation | TradeStation EasyLanguage bar CSV |
binance | Binance historical klines (data.binance.vision, ms timestamps) |
bybit | Bybit / Kraken / Coinbase OHLCV CSV (Unix second timestamps) |
generic | Any OHLCV CSV — auto-detects columns, or use "Map Columns" in GUI |
Frequently asked questions
My CSV has a weird date format — will it work?
Probably. DataConvert recognises DD.MM.YYYY, YYYY-MM-DD, MM/DD/YYYY, NinjaTrader's compact YYYYMMDD-HHMMSS, Unix timestamps in seconds, and Unix timestamps in milliseconds. If your format is something else, use the generic format with Map Columns.
How big will the .bin file be?
Bar files use 56 bytes per bar. A 5-year M5 dataset (≈260,000 bars) is about 14 MB. Tick files use 32 bytes per tick — a full year of dense FX tick data is typically in the range of 500 MB–1 GB depending on the instrument.
Can I use tick data for backtesting?
Yes. If your data is raw tick-level CSV (bid/ask per tick), add the --ticks flag to save raw ticks instead of aggregated bars:
The --tf value is ignored when --ticks is set — partiqon will aggregate ticks to the timeframe you choose at backtest time.
I get "Python is not recognized"
Python isn't in your system PATH. Reinstall Python from python.org and check "Add Python to PATH" during setup. Or find Python manually: on Windows, search for python.exe in C:\Users\YourName\AppData\Local\Programs\Python and use the full path.