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が提供または推奨する金融、投資、トレード、その他のアドバイスや推奨を意図するものではなく、それらを構成するものでもありません。詳細は利用規約をご覧ください。