Technical analysis library for Rust language
Last updated Jul 3, 2026
866
Stars
169
Forks
16
Issues
0
Stars/day
Attention Score
46
Topics
Language breakdown
Rust 100.0%
โธ Files
click to expand
README
Technical Analysis for Rust (ta)
Technical analysis library for Rust.
Getting started
Add to you Cargo.toml:
[dependencies] ta = "0.4.0"
Example:
use ta::indicators::ExponentialMovingAverage;
use ta::Next;
// it can return an error, when an invalid length is passed (e.g. 0) let mut ema = ExponentialMovingAverage::new(3).unwrap();
assert_eq!(ema.next(2.0), 2.0); assert_eq!(ema.next(5.0), 3.5); assert_eq!(ema.next(1.0), 2.25); assert_eq!(ema.next(6.25), 4.25);
See more in the examples here. Check also the documentation.
Basic ideas
A data item which represent a stock quote may implement the following traits:
OpenHighLowCloseVolume
DataItem unless you have reasons to implement your own structure.
Indicators typically implement the following traits:
Next<T>(oftenNext<f64>andNext<&DataItem>) - to feed and get the next valueReset- to reset an indicatorDebugDisplayDefaultClone
List of indicators
So far there are the following indicators available.
- Trend
- Oscillators
- Other
Features
serde- allows to serialize and deserialize indicators. NOTE: the backward compatibility of serialized
Running benchmarks
cargo bench
Donations
You can support the project by donating NEAR tokens.
Our NEAR wallet address is ta-rs.near
License
Contributors
- greyblake Potapov Sergey - creator, maintainer.
- Bartoshko - BollingerBands
- shreyasdeotare Shreyas Deotare - MoneyFlowIndex, OnBalanceVolume
- edwardycl - StandardDeviation Implementation & More Efficient BollingerBands
- rideron89 Ron Rider - Keltner Channel
- tirz - CCI, CE, MAD, PPO, refactorings
- Devin Gunay - serde support
- Youngchan Lee - bugfix
- tommady - get rid of error-chain dependency
๐ More in this category