OPEN-SOURCE SCRIPT

IFR / Relative Strength Index (RSI)

This advanced RSI indicator is designed for traders who want an in-depth view of momentum, trend reversals, and potential divergence signals. The script calculates the Relative Strength Index (RSI) using a smoothed RMA (Running Moving Average) method and displays it alongside key reference bands: an upper band at 80, a midline at 50, and a lower band at 20. Gradient fills are applied to visually emphasize overbought and oversold zones.

In addition to the standard RSI calculation, the indicator offers several optional features:

Smoothing with Moving Averages and Bollinger Bands:

Customizable Smoothing: Users can choose from several moving average types (SMA, EMA, SMMA (RMA), WMA, VWMA) to further smooth the RSI values.
Bollinger Bands Overlay: If the “SMA + Bollinger Bands” option is selected, the script calculates Bollinger Bands around the RSI-based moving average. The bands’ distance is adjustable via a standard deviation multiplier, providing an extra layer of analysis for market volatility.
Divergence Detection:

The script can automatically detect divergences between the RSI and price action.
Regular Bullish Divergence: Identified when the RSI forms a higher low while the price forms a lower low, suggesting a potential upward reversal.
Regular Bearish Divergence: Identified when the RSI forms a lower high while the price forms a higher high, indicating a potential downward reversal.
When divergences occur, the indicator plots markers on the chart and triggers alert conditions, aiding in the early identification of reversal points.
Optional IFR/Stoch RSI Overlay:

The overlay calculates the Stochastic RSI using the previously computed RSI values.
It smooths both the %K and %D lines, which are then plotted on the chart.
Trade Signals:
A “Buy” signal (marked with a “B”) is generated when the %K line crosses above the %D line while below a threshold of 20.
A “Sell” signal (marked with an “S”) is generated when the %K line crosses below the %D line while above a threshold of 80.
Gradient fills are also applied to highlight overbought and oversold conditions in the Stoch RSI overlay.
Customization and Usage:

Input Parameters: The script offers full customization over the RSI period, moving average type and period, Bollinger Bands settings, divergence detection parameters, and Stoch RSI smoothing factors.
Timeframe Flexibility: It works on any timeframe, allowing traders to apply it across various markets and trading styles.
Alerts and Visual Cues: With built-in alert conditions and clear visual markers for divergences and stochastic signals, this indicator assists in making timely trading decisions.
Overall, this script is a versatile tool that combines standard RSI analysis with advanced features like smoothing, divergence detection, and stochastic overlays, making it valuable for both trend and momentum-based trading strategies.

Clause de non-responsabilité