This repo contains a collection of trading indicators implemented to support incremental updates, both from trade and candle data (depending on the indicator). All indicators provide the same set of base methods:
reset()
- clears indicator valuesupdate(value or candle)
- updates the current indicator value with a different data pointadd(value or candle)
- adds a new data point/value to the indicatorl()
- returns the number of available indicator valuesv()
- returns the current indicator valueprev(n = 1)
- returns the nth previous indicator value
All indicators have a seed period which should be respected before valid data can be obtained, which can be read via i.get_seed_period()
To query which type of data an indicator requires, get_data_type()
and get_data_key()
are available. The data type can be either 'trade'
, 'candle'
, or '*'
to signal that both are acceptable. For candle data, the data key will be either 'open
', 'high'
, 'low'
, or 'close'
.
from bfxhfindicators import RSI
rsi = RSI([14])
rsi.add(14000)
rsi.add(14010)
rsi.add(14025)
rsi.add(14035)
// ...
// 8 more data points
// ...
rsi.add(13998)
rsi.add(13952)
v = rsi.v() // query current RSI(14) value
- Absolute True Range
- Acceleration
- Accumulation/Distribution
- Accumulative Swing Index
- Arnoud Legoux Moving Average
- Awesome Oscillator
- Balance of Power
- Bollinger Bands
- Chaikin Money Flow
- Chaikin Oscillator
- Chande Momentum Oscillator
- Coppock Curve
- Detrended Price Oscillator
- Donchian Channels
- Ease of Movement
- Envelope
- Exponential Moving Average
- EMA Volume
- Know Sure Thing
- MACD
- Mass Index
- Momentum
- Net Volume
- On Balance Volume
- Price Channel
- Price Oscillator
- Price Volume Trend
- RSI
- Rate of Change
- Relative Vigor Index
- Relative Volatility Index
- Simple Moving Average
- Standard Deviation
- Stochastic
- Stochastic RSI
- TRIX
- True Strength Index
- VWAP
- Volume Oscillator
- Volume Weighted Moving Average
- Weighted Moving Average
- Williams %R