Learn R Programming

obAnalytics (version 0.1.1)

plotCurrentDepth: Visualise order book depth at any given point in time.

Description

Plots the cumalative volume on each side of the limit order book.

Usage

plotCurrentDepth(order.book, volume.scale = 1, show.quantiles = T, show.volume = T)

Arguments

order.book
A limit orderBook structure.
volume.scale
Volume scale factor.
show.quantiles
If true, highlight top 1% highest volume.
show.volume
If true, also show non-cumulative volume.

Examples

Run this code

# get a limit order book for a specific point in time, limited to +- 150bps
# above/below best bid/ask price.
lob <- orderBook(lob.data$events,
    tp=as.POSIXct("2015-05-01 04:38:17.429", tz="UTC"), bps.range=150)

# visualise the order book liquidity.
plotCurrentDepth(lob, volume.scale=10^-8)

Run the code above in your browser using DataLab