Nebilar wrote:
This basically means:
No transactions: no volume, OHLC = last candles close.
First transaction: OHLC is the price of that transaction, + its volume.
Is this correct?
That's right.
After formation new bar receives previousBar.getClose() price as it OHLC values. This will be it parameters until appears first tick, which will overwrite bar OHLC parameters.
You can check by comparing volumes(bar.getVolume() ), bar with previousBar.getClose() will have zero volume.