Description Usage Arguments Details Value Examples
Calculates the Heikin-Ashi values needed for plotting in a candlestick chart.
1 | heikin_ashi(x)
|
x |
an xts object that contains OHLC data |
1. The Heikin-Ashi Close is an average of the open, high, low and close for the current period.
2. The Heikin-Ashi Open is the average of the prior Heikin-Ashi open and the prior Heikin-Ashi close
3. The Heikin-Ashi High is the maximum of: the current period's high, the current Heikin-Ashi open or the current Heikin-Ashi close.
4. The Heikin-Ashi low is the minimum : the current period's low, the current Heikin-Ashi open or the current Heikin-Ashi close.
More information can be found at Investopedia
The heikin_ashi function will return a OHLC dataset with the calculated heikin ashi values needed for plotting in a candlestick chart.
1 2 3 4 5 6 7 8 9 10 11 | ## Not run:
library(quantmod)
ADM <- getSymbols("ADM",
from = "2018-01-01",
to = "2018-07-01",
auto.assign = FALSE)
ha_ADM <- heikin_ashi(ADM)
chartSeries(ha_ADM)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.