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.

ItemWhat to expect
Inputone .csv file or a directory scanned recursively
Compressed downloadsdecompress .csv.gz first; the current CLI processes .csv only
Default CSV outputa sibling file named like 20250601_1m_ohlcv.csv
Combined output modeif --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

  1. Clone the repository.
  2. Build the CLI from the repository root.
  3. Run the help command once so you can confirm the binary is ready.
bash
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

bash
./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.

SettingWhy it matters
--tfChooses the aggregation interval such as 1m, 5m, 15m, 1h, or 1d.
--with-vaEnables or disables POC, VAH, and VAL.
--va-pctControls the value-area percentage, for example 0.68 or 0.70.
--tick-sizeSupplies a fallback tick size if inference fails.
--override-tickForces a specific tick size even when the input would infer another value.
--outWrites either to a destination directory or to one combined CSV file.
--graphGenerates an HTML chart for quick visual validation.
--graph-dirSends 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_start and time_end
  • open, high, low, close
  • volume
  • poc, vah, val
  • va_pct
  • tick_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

  1. Expect the output to be sparse. Periods without trades are intentionally omitted.
  2. Read time_start and time_end as UTC, not as a local session timezone.
  3. Compare a couple of bars against the raw trade rows if you are testing a new timeframe or a new symbol.
  4. Check the tick_size column for instruments with unusual increments, and use --override-tick when you need a fixed value.
  5. If you merged many files into one CSV, use source_file to 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.

Related Pages