已更新

MAHQuant_IND_Divergence_v1.0

1 040
MAHQuant Divergence for Many Indicators v1.0

A professional multi-indicator divergence detection system with advanced risk management features. This indicator combines powerful divergence scanning across 10+ technical indicators with automated Entry/SL/TP calculation and smart confluence filtering.

✨ Key Features:

1️⃣ Multi-Indicator Divergence Detection:
• Simultaneously scans for divergences across 10+ indicators:

MACD, MACD Histogram, RSI, Stochastic, CCI
Momentum, OBV, VW-MACD, CMF, MFI
Custom external indicator support
• Detects both Regular and Hidden divergences
• Bullish and Bearish divergence identification
• Visual divergence lines with customizable styles

2️⃣ Advanced Risk Management (NEW):
• Automatic SL/TP Calculation

Entry price based on signal candle close
Stop Loss using ATR-based dynamic calculation
Two Take Profit levels (TP1 = 1:1 RR, TP2 = 1:2 RR)
Visual horizontal lines for Entry, SL, TP1, TP2

• Max SL Distance Protection

Configurable maximum stop loss limit (default: 800 points)
Prevents excessive risk in high-volatility conditions
Automatically caps SL if ATR-based distance exceeds limit

3️⃣ Smart Confluence Filter (NEW):
• Option to show signals ONLY when both Regular AND Hidden divergences appear together
• Significantly reduces false signals
• Increases signal reliability and probability

4️⃣ Professional Visualization:
• Signal Label: Shows Entry, SL, TP1, TP2 prices directly on chart
• Auto-Clean Mode: Automatically removes old signal lines to keep chart clean
• Customizable line lengths, colors, and styles
• Pivot point markers (optional)
• Divergence count display

5️ Alert System:
• Built-in alerts for all divergence types
• Separate alerts for Regular Bullish/Bearish
• Separate alerts for Hidden Bullish/Bearish
• Combined positive/negative divergence alerts

⚙️ How to Use:

Basic Setup:
Add indicator to your chart
Select which indicators to scan (MACD, RSI, Stoch, etc.)
Choose divergence type: Regular, Hidden, or Both
Adjust Pivot Period (default: 5) based on your timeframe

Risk Management:
5. Set ATR Length (default: 14) for SL calculation
6. Adjust ATR Multiplier (default: 0.1-1.0) for SL distance
7. Configure Max SL Distance to limit maximum risk
8. Enable "Show SL/TP Lines" to visualize levels

Advanced Filtering:
9. Enable "Show Only Confluence" to filter for highest-probability signals
10. Use "Show Only Last Signal Lines" to keep chart clean
11. Adjust SL/TP Lines Length for visual preference

Trading Strategy:
• Entry: Enter on signal candle close or next candle open
• Stop Loss: Use the calculated SL level (below/above divergence pivot)
• Take Profit 1: Close 50% position at TP1 (1:1 RR)
• Take Profit 2: Close remaining 50% at TP2 (1:2 RR)

📊 Indicator Settings Explained:

• Pivot Period: Number of bars for pivot detection (higher = fewer but stronger signals)
• Source for Pivots: Use Close or High/Low for pivot calculation
• Divergence Type: Regular (reversal), Hidden (continuation), or Both
• Min Number of Divergence: Filter out weak signals (show only if X+ divergences detected)
• Max Pivot Points to Check: How far back to search for divergences
• ATR Multiplier: Higher = wider SL, lower = tighter SL
• Max SL Distance: Maximum allowed SL in points (prevents excessive risk)

🎯 Best Practices:

✅ Use on higher timeframes (1H, 4H, Daily) for more reliable signals
✅ Combine with trend analysis and support/resistance levels
✅ Enable Confluence filter for higher probability setups
✅ Always use proper position sizing and risk management
✅ Backtest on your preferred market before live trading

⚠️ Important Notes:

• This indicator provides signals based on divergence detection
• Not all signals will be profitable - always use stop loss
• Market conditions affect divergence reliability
• Past performance does not guarantee future results
• This is a tool to assist your analysis, not a standalone trading system

Credits & Acknowledgment:
• Original divergence detection logic inspired by LonesomeTheBlue's open-source "Divergence for Many Indicators v4" indicator
• Enhanced with professional risk management features, SL/TP automation, and confluence filtering by MAHQuant Trading System
• Thank you to the TradingView community for open-source collaboration and continuous learning

⚠️ Disclaimer:
This script is for educational and informational purposes only. It does not constitute financial, investment, or trading advice. The author is not responsible for any losses incurred from using this indicator. Past performance is not indicative of future results. Always conduct your own research and manage your risk appropriately. Trade at your own risk.
版本注释
MAHQuant IND Divergence — Update Release

✨ What's New in This Version:

We have added TWO powerful new filters to give you even more control over signal quality and chart cleanliness!

1. Multiple Regular Divergence Filter
Displays signals ONLY when at least 2 distinct Regular Divergence lines (from different indicators with different pivot distances) converge on the same candle.

2. Multiple Hidden Divergence Filter
Displays signals ONLY when at least 2 distinct Hidden Divergence lines converge on the same candle. This is perfect for identifying strong continuation setups with multi-indicator confirmation.

How the New Filters Work:
• Scans all active indicators for divergences
• Groups them by their unique pivot distance (div_len) to ensure lines are truly distinct (not just overlapping on the same pivot)
• Only displays signals when 2+ distinct lines meet at the same candle
• Filters out single or overlapping divergences for much cleaner charts

🎯 Complete Filter Suite Now Available:
1 Confluence Filter (Regular + Hidden Together) — *Available in previous versions*
2️ Multiple Regular Filter (2+ Distinct Regular Lines) — *NEW*
3 Multiple Hidden Filter (2+ Distinct Hidden Lines) — *NEW*

⚙️ Key Benefits:
• Significantly reduces false signals
• Higher probability setups with multi-indicator confirmation
• Cleaner charts showing only the strongest structural divergences
• Fully compatible with existing SL/TP and risk management features

📌 All previous features remain intact:
• Multi-indicator divergence detection (10+ indicators)
• Automatic SL/TP calculation with ATR
• Signal labeling with pip distances
• Auto-clean functionality
• Max SL distance protection

Credits:
• Original divergence logic: LonesomeTheBlue (open-source)
• Enhanced features & filters: MAHQuant Trading System

⚠️ Disclaimer:
This script is for educational purposes only. It does not constitute financial advice. Always manage your risk and trade responsibly.

免责声明

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