OPEN-SOURCE SCRIPT
已更新

AetherEdge - Smart RSI Divergence Hunter

8 517
🖊️ Overview
AetherEdge Smart RSI Divergence Hunter is a next-generation divergence engine that automatically detects all four types of RSI divergences (Regular Bullish/Bearish, Hidden Bullish/Bearish) and fully integrates them with price structure (HH/HL/LH/LL) to extract only the highest-precision signals. Through three-layer verification—RSI pivot tracking, structure filtering, and OB/OS confirmation—it never misses the silent "divergence between price and momentum" the market emits. Both reversal and trend-continuation strategies are unified in a single indicator.

🔶 Key Features

Full 4-Type Divergence Coverage: Regular Bullish/Bearish + Hidden Bullish/Bearish
RSI Pivot-Based Detection: High-precision swing point identification
Price Structure Filter: Auto HH/HL/LH/LL detection for trend alignment
Intelligent OB/OS Confirmation: Regular fires in extremes, Hidden in continuation zones
Pivot Spacing Control: minBars / lookback to suppress over-detection
Type-Specific Color System: Instant 4-type identification via AetherEdge palette
Structure Markers: HH/HL/LH/LL plotted directly on chart
Star ⭐ Signals: High-conviction divergences highlighted
Auto Divergence Line Drawing: Visual representation of price/RSI divergence
Integrated Dashboard: Current structure, latest divergence, RSI status
Premium Dark Mode UI: Professional brand-themed design
🧠 Technical Architecture
This indicator evolves divergence detection from "simple discovery" to "structural confirmation" via a sophisticated engine.

Dual Pivot Tracking: ta.pivothigh/pivotlow detects pivots on RSI; latest two points (rsiPH1/PH2, rsiPL1/PL2) are recorded across price, RSI, and bar index axes.
4-Type Divergence Logic:
Regular Bullish: pxPL1 < pxPL2 AND rsiPL1 > rsiPL2 (price LL × RSI HL)
Regular Bearish: pxPH1 > pxPH2 AND rsiPH1 < rsiPH2 (price HH × RSI LH)
Hidden Bullish: pxPL1 > pxPL2 AND rsiPL1 < rsiPL2 (uptrend pullback continuation)
Hidden Bearish: pxPH1 < pxPH2 AND rsiPH1 > rsiPH2 (downtrend rally continuation)
Structure Engine: From structLen-based swing detection, the latest 2 swings are compared to dynamically determine HH/HL/LH/LL, generating isUptrend/isDowntrend.
Trend Compatibility Filter: A logically correct hierarchical filter—regular divergences require "not opposite trend" while hidden divergences require "matching trend."
OB/OS Confirmation: When requireOBOS is ON, bullish fires at rsiOS+10 or below, bearish at rsiOB-10 or above—reinforcing reversal conviction in extremes.
Pivot Spacing Control: minBars excludes adjacent pivots; lookback filters out stale divergences. Balanced noise reduction and effectiveness.
Auto Line & Label Drawing: 4-color system visualizes by type, retaining historical divergences on chart.
⚙️ Recommended Settings & Tuning Guide

Crypto Defaults:

BTC (4H–Daily): rsiLen=14, pivLeft/Right=5, structLen=20 (standard is optimal)
ETH (1H–4H): pivLeft/Right=4, lookback=80 for slightly earlier detection
SOL (High-Vol): pivLeft/Right=6, minBars=8 to exclude false divergences
XRP (Range-Heavy): requireOBOS=true, useStruct=true for strict filtering
Tuning Guide:

Day Trading: Default settings, operate 15M–1H
Swing Trading: rsiLen=21, structLen=30 for macro divergences
Scalping: pivLeft/Right=3, minBars=3 for fast short-term detection
Reversal-Focused: useRegBull/Bear=true, requireOBOS=true for max conviction
Trend-Following: useHidBull/Bear=true, useStruct=true for continuation signals
Excess Signals: minBars=10, lookback=40 to prioritize precision
Sparse Signals: useStruct=false, requireOBOS=false to relax detection
💡 How to Use in Practice

Regular Bullish + RSI ≤30: Strongest reversal setup at bottoms
Regular Bearish + RSI ≥70: Top-zone short entry candidate
Hidden Bullish + HL Structure: Perfect pullback-buy signal in uptrend continuation
Hidden Bearish + LH Structure: Rally-sell entry in downtrend continuation
Multi-Timeframe Synergy: Higher-TF structure confirmation + lower-TF divergence firing = ultimate setup
AetherEdge Synergy: Self-Evolving S/R Grid strong line + Divergence Hunter reversal signal = dual confirmation
Squeeze Breaker Fusion: Divergence forms during squeeze → directional confirmation on release = explosive entry
Double Divergence: Two consecutive same-direction divergences = ultra-high conviction—entry reinforcement
⚠️ Important Notes

Pivot Lag: pivRight bars of confirmation delay; caution with real-time unconfirmed signals
Avoid Counter-Trend in Strong Trends: Regular divergences become invalid during powerful trend continuations
Hidden Structure Dependency: With structure filter ON, no firing if not aligned with trend direction
Lookback Limit: Stale divergences are invalidated; tune accordingly on long-term charts
OB/OS Filter Trade-off: requireOBOS=true increases conviction but reduces signal count
🚨 Disclaimer
This indicator is a technical analysis tool provided for educational and research purposes only and does not constitute financial advice. Divergence detection and signal generation are probabilistic evaluations based on historical price and RSI data and do not guarantee future market behavior. All trading decisions are made at your own risk and should be accompanied by proper risk management.
版本注释
Add alert conditions

免责声明

这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。