Orderbook functions work with orderbook data to analyze market depth, liquidity distribution, and order-flow patterns. They help identify support/resistance levels and market sentiment through bid/ask analysis.
| Category | Description |
|---|---|
| Volume Analysis | Sum bid and ask volumes within specified depth percentages to gauge buying and selling pressure. |
| Order Size Analysis | Identify maximum and minimum order sizes to spot large participants and market microstructure patterns. |
| Market Depth | Analyze liquidity distribution to understand support/resistance levels and potential price impact. |
| Function | Description |
|---|---|
sumBids | Total bid volume within the depth window |
sumAsks | Total ask volume within the depth window |
maxBidAmount | Largest single bid order within the depth window |
maxAskAmount | Largest single ask order within the depth window |
minBidAmount | Smallest bid order within the depth window |
minAskAmount | Smallest ask order within the depth window |
sumBids
sumBids(source: TimeSeries, depthPct?: number = 10): number — total bid volume within depthPct of the mid-price.
| Parameter | Type | Description |
|---|---|---|
source | TimeSeries | Source orderbook data series |
depthPct | number | Depth percentage (default: 10) |
Returns: number — total bid volume within depth.
var bidVolume = sumBids((source = orderbookData), (depthPct = 10));sumAsks
sumAsks(source: TimeSeries, depthPct?: number = 10): number — total ask volume within depthPct of the mid-price.
| Parameter | Type | Description |
|---|---|---|
source | TimeSeries | Source orderbook data series |
depthPct | number | Depth percentage (default: 10) |
Returns: number — total ask volume within depth.
var askVolume = sumAsks((source = orderbookData), (depthPct = 10));maxBidAmount
maxBidAmount(source: TimeSeries, depthPct?: number = 10): number — largest single bid order within depthPct of the mid-price.
| Parameter | Type | Description |
|---|---|---|
source | TimeSeries | Source orderbook data series |
depthPct | number | Depth percentage (default: 10) |
Returns: number — largest bid order size within depth.
var maxBid = maxBidAmount((source = orderbookData), (depthPct = 10));maxAskAmount
maxAskAmount(source: TimeSeries, depthPct?: number = 10): number — largest single ask order within depthPct of the mid-price.
| Parameter | Type | Description |
|---|---|---|
source | TimeSeries | Source orderbook data series |
depthPct | number | Depth percentage (default: 10) |
Returns: number — largest ask order size within depth.
var maxAsk = maxAskAmount((source = orderbookData), (depthPct = 10));minBidAmount
minBidAmount(source: TimeSeries, depthPct?: number = 10): number — smallest bid order within depthPct of the mid-price.
| Parameter | Type | Description |
|---|---|---|
source | TimeSeries | Source orderbook data series |
depthPct | number | Depth percentage (default: 10) |
Returns: number — smallest bid order size within depth.
var minBid = minBidAmount((source = orderbookData), (depthPct = 10));minAskAmount
minAskAmount(source: TimeSeries, depthPct?: number = 10): number — smallest ask order within depthPct of the mid-price.
| Parameter | Type | Description |
|---|---|---|
source | TimeSeries | Source orderbook data series |
depthPct | number | Depth percentage (default: 10) |
Returns: number — smallest ask order size within depth.
var minAsk = minAskAmount((source = orderbookData), (depthPct = 10));