smi#

smi(close, fast=None, slow=None, signal=None, scalar=None, offset=None, **kwargs)[source]#

SMI Ergodic Indicator (SMI)

The SMI Ergodic Indicator is the same as the True Strength Index (TSI) developed by William Blau, except the SMI includes a signal line. The SMI uses double moving averages of price minus previous price over 2 time frames. The signal line, which is an EMA of the SMI, is plotted to help trigger trading signals. The trend is bullish when crossing above zero and bearish when crossing below zero. This implementation includes both the SMI Ergodic Indicator and SMI Ergodic Oscillator.

Sources:

https://www.motivewave.com/studies/smi_ergodic_indicator.htm https://www.tradingview.com/script/Xh5Q0une-SMI-Ergodic-Oscillator/ https://www.tradingview.com/script/cwrgy4fw-SMIIO/

Calculation:
Default Inputs:

fast=5, slow=20, signal=5

TSI = True Strength Index EMA = Exponential Moving Average

ERG = TSI(close, fast, slow) Signal = EMA(ERG, signal) OSC = ERG - Signal

Args:

close (pd.Series): Series of ‘close’s fast (int): The short period. Default: 5 slow (int): The long period. Default: 20 signal (int): The signal period. Default: 5 scalar (float): How much to magnify. Default: 1 offset (int): How many periods to offset the result. Default: 0

Kwargs:

fillna (value, optional): pd.DataFrame.fillna(value) fill_method (value, optional): Type of fill method

Returns:

pd.DataFrame: smi, signal, oscillator columns.