plotTQData | R Documentation |
Plot trade and quote data, trades are marked by crosses, and quotes are plotted as boxes denoting the bid-offer spread for all the quotes.
plotTQData( tData, qData = NULL, xLim = NULL, tradeCol = "black", quoteCol = "darkgray", format = "%H:%M:%S", axisCol = "black", ... )
tData |
cleaned trades data |
qData |
cleaned quotes data |
xLim |
timestamps for the start and the end of the plots. |
tradeCol |
color in which to paint the trade crosses. |
quoteCol |
color in which to fill out the bid-offer spread. |
format |
format string to pass to |
axisCol |
string to denote which color to use for the x axis |
... |
passed to |
## Not run: cleanedQuotes = quotesCleanup(qDataRaw = sampleQDataRaw, report = FALSE, printExchange = FALSE) cleanedTrades <- tradesCleanupUsingQuotes( tData = tradesCleanup(tDataRaw = sampleTDataRaw, report = FALSE, printExchange = FALSE), qData = quotesCleanup(qDataRaw = sampleQDataRaw, report = FALSE, printExchange = FALSE) )[as.Date(DT) == "2018-01-03"] xLim <- range(as.POSIXct(c("2018-01-03 15:30:00", "2018-01-03 16:00:00"), tz = "EST")) plotTQData(cleanedTrades, cleanedQuotes, xLim = xLim, main = "Raw trade and quote data from NYSE TAQ") ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.