Generate OHLCV
Build OHLCV bars from TickTradingData CSV files with the public aggregator, optionally including POC, VAH, and VAL.
Use this workflow when you want candles and volume-profile-style summaries from TickTradingData raw files instead of the full event stream.
The public ohlcv-aggregator tool reads TickTradingData CSV files, keeps only executed trades, and writes sparse OHLCV outputs with optional POC, VAH, and VAL. It can also generate an HTML chart for quick visual validation.
What Goes In And What Comes Out
This tool is best when you already know that the target workflow needs bars, not the original tick-by-tick tape.
| Item | What to expect |
|---|---|
| Input | one .csv file or a directory scanned recursively |
| Compressed downloads | decompress .csv.gz first; the current CLI processes .csv only |
| Default CSV output | a sibling file named like 20250601_1m_ohlcv.csv |
| Combined output mode | if --out points to a single .csv, the tool merges all processed files and adds a source_file column |
| Optional chart output | --graph generates an .html chart with candles, volume, POC, VAH, and VAL |
Build The Aggregator
The safest public setup today is to clone the repository and build it locally.
Steps
- Clone the repository.
- Build the CLI from the repository root.
- Run the help command once so you can confirm the binary is ready.
git clone https://github.com/ticktradingdata/ohlcv-aggregator.git
cd ohlcv-aggregator
go build ./cmd/ohlcv-aggregator
./ohlcv-aggregator --help
Run A First Conversion
The shortest useful first run is a one-minute aggregation with the HTML chart enabled.
Example
./ohlcv-aggregator -i ./data/ES/06-25/20250601.csv --tf 1m --graph --verbose
This generates a CSV named like 20250601_1m_ohlcv.csv and, if --graph is enabled, a matching HTML chart beside it.
If the input is a directory, the tool walks it recursively and skips files already ending in _ohlcv.csv.
Settings That Usually Matter
The most useful flags map directly to the output shape you want.
| Setting | Why it matters |
|---|---|
--tf | Chooses the aggregation interval such as 1m, 5m, 15m, 1h, or 1d. |
--with-va | Enables or disables POC, VAH, and VAL. |
--va-pct | Controls the value-area percentage, for example 0.68 or 0.70. |
--tick-size | Supplies a fallback tick size if inference fails. |
--override-tick | Forces a specific tick size even when the input would infer another value. |
--out | Writes either to a destination directory or to one combined CSV file. |
--graph | Generates an HTML chart for quick visual validation. |
--graph-dir | Sends the chart files to a separate directory if you do not want them next to the CSV outputs. |
What The Output Contains
The CSV output is designed for downstream charting, backtesting, or quick aggregation checks.
Core fields
time_startandtime_endopen,high,low,closevolumepoc,vah,valva_pcttick_size
When you use one combined output file, the tool also adds source_file.
Validate The Result
Before you automate the workflow, validate one or two known sessions against the raw data.
Checks
- Expect the output to be sparse. Periods without trades are intentionally omitted.
- Read
time_startandtime_endasUTC, not as a local session timezone. - Compare a couple of bars against the raw trade rows if you are testing a new timeframe or a new symbol.
- Check the
tick_sizecolumn for instruments with unusual increments, and use--override-tickwhen you need a fixed value. - If you merged many files into one CSV, use
source_fileto trace each bar back to the original day.
When This Is The Wrong Workflow
Keep the raw CSV or Parquet files if you still need the full event sequence, order-book updates, or generic research inputs.
If your destination is NinjaTrader text import rather than bars, continue with CSV To NT8 Historical Data.
