OPEN-SOURCE SCRIPT
WaveTrend & RSI Combined (v-final)

# RSI Divergence + WaveTrend Combined
## Overview
This indicator combines RSI Divergence detection with WaveTrend crosses to generate high-probability trading signals. It filters out noise by only showing divergences when confirmed by WaveTrend momentum crosses in the same direction.
## Key Features
### 1. Smart Divergence Detection
- Detects both bullish and bearish RSI divergences
- Uses **price pivot validation** to ensure divergences start from significant chart highs/lows, not just RSI extremes
- Divergence endpoints must be in the **neutral zone (20-80)** to avoid overbought/oversold traps
### 2. WaveTrend Cross Confirmation
- **Golden Cross**: WaveTrend crossover in oversold territory (below -60)
- **Dead Cross**: WaveTrend crossover in overbought territory (above +60)
- Crosses are displayed at RSI 20 (golden) and RSI 80 (dead) levels for easy visualization
### 3. Combined Signal Logic
- **LONG Signal**: Bullish RSI Divergence + Golden Cross within the divergence period
- **SHORT Signal**: Bearish RSI Divergence + Dead Cross within the divergence period
- Divergences are **only displayed** when a matching cross exists in the same period
### 4. Visual Elements
- **Yellow lines**: Divergence connections between master point and current point
- **Small diamonds**: Divergence markers (green for bullish, red for bearish)
- **Triangles**: Confirmed entry signals (▲ for LONG, ▼ for SHORT)
- **Circles**: WaveTrend crosses (green at bottom for golden, red at top for dead)
- **Background color**: Highlights signal bars (green for LONG, red for SHORT)
- **Debug table**: Shows real-time RSI, divergence count, WaveTrend values, and cross status
## Settings
### RSI Divergence
- RSI Length (default: 14)
- Overbuy/Oversell levels
- Divergence detection parameters (loopback, confirmation, limits)
### WaveTrend
- Channel Length (default: 10)
- Average Length (default: 21)
- Overbought/Oversold levels
- Cross Detection Level (default: 60)
### Pivot Detection
- Pivot Left/Right Bars (default: 5) - Controls sensitivity for price pivot validation
## How to Use
1. **Wait for signal**: Look for the triangle markers (▲/▼) with background color
2. **Confirm with crosses**: Ensure the corresponding WaveTrend cross (circle) is visible
3. **Check divergence line**: The yellow line should connect meaningful price pivots
## Alerts
- Built-in alert conditions for both LONG and SHORT signals
- Webhook-ready format for automation (Telegram, Discord, auto-trading bots)
## Best Practices
- Works well on higher timeframes (1H, 4H, Daily)
- Combine with support/resistance levels for better entries
- Use proper risk management - not every signal is a winner
## Credits
- RSI Divergence logic inspired by K-zax
- WaveTrend calculation based on LazyBear's implementation
- Combined and enhanced by sondengs
---
*This indicator is for educational purposes only. Always do your own research and manage your risk appropriately.*
## Overview
This indicator combines RSI Divergence detection with WaveTrend crosses to generate high-probability trading signals. It filters out noise by only showing divergences when confirmed by WaveTrend momentum crosses in the same direction.
## Key Features
### 1. Smart Divergence Detection
- Detects both bullish and bearish RSI divergences
- Uses **price pivot validation** to ensure divergences start from significant chart highs/lows, not just RSI extremes
- Divergence endpoints must be in the **neutral zone (20-80)** to avoid overbought/oversold traps
### 2. WaveTrend Cross Confirmation
- **Golden Cross**: WaveTrend crossover in oversold territory (below -60)
- **Dead Cross**: WaveTrend crossover in overbought territory (above +60)
- Crosses are displayed at RSI 20 (golden) and RSI 80 (dead) levels for easy visualization
### 3. Combined Signal Logic
- **LONG Signal**: Bullish RSI Divergence + Golden Cross within the divergence period
- **SHORT Signal**: Bearish RSI Divergence + Dead Cross within the divergence period
- Divergences are **only displayed** when a matching cross exists in the same period
### 4. Visual Elements
- **Yellow lines**: Divergence connections between master point and current point
- **Small diamonds**: Divergence markers (green for bullish, red for bearish)
- **Triangles**: Confirmed entry signals (▲ for LONG, ▼ for SHORT)
- **Circles**: WaveTrend crosses (green at bottom for golden, red at top for dead)
- **Background color**: Highlights signal bars (green for LONG, red for SHORT)
- **Debug table**: Shows real-time RSI, divergence count, WaveTrend values, and cross status
## Settings
### RSI Divergence
- RSI Length (default: 14)
- Overbuy/Oversell levels
- Divergence detection parameters (loopback, confirmation, limits)
### WaveTrend
- Channel Length (default: 10)
- Average Length (default: 21)
- Overbought/Oversold levels
- Cross Detection Level (default: 60)
### Pivot Detection
- Pivot Left/Right Bars (default: 5) - Controls sensitivity for price pivot validation
## How to Use
1. **Wait for signal**: Look for the triangle markers (▲/▼) with background color
2. **Confirm with crosses**: Ensure the corresponding WaveTrend cross (circle) is visible
3. **Check divergence line**: The yellow line should connect meaningful price pivots
## Alerts
- Built-in alert conditions for both LONG and SHORT signals
- Webhook-ready format for automation (Telegram, Discord, auto-trading bots)
## Best Practices
- Works well on higher timeframes (1H, 4H, Daily)
- Combine with support/resistance levels for better entries
- Use proper risk management - not every signal is a winner
## Credits
- RSI Divergence logic inspired by K-zax
- WaveTrend calculation based on LazyBear's implementation
- Combined and enhanced by sondengs
---
*This indicator is for educational purposes only. Always do your own research and manage your risk appropriately.*
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.