version 0.9-3
This version brings many changes to the R package. The entire code generating backend have been rewritten so it closely follows the upstream naming of parameters and it uses X-macros so it also installs way fastert than before - but it also means that there is alot of breaking changes. The update is a big leap towards a stable release.
improvements
- A new function for pre-calculating the lookback-period has been implemented. It can be used as follows:
The function returns the minimum required lookback for calculating the indicator. Its use-case is customized control-flows for downstream wrappers and/or packages that declares dependency on {talib}.
The source code have been re-written so it generates the underlying TA-Lib wrappers using preprocessors and X-Macros, which compiles much faster than before.
MAVP: Moving Average Variable Periods—The function calculates a moving average with variable periods between candles. See below:
talib::variable_moving_average_period(
x = 1:10,
periods = c(1, 1, 1, 2, 2, 2, 3, 4, 4, 4),
minimumPeriod = 2,
maximumPeriod = 4
)
#> [1] NA NA NA 3.5 4.5 5.5 6.0 6.5 7.5 8.5
#> attr(,"lookback")- AVGDEV: Averge deviation—The function calculates the average deviation of a series. See below:
talib::average_deviation(
x = 1:10,
periods = c(1, 1, 1, 2, 2, 2, 3, 4, 4, 4),
timePeriod = 5
)
#> [1] NA NA NA NA 1.2 1.2 1.2 1.2 1.2 1.2
#> attr(,"lookback")
#> [1] 4- All indicators have gotten a
camelCasealias to introduce a form of consistency across R’s finance ecosystem and oldschool coding schemes. The indicators below produces the same output:
talib::bollinger_bands()
talib::BBANDS()
talib::bollingerBands()Each UPPERCASE and camelCase function is an alias of its underlying snake_case function, so the functions behaves the same.
breaking changes
- General: All functions now follows the naming convention of TA-Lib. All function signatures are on the following form:
indicator(
x, ## unchanged
cols, ## unchanged
## additional/optional TA-Lib parameters
## are now camelCase mined upstream
timePeriod, ## was 'n' before
fooBar, ## was 'foo_bar' or 'foobar' before
fooBaz, ## was 'foo_baz' or 'foobaz' before
na.bridge = FALSE ## unchanged
)This has the benefit of being transparent when comparing or reading the source code.
-
MATypes: Functions that used MATypes in the indicator function are now significantly different. See the
bollinger_bands()below:
talib::bollinger_bands(
talib::BTC,
timePeriod = 20,
maType = talib::EMA()
)Prior to this update, the correct call was:
talib::bollinger_bands(
talib::BTC,
ma = talib::EMA(n = 20)
)While the above function call is aestethically pleasing, it did introduce some ambigiuites in other calls. See, for example, APO() (v0.9.2) below:
absolute_price_oscillator(
x,
cols,
fast = 12,
slow = 26,
ma = SMA(n = 9),
na.bridge = FALSE,
...
)In this specific case the function has three different n - the underlying function were discarding n = 9 while keeping the MAType. The new call is given as:
absolute_price_oscillator(
x,
cols,
fastPeriod = 12,
slowPeriod = 26,
maType = 0,
na.bridge = FALSE,
...
) In this call the role of each argument is should be clearer than before.
bug-fixes
CCI: Incorrect charting—The indicator were incorrectly classified as a main chart indicator—
One-dimensional indicators: incorrect return <class>—Indicators that returns a one-dimensional indicator (MA, RSI, etc.) were returning a <matrix> or <data.frame> instead of <numeric>.
Merged indicators: overlapping last-values—On the plotly backend, merging indicators onto one panel stacked every last-value label on the panel’s top-right corner. The labels are now collapsed into a single evenly spaced label, mirroring the merged subtitle of the ggplot2 backend.
Merged indicators: indistinguishable last-values—Merged last-value labels used the bare output column name, so merging the same indicator with different parameters displayed identical labels. The labels now carry the full indicator specification, including its parameters, as the ggplot2 backend already did.
version 0.9-1
CRAN release: 2026-04-23
version 0.9-0
CRAN release: 2026-04-21
- Initial CRAN submission.
- Wraps the TA-Lib C library, providing 67 technical indicators and 61 candlestick pattern detectors.
- Composable charting via
chart()andindicator(), with bothplotly(interactive) andggplot2(static) backends. - Built-in OHLCV datasets:
BTC,ATOM,NVDA,SPY.