Documentation

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.

Download: github.com/hangmann/bar6-dataconvert · Requires Python 3.9 or later.

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:

python --version

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:

SourceFormatHow to get it
DukascopyTick CSVdukascopy.com → Research Tools → Historical Data Feed. Free, requires registration. Select currency pair, date range, tick data, export CSV.
MT4 / MT5Bar CSV or .hstIn MT4/MT5: Tools → History Center → select instrument → Export.
TradingViewCSV exportOpen chart → click the download icon below the chart.
NinjaTraderCSVNinjaTrader → Tools → Historical Data → Export.
TradeStationCSVInsert → Data Window → File → Save As CSV.
BinanceKlines CSVdata.binance.vision → spot/monthly/klines → pick pair and interval → download ZIP.
Bybit / KrakenOHLCV CSVExchange 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:

python dataconvert.py

A window opens. Here's what to fill in:

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:

python dataconvert.py INPUT.csv OUTPUT.bin --symbol EURUSD --tf 5

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

# Tick CSV → M5 bars python dataconvert.py my_ticks.csv EURUSD_M5.bin --symbol EURUSD --tf 5 # MT4 bar CSV python dataconvert.py bars.csv DAX_M1.bin --symbol DAX40 --tf 1 --format mt4 # Generic OHLCV CSV (auto-detect) python dataconvert.py my_bars.csv BTCUSDT_H1.bin --symbol BTCUSDT --tf 60 # Check what’s in an existing .bin file python dataconvert.py --info my_data.bin

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 nameWhat it handles
autoAuto-detects from file extension and content (recommended)
dukascopyDukascopy tick CSV (LocalTime, Ask, Bid, AskVolume, BidVolume)
mt4 / mt5MetaTrader 4/5 bar CSV
mt4hstMT4 binary .hst history file
tradingviewTradingView export (time, open, high, low, close, volume)
ninjatraderNinjaTrader bar CSV
tradestationTradeStation EasyLanguage bar CSV
binanceBinance historical klines (data.binance.vision, ms timestamps)
bybitBybit / Kraken / Coinbase OHLCV CSV (Unix second timestamps)
genericAny OHLCV CSV — auto-detects columns, or use "Map Columns" in GUI
⚠ If auto-detection fails: Open the GUI and use the Map Columns… button to manually tell DataConvert which column is date, open, high, low, close. Most edge-case CSVs are solvable this way.

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:

python dataconvert.py ticks.csv MY_TICKS.bin --symbol EURUSD --tf 5 --ticks

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.