{talib}: Interactive financial charts

[This article was first published on R-posts.com, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

{talib} is a new R package built on TA-Lib, which is now available on CRAN. The R-package is targeted at individuals and, perhaps, institutions who, in some form or the other, interacts with the financial markets using technical analysis.

The library is built with minimal dependencies for long-term stability and freedom in mind. All functions are built around data.frame– and matrix-classes which are portable to all other data-containers with minimal effort.

Everything in the library is built ‘bottom-up’ for maximum speed and memory efficiency. Each indicator interacts directly with R’s C API via .Call().

In this blog post I will give a brief introduction to the charting interface which is built to mimick the behaviour of base R’s plotting API.

A quick introduction to charts

In this section I will briefly introduce the most important aspects of the charting, ‘quality of life’-features and themes. Below is a simple starting point; charting BTC:

talib::chart(
  talib::BTC
)

chart() returns a candlestick chart by default. Below are the formals:

str(formals(talib::chart))
#> Dotted pair list of 5
#>  $ x    : symbol 
#>  $ type : chr "candlestick"
#>  $ idx  : NULL
#>  $ title: symbol 
#>  $ ...  : symbol

Modifying themes

talib::set_theme("hawks_and_doves")

talib::chart(
  talib::BTC
)

Charting indicators

{
  talib::chart(talib::BTC)
  talib::indicator(talib::SMA, n = 7)
  talib::indicator(talib::SMA, n = 14)
  talib::indicator(talib::SMA, n = 21)
  talib::indicator(talib::SMA, n = 28)
  talib::indicator(talib::MACD)
  talib::indicator(talib::trading_volume)
}

Installation

{talib} is finally on CRAN, and can be installed as follows:

install.packages("talib")

It can also be built from source with additional CMake-flags:

install.packages(
  "talib",
  type = "source",
  configure.args = "-O3 -march=native"
)

Contributing and submitting bug-reports

{talib} is still in its early stage so contributions, even if small, bug-reports, suggestions and critiques are gratefully accepted.

Visit the repository here: https://github.com/serkor1/ta-lib-R.

Created on 2026-04-29 with reprex v2.1.1


{talib}: Interactive financial charts was first posted on June 18, 2026 at 5:09 am.
To leave a comment for the author, please follow the link and comment on their blog: R-posts.com.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)