book
Order-book data recorded by ChartDeck: book.heat, book.depth, book.bucket, book.since.
#Functions
#book.bucketfunction
The price bucket size of the recorded order book (the height of a book.heat cell), na without data.
book.bucket(): floatReturns float.
Example
const g = book.bucket()Since ChartScript 1
#book.depthfunction
This bar's recorded order-book buckets as book.level values, bids from the best price down, then asks from the best price up.
book.depth({ side?: simple string = "both" }): array<book.level>| Parameter | Type | Description |
|---|---|---|
side | simple stringdefault "both" | "both", "bid" or "ask". |
Returns array<book.level>.
Example
const levels = book.depth("ask")Since ChartScript 1
#book.heatfunction
This bar's recorded order book as a heatmap.column: the largest size seen in each price bucket during the bar (base coin). na where nothing was recorded. History is what ChartDeck's recorder kept for the plan (Pro 7 days, Elite 180 days).
book.heat({ side?: simple string = "both" }): heatmap.column| Parameter | Type | Description |
|---|---|---|
side | simple stringdefault "both" | "both", "bid" or "ask". |
Returns heatmap.column.
Example
const bids = heatmap.new({ palette: heatmap.palette_bid })
const col = book.heat("bid")
if (!na(col)) {
bids.add(col)
}Since ChartScript 1
#book.sincefunction
The time (ms) of the oldest recorded order-book column ChartDeck gave this script, na without data.
book.since(): intReturns int.
Example
const from = book.since()Since ChartScript 1
#Not available yet
#book.imbalancefunction
Not available yet.
book.imbalance (later version).
Since ChartScript 1
#book.wallfunction
Not available yet.
book.wall (later version).
Since ChartScript 1