View source: R/historical_data.R
Downloading and adding technical indicators to the historical data of a ticker
1 2 3 4 5 | get_one_ticker(ticker, start_date = "1900-01-01",
end_date = Sys.Date(), mas = c(50, 100, 200), emas = c(3, 5, 7,
14), keepma = T, keepema = T, addmacd = T, addrsi = T,
remove_nas = T, calc_diff = T, add_boilinger = T,
add_macd_cross = T)
|
ticker |
The ticker of the company to download |
start_date |
The first date of the historical data |
end_date |
The last date of the data |
mas |
List of the simple moving averages to calculate |
emas |
List of the exponentional moving averages to calculate |
keepma |
Logical value if it is F it will delete the actual ma values |
keepema |
Logical value if it is F it will delete the actual ema values |
addmacd |
Calculate macd nFast=12, nSlow=26,nSig=9 |
addrsi |
Add relativ sthrength index n=14 |
remove_nas |
Remove all na values after calculating every sma, ema, rsi, etc |
calc_diff |
If it false it does not calculate the sma and ema |
add_boilinger |
Adding the diff from the boilinger bands |
add_macd_cross |
Adding if the macd is crossed |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.