Skip to main content
An indicator reads its data from Vbk, the chart API.

Bars

A bar of a Deepdom chart is a slice of time of the session, with the order book and the trades of that slice.
See Two indices for BookIndex and TickIndex. Never read bars after BookIndex during the history: they are not there yet.

Trades

With OnTickCall set, OnTick receives every trade:
where Feed is an alias: using Feed = VolumetricaAPI.Connection.Structure;. A trade at the ask or above is a buy, at the bid or below a sell: this is the rule the chart itself uses for AskVol and BidVol.

Aggregated trades

A large order is often filled by several trades at the same price within a few milliseconds. The chart can put them back together: ask for it in OnInit, and OnTick then receives an AggrInfo with the trade which completes an aggregate.
aggrInfo is null for every trade which does not complete an aggregate, and the aggregate it describes includes the trade just received. The Big Trade Marker example uses it.

Prices as integer ticks

Volume data is indexed by the price as an integer number of ticks, called PinT. Convert with:
Always use these helpers: the size of a tick can change along the price scale of some symbols.

Volumes

Volumes are integers. For symbols traded in fractions (cryptocurrencies) the real size is the integer multiplied by Vbk.VolMultiplier: use it for the values of a series, and Vbk.FormatVolume(value) for a text (1.5K), which applies it by itself.

The session

These are snapshots of the whole session: in realtime they follow every trade, but during the history they already hold the trades which come after the bar being calculated. Use them for what the session is now, as the Profile POC example does, not for a value bar by bar.

The chart