OPEN-SOURCE SCRIPT
Güncellendi MACD Crossover + Alert

MACD Proximity & Crossover Alert Script
This script is designed to help traders stay ahead of MACD crossovers by providing:
Whether you're swing trading or scalping, this tool gives you advanced notice to prepare — and a confirmation signal to act on. It works on any timeframe and helps avoid late entries by alerting you when momentum is shifting.
Features:
Perfect for traders who want a heads-up before momentum shifts — not just a reaction afterward.
This script is designed to help traders stay ahead of MACD crossovers by providing:
- Early alerts when the MACD and Signal lines are getting close (within a customizable threshold)
- Instant alerts when a bullish or bearish crossover occurs
Whether you're swing trading or scalping, this tool gives you advanced notice to prepare — and a confirmation signal to act on. It works on any timeframe and helps avoid late entries by alerting you when momentum is shifting.
Features:
- Customizable MACD settings (fast, slow, signal length)
- Adjustable "proximity" threshold
- Visual background highlight when lines are close
- Built-in alert conditions for:
- MACD crossing above Signal (bullish)
- MACD crossing below Signal (bearish)
- MACD and Signal getting close (early warning)
Perfect for traders who want a heads-up before momentum shifts — not just a reaction afterward.
Sürüm Notları
What's NewThis is a major upgrade from the basic MACD Crossover script to a comprehensive MACD analysis tool. The new Enhanced MACD v2.1 includes:
- Upgraded to Pine Script v6 for improved performance and features
- Dynamic Threshold Detection using ATR or static value to identify potential crossovers before they happen
- Comprehensive Divergence Detection for both regular and hidden divergences (bullish and bearish)
- Multi-Timeframe Analysis with optional higher timeframe MACD overlay
- Volume Confirmation for more reliable crossover signals
Enhanced Visual Indicators:
- Slope-based coloring for MACD and Signal lines
- Dynamic histogram coloring for momentum changes
- Visual markers for all divergence types
- Background highlighting for near-crossovers
- Zero Line Crossover detection and alerts
- Complete Alert System for crossovers, divergences, and threshold approaches
Trading Applications
The Enhanced MACD gives traders significant advantages:
- Early Signal Detection - Proximity threshold alerts you before crossovers happen
- Signal Validation - Volume confirmation reduces false signals
- Trend Reversal Identification - Divergence detection spots potential reversals
- Multi-timeframe Analysis - Compare current timeframe MACD with higher timeframes
- Momentum Assessment - Histogram coloring shows strength changes
How to Use
- Crossover signals are shown with triangle markers (up for bullish, down for bearish)
- Divergences are highlighted with connecting lines and bullet points
- Near-crossover zones are highlighted with subtle yellow background
- Use alerts for real-time notification of important MACD events
This indicator is perfect for traders looking for a more robust MACD implementation with advanced technical features while maintaining an intuitive visual display.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuna uygun olarak, bu komut dosyasının oluşturucusu bunu açık kaynaklı hale getirmiştir, böylece yatırımcılar betiğin işlevselliğini inceleyip doğrulayabilir. Yazara saygı! Ücretsiz olarak kullanabilirsiniz, ancak kodu yeniden yayınlamanın Site Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuna uygun olarak, bu komut dosyasının oluşturucusu bunu açık kaynaklı hale getirmiştir, böylece yatırımcılar betiğin işlevselliğini inceleyip doğrulayabilir. Yazara saygı! Ücretsiz olarak kullanabilirsiniz, ancak kodu yeniden yayınlamanın Site Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.