Getting started#
Installation#
talipp can be installed from the following sources:
PyPI#
GitHub#
Conda#
Essentials#
Import indicators#
Indicators can be imported as
For instance, to import EMA indicator, use
List of all indicators can be found in the Indicator catalogue.
Basic usage#
Indicators can be fed input values either during their initialization
or incrementally
To print indicator's values you can treat each indicator as a list, i.e. you can do
from talipp.indicators import EMA
ema = EMA(period=3, input_values=[1, 2, 3, 4, 5])
print(ema[-1])
print(ema[-5:])
print(ema)
Detailed description of indicator manipulation can be found in the section Indicator operations.
Input types#
Indicators can accept two types of input - simple type such as float
or complex OHLCV type encapsulating structured data such as open price, high price, low price, close price, ...
Each indicator specifies what type of input is required. For instance, SMA indicator accepts float
while Stoch indicator accepts OHLCV
.
from talipp.indicators import SMA, Stoch
from talipp.ohlcv import OHLCV
sma = SMA(period=3, input_values=[1, 2, 3])
stoch = Stoch(period=3, smoothing_period=2, input_values=[OHLCV(1, 2, 3, 4), OHLCV(5, 6, 7, 8)])
Read more about input types in the Input types section.
Examples#
The library comes with examples ⧉ showcasing usage of each indicator on artificial input.
If you have a binance account, then you can check examples ⧉ of indicators on realtime data.