View source: R/technical_indicators.R
| calc_stochastic_d | R Documentation |
Calculates the Stochastic D indicator for momentum analysis. The %D line is the smoothed version of %K, commonly used for momentum signals in range 0-100.
calc_stochastic_d(data, k = 14, d = 3)
data |
Price data with Date column and symbol columns |
k |
Lookback period for stochastic K calculation |
d |
Smoothing period for D line |
Data.table with Stochastic D values for each symbol
data("sample_prices_weekly")
data(sample_prices_weekly)
data("sample_prices_weekly")
stoch_d <- calc_stochastic_d(sample_prices_weekly, k = 14, d = 3)
head(stoch_d)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.