OPEN-SOURCE SCRIPT
MACDiver from axis V1.4

Indicator that identifies bullish and bearish divergences between price action and the MACD oscillator. It uses pivot highs/lows in both price and MACD series to detect potential reversal signals. When price makes higher highs (or lower lows) while MACD makes lower highs (or higher lows), the indicator marks these divergences with lines and labels on the chart, providing potential trading signals.
MACDiver Indicator Usage Guide
Purpose: Detects bullish and bearish divergences between price action and the MACD oscillator, with projected target price levels.
Key Features:
Divergence Detection: Finds mismatches between price and MACD movements
Target Projection: Calculates and displays estimated reversal price levels
Visual Signals: Shows lines, labels, and target markers on the chart
Main Settings:
pivotLR: Sensitivity for pivot detection (default: 5). Lower = more sensitive, higher = fewer false signals
searchBack: How many bars back to search for matching pivots (default: 120). Adjust based on your timeframe
showTarget: Enable/disable target price projections
showTargetLines: Enable/disable dashed projection lines
How to Use:
Identify Divergences:
Bullish: Price makes lower lows while MACD makes higher lows (green "Bull Div" label)
Bearish: Price makes higher highs while MACD makes lower highs (red "Bear Div" label)
Check Target Levels:
Green/red target label shows projected price level for bullish/bearish divergences
Dashed line extends from the divergence point to the target
Trade Entry:
Use divergence confirmation as potential entry signal
Target level as take-profit reference
Adjust Settings:
Higher pivotLR for fewer signals, lower for more sensitivity
Adjust searchBack based on typical trend lengths on your timeframe
Key Variables:
pivotLR: Number of bars to the left/right to confirm pivot highs/lows
searchBack: Maximum number of bars to look back when searching for previous matching pivots
MACDiver Indicator Usage Guide
Purpose: Detects bullish and bearish divergences between price action and the MACD oscillator, with projected target price levels.
Key Features:
Divergence Detection: Finds mismatches between price and MACD movements
Target Projection: Calculates and displays estimated reversal price levels
Visual Signals: Shows lines, labels, and target markers on the chart
Main Settings:
pivotLR: Sensitivity for pivot detection (default: 5). Lower = more sensitive, higher = fewer false signals
searchBack: How many bars back to search for matching pivots (default: 120). Adjust based on your timeframe
showTarget: Enable/disable target price projections
showTargetLines: Enable/disable dashed projection lines
How to Use:
Identify Divergences:
Bullish: Price makes lower lows while MACD makes higher lows (green "Bull Div" label)
Bearish: Price makes higher highs while MACD makes lower highs (red "Bear Div" label)
Check Target Levels:
Green/red target label shows projected price level for bullish/bearish divergences
Dashed line extends from the divergence point to the target
Trade Entry:
Use divergence confirmation as potential entry signal
Target level as take-profit reference
Adjust Settings:
Higher pivotLR for fewer signals, lower for more sensitivity
Adjust searchBack based on typical trend lengths on your timeframe
Key Variables:
pivotLR: Number of bars to the left/right to confirm pivot highs/lows
searchBack: Maximum number of bars to look back when searching for previous matching pivots
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。