Description Usage Arguments Details Author(s) Examples
View source: R/visualisation.R
Plots the available volume in 25bps increments on each side of the order book in the form of a stacked area graph.
1 2 3 4 | plotVolumePercentiles(depth.summary,
start.time = head(depth.summary$timestamp, 1),
end.time = tail(depth.summary$timestamp, 1), volume.scale = 1,
perc.line = T, side.line = T)
|
depth.summary |
|
start.time |
Plot events from this time onward. |
end.time |
Plot events up until this time. |
volume.scale |
Volume scale factor. |
perc.line |
If true, separate percentiles with subtle line. |
side.line |
If true, separate bid/ask side with subtle line. |
The top of the graph depicts the ask side of the book, whilst the bottom depicts the bid side. Percentiles and order book sides can be separated by an optional subtle line for improved legibility.
phil
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | # visualise 2 hours of order book liquidity.
# data will be aggregated to minute-by-minute resolution.
plotVolumePercentiles(lob.data$depth.summary,
start.time=as.POSIXct("2015-05-01 02:30:00.000", tz="UTC"),
end.time=as.POSIXct("2015-05-01 04:30:00.000", tz="UTC"),
volume.scale=10^-8)
## Not run:
# visualise 15 minutes of order book liquidity.
# data will be aggregated to second-by-second resolution.
plotVolumePercentiles(lob.data$depth.summary,
start.time=as.POSIXct("2015-05-01 04:30:00.000", tz="UTC"),
end.time=as.POSIXct("2015-05-01 04:35:00.000", tz="UTC"),
volume.scale=10^-8)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.