PROTECTED SOURCE SCRIPT
RSI Divergence Filtered by ZigZag Ratios

RSI Divergence Filtered by ZigZag Ratios
This indicator is designed to help traders identify potential trend reversals by finding RSI divergence and then confirming it with a unique filter based on price movements. It draws two ZigZag lines on your chart to visually represent these patterns.
Core Functionality
The indicator works by doing three main things:
Price ZigZag (Blue Line): ZigZag line directly on the price chart. This line connects the significant high and low points of the price action, based on the ZigZag Deviation % you set. It's a way to simplify the trend and clearly see the "legs" or swings of the market.
RSI ZigZag (Orange Line): It also draws a separate ZigZag line, colored orange, that follows the movement of the RSI indicator. This helps you visually track the highs and lows of the RSI at the same time as the price.
Divergence Detection: The indicator continuously looks for divergence between the price ZigZag and the RSI.
The Key Filter: ZigZag Ratio
This is what makes the indicator unique. When a potential divergence is found, it doesn't just display a signal immediately. It performs an extra check:
It compares the size of the most recent price swing (the "last leg") to the size of the previous swing in the same direction. It then calculates a ratio. If the most recent swing is significantly smaller than the previous one, it confirms the signal and displays a label.
This filtering mechanism aims to weed out weak signals and highlight divergences that occur after a period of slowing momentum.
Bullish/Bearish Div Labels: When a valid, filtered divergence is found, the indicator will place a green Bullish Div label at the bottom of a low swing or a red Bearish Div label at the top of a high swing.
User Inputs
ZigZag Deviation %: This is the minimum percentage change required to form a new ZigZag pivot. The default value is set to 0.3618, which is a popular number in technical analysis. A lower value will capture more minor swings, while a higher value will focus only on larger, more significant ones.
RSI Length: The number of bars used to calculate the RSI. The default is 6, but you can adjust this to your preference.
This indicator is designed to help traders identify potential trend reversals by finding RSI divergence and then confirming it with a unique filter based on price movements. It draws two ZigZag lines on your chart to visually represent these patterns.
Core Functionality
The indicator works by doing three main things:
Price ZigZag (Blue Line): ZigZag line directly on the price chart. This line connects the significant high and low points of the price action, based on the ZigZag Deviation % you set. It's a way to simplify the trend and clearly see the "legs" or swings of the market.
RSI ZigZag (Orange Line): It also draws a separate ZigZag line, colored orange, that follows the movement of the RSI indicator. This helps you visually track the highs and lows of the RSI at the same time as the price.
Divergence Detection: The indicator continuously looks for divergence between the price ZigZag and the RSI.
The Key Filter: ZigZag Ratio
This is what makes the indicator unique. When a potential divergence is found, it doesn't just display a signal immediately. It performs an extra check:
It compares the size of the most recent price swing (the "last leg") to the size of the previous swing in the same direction. It then calculates a ratio. If the most recent swing is significantly smaller than the previous one, it confirms the signal and displays a label.
This filtering mechanism aims to weed out weak signals and highlight divergences that occur after a period of slowing momentum.
Bullish/Bearish Div Labels: When a valid, filtered divergence is found, the indicator will place a green Bullish Div label at the bottom of a low swing or a red Bearish Div label at the top of a high swing.
User Inputs
ZigZag Deviation %: This is the minimum percentage change required to form a new ZigZag pivot. The default value is set to 0.3618, which is a popular number in technical analysis. A lower value will capture more minor swings, while a higher value will focus only on larger, more significant ones.
RSI Length: The number of bars used to calculate the RSI. The default is 6, but you can adjust this to your preference.
보호된 스크립트입니다
이 스크립트는 비공개 소스로 게시됩니다. 하지만 제한 없이 자유롭게 사용할 수 있습니다 — 여기에서 자세히 알아보기.
면책사항
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.
보호된 스크립트입니다
이 스크립트는 비공개 소스로 게시됩니다. 하지만 제한 없이 자유롭게 사용할 수 있습니다 — 여기에서 자세히 알아보기.
면책사항
이 정보와 게시물은 TradingView에서 제공하거나 보증하는 금융, 투자, 거래 또는 기타 유형의 조언이나 권고 사항을 의미하거나 구성하지 않습니다. 자세한 내용은 이용 약관을 참고하세요.