- Notifications
You must be signed in to change notification settings - Fork164
Technical analysis library for Rust language
License
greyblake/ta-rs
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Technical analysis library for Rust.
Add to youCargo.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)letmut 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 exampleshere.Check also thedocumentation.
A data item which represent a stock quote may implement the following traits:
OpenHighLowCloseVolume
It's not necessary to implement all of them, but it must be enough to fulfill requirements for a particular indicator.You probably should prefer usingDataItem 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
So far there are the following indicators available.
- Trend
- Exponential Moving Average (EMA)
- Simple Moving Average (SMA)
- Oscillators
- Relative Strength Index (RSI)
- Fast Stochastic
- Slow Stochastic
- Moving Average Convergence Divergence (MACD)
- Percentage Price Oscillator (PPO)
- Commodity Channel Index (CCI)
- Money Flow Index (MFI)
- Other
- Minimum
- Maximum
- True Range
- Standard Deviation (SD)
- Mean Absolute Deviation (MAD)
- Average True Range (AR)
- Efficiency Ratio (ER)
- Bollinger Bands (BB)
- Chandelier Exit (CE)
- Keltner Channel (KC)
- Rate of Change (ROC)
- On Balance Volume (OBV)
serde- allows to serialize and deserialize indicators. NOTE: the backward compatibility of serializeddata with the future versions of ta is not guaranteed because internal implementation of the indicators is a subject to change.
cargo benchYou can support the project by donatingNEAR tokens.
Our NEAR wallet address ista-rs.near
- 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
About
Technical analysis library for Rust language
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors12
Uh oh!
There was an error while loading.Please reload this page.