View on GitHub

TA-Lib

Python wrapper for TA-Lib (https://ta-lib.org/).

Download this project as a .zip file Download this project as a tar.gz file

Momentum Indicator Functions

ADX - Average Directional Movement Index

NOTE: The ADX function has an unstable period.

real = ADX(high, low, close, timeperiod=14)

ADXR - Average Directional Movement Index Rating

NOTE: The ADXR function has an unstable period.

real = ADXR(high, low, close, timeperiod=14)

APO - Absolute Price Oscillator

real = APO(real, fastperiod=12, slowperiod=26, matype=0)

AROON - Aroon

aroondown, aroonup = AROON(high, low, timeperiod=14)

AROONOSC - Aroon Oscillator

real = AROONOSC(high, low, timeperiod=14)

BOP - Balance Of Power

real = BOP(open, high, low, close)

CCI - Commodity Channel Index

real = CCI(high, low, close, timeperiod=14)

CMO - Chande Momentum Oscillator

NOTE: The CMO function has an unstable period.

real = CMO(real, timeperiod=14)

DX - Directional Movement Index

NOTE: The DX function has an unstable period.

real = DX(high, low, close, timeperiod=14)

MACD - Moving Average Convergence/Divergence

macd, macdsignal, macdhist = MACD(real, fastperiod=12, slowperiod=26, signalperiod=9)

MACDEXT - MACD with controllable MA type

macd, macdsignal, macdhist = MACDEXT(real, fastperiod=12, fastmatype=0, slowperiod=26, slowmatype=0, signalperiod=9, signalmatype=0)

MACDFIX - Moving Average Convergence/Divergence Fix 12/26

macd, macdsignal, macdhist = MACDFIX(real, signalperiod=9)

MFI - Money Flow Index

NOTE: The MFI function has an unstable period.

real = MFI(high, low, close, volume, timeperiod=14)

MINUS_DI - Minus Directional Indicator

NOTE: The MINUS_DI function has an unstable period.

real = MINUS_DI(high, low, close, timeperiod=14)

MINUS_DM - Minus Directional Movement

NOTE: The MINUS_DM function has an unstable period.

real = MINUS_DM(high, low, timeperiod=14)

MOM - Momentum

real = MOM(real, timeperiod=10)

PLUS_DI - Plus Directional Indicator

NOTE: The PLUS_DI function has an unstable period.

real = PLUS_DI(high, low, close, timeperiod=14)

PLUS_DM - Plus Directional Movement

NOTE: The PLUS_DM function has an unstable period.

real = PLUS_DM(high, low, timeperiod=14)

PPO - Percentage Price Oscillator

real = PPO(real, fastperiod=12, slowperiod=26, matype=0)

ROC - Rate of change : ((price/prevPrice)-1)*100

real = ROC(real, timeperiod=10)

ROCP - Rate of change Percentage: (price-prevPrice)/prevPrice

real = ROCP(real, timeperiod=10)

ROCR - Rate of change ratio: (price/prevPrice)

real = ROCR(real, timeperiod=10)

ROCR100 - Rate of change ratio 100 scale: (price/prevPrice)*100

real = ROCR100(real, timeperiod=10)

RSI - Relative Strength Index

NOTE: The RSI function has an unstable period.

real = RSI(real, timeperiod=14)

STOCH - Stochastic

slowk, slowd = STOCH(high, low, close, fastk_period=5, slowk_period=3, slowk_matype=0, slowd_period=3, slowd_matype=0)

STOCHF - Stochastic Fast

fastk, fastd = STOCHF(high, low, close, fastk_period=5, fastd_period=3, fastd_matype=0)

STOCHRSI - Stochastic Relative Strength Index

NOTE: The STOCHRSI function has an unstable period.

fastk, fastd = STOCHRSI(real, timeperiod=14, fastk_period=5, fastd_period=3, fastd_matype=0)

TRIX - 1-day Rate-Of-Change (ROC) of a Triple Smooth EMA

real = TRIX(real, timeperiod=30)

ULTOSC - Ultimate Oscillator

real = ULTOSC(high, low, close, timeperiod1=7, timeperiod2=14, timeperiod3=28)

WILLR - Williams' %R

real = WILLR(high, low, close, timeperiod=14)

Documentation Index All Function Groups