Data levels

It's really simple. You tell the engine how granular your data gets - L3(MBO), L2, tick, and ohlcv - defined per symbol.

The four levels

Ranked by granularity, descending

L3 - Full MBO events. It doesn't get any more granular than this, but that does mean that it won't be cheap. The benefit of using l3 data is that you unlock everything down the chain - every chart type, every indicator just works automatically

L2 - Order book snapshots: bid/ask ladders with size at each price level.

tick - Individual trade events: price, side, size. More granular than bars.

ohlcv - open/high/low/close/volume bars. This is what you see every day, most common type of data.

Compatibility

What I mean with compatibility is just what each level is capable of imitating, hopefully this will explain a bit more:

L3: L3, L2, tick, ohlcv

L2: L2

tick: tick, ohlcv

ohlcv: ohlcv

So, if you have an indicator that requires data level L2, that indicator will only be available for symbols providing L3 or L2 data; if an indicator requires ohlcv, it'll only be available for symbols providing L3, tick or ohlcv data

How to define data level

In your data adapter, you'll have a function called resolveSymbol, where it provides the chart with information about the symbol. That symbol info has type SymbolInfo, which requires you to define dataLevel. That's where you provide the data level for said symbol.

Example:

//... the rest of your data adapter
resolveSymbol(symbol: string): SymbolInfo | Promise<SymbolInfo> {
    return {
        symbol: '/NQ1',
        description: 'Nasdaq 100 E-mini Futures (Front Cont.)',
        exchange: 'CME',
        dataLevel: 'ohlcv', // here
        type: 'future',
        // etc
    }
}

You can also see how it's done in the quick start guide. It's the same thing just a bit cleaner.

Was this page helpful?