Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

plot.ichimoku

plot.ichimoku


Description

Plot static or interactive Ichimoku Kinko Hyo cloud charts from ichimoku objects.

Usage

## S3 method for class 'ichimoku'
plot(x, i = FALSE, from, to, ticker, theme = "default", gaps = FALSE, ...)

Arguments

x

an object of class 'ichimoku'.

i

interactive parametmer set to FALSE by default. Set to TRUE to plot an interactive rather than a static chart.

from

(optional) a starting date/time to subset the plot.

to

(optional) an ending date/time to subset the plot.

ticker

(optional) specify a ticker, or other text, to include in the chart heading. If not set, the ticker saved within the ichimoku object will be used.

theme

with a default of 'default'. This can also be set to 'dark' or 'solarized' to select the desired colour scheme.

gaps

set to FALSE by default to remove weekend and holiday gaps. Set to TRUE for a continuous timescale axis, but with gaps for non-trading days.

...

other arguments to be passed along.

Details

This function is an S3 method for the generic function plot() for class 'ichimoku'. It can be invoked by calling plot(x) on an object 'x' of class 'ichimoku'.

Value

Returns either a ggplot2 object with classes 'gg' and 'ggplot', or a plotly object with classes 'plotly' and 'htmlwidget' depending on the parameters set.

Further Details

Please refer to the reference vignette by running: vignette("reference", package = "ichimoku")

Examples

cloud <- ichimoku(sample_ohlc_data, ticker = "TKR")

plot(cloud)
plot(cloud, from = "2020-05-15", to = "2020-10-30", theme = "dark")

plot(cloud, i = TRUE, ticker = "TKR Co.", theme = "solarized", gaps = TRUE)

ichimoku

Compute and Plot Ichimoku Kinko Hyo Cloud Charts

v0.1.2
GPL (>= 3)
Authors
Charlie Gao [aut, cre]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.