ezyquant.indicators.ta.TA.rsi_divergence#

static TA.rsi_divergence(high: DataFrame, low: DataFrame, close: DataFrame, rsi_period: int = 14, pivot_up_thresh: float = 0.05, pivot_down_thresh: float = -0.05) DataFrame#

Relative Strength Index (RSI) Divergence.

Parameters:
  • high (pd.DataFrame) – dataset ‘High’ dataframe.

  • low (pd.DataFrame) – dataset ‘Low’ dataframe.

  • close (pd.DataFrame) – dataset ‘Close’ dataframe.

  • rsi_period (int = 14) – n period for RSI.

  • pivot_up_thresh (float = 0.05) – threshold for pivot up.

  • pivot_down_thresh (float = -0.05) – threshold for pivot down.

Returns:

Relative Strength Index (RSI) Divergence. If bullish divergence, return 1. If bearish divergence, return -1.

Return type:

pd.DataFrame