CMF, RSI, CCI, MACD, OBV, Fisher, Stoch RSI, ADX (+DI/-DI)Eight normalized indicators are used in conjunction with the CMF, CCI, MACD, and Stoch RSI indicators. You can track buy and sell decisions by tracking swings. The zero line is for reversal tracking at -20, +20, +50, and +80. You can use any of the nine indicators individually or in combination.
이동 평균 컨버전스 / 다이버전스 (MACD)
Moving Average Convergence-Divergence (MACD)This script implements the Moving Average Convergence-Divergence (MACD), a popular momentum indicator used in technical analysis to identify trend direction, momentum shifts, and potential buy/sell signals.
🔹 Key Features
1. Inputs & Customization
MACD Lines Toggle: Enable/disable the MACD and signal lines.
Source Price: Defaults to close but can be adjusted (e.g., open, high, low, hl2).
Fast Length (12): The period for the faster-moving EMA.
Slow Length (26): The period for the slower-moving EMA.
Signal Length (9): The smoothing period for the signal line.
2. Calculations
Computes the MACD Line (fast EMA - slow EMA).
Computes the Signal Line (EMA of the MACD line).
Computes the Histogram (difference between MACD and Signal lines).
3. Visual Indicators
Zero Line: A white horizontal line at 0 for reference.
MACD Line: Plotted in green when above the signal line, red when below.
Signal Line: Displayed as a yellow line.
Histogram:
Green bars when MACD > Signal (bullish momentum).
Red bars when MACD < Signal (bearish momentum).
Background Highlights:
Light green on bullish crossovers (MACD crosses above Signal).
Light red on bearish crossunders (MACD crosses below Signal).
4. Alerts
Triggers when:
Bullish Crossover (MACD crosses above Signal).
Bearish Crossunder (MACD crosses below Signal).
🔹 How Traders Use This Indicator
Trend Identification:
MACD above zero → bullish trend.
MACD below zero → bearish trend.
Momentum Signals:
Bullish Crossover (Buy Signal): MACD crosses above Signal.
Bearish Crossunder (Sell Signal): MACD crosses below Signal.
Divergence (Not in this script, but useful):
Price makes higher highs, but MACD makes lower highs → Potential reversal.
🔹 Strengths of This Script
✅ Clean and Efficient Code – Uses Pine Script v6 best practices.
✅ Customizable Inputs – Adjust lengths and source price.
✅ Clear Visuals – Color-coded for easy interpretation.
✅ Built-in Alerts – For automated trading strategies.
Jul 1
Release Notes
This script implements the Moving Average Convergence-Divergence (MACD), a popular momentum indicator used in technical analysis to identify trend direction, momentum shifts, and potential buy/sell signals.
🔹 Key Features
1. Inputs & Customization
MACD Lines Toggle: Enable/disable the MACD and signal lines.
Source Price: Defaults to close but can be adjusted (e.g., open, high, low, hl2).
Fast Length (12): The period for the faster-moving EMA.
Slow Length (26): The period for the slower-moving EMA.
Signal Length (9): The smoothing period for the signal line.
2. Calculations
Computes the MACD Line (fast EMA - slow EMA).
Computes the Signal Line (EMA of the MACD line).
Computes the Histogram (difference between MACD and Signal lines).
3. Visual Indicators
Zero Line: A white horizontal line at 0 for reference.
MACD Line: Plotted in green when above the signal line, red when below.
Signal Line: Displayed as a yellow line.
Histogram:
Green bars when MACD > Signal (bullish momentum).
Red bars when MACD < Signal (bearish momentum).
Background Highlights:
Light green on bullish crossovers (MACD crosses above Signal).
Light red on bearish crossunders (MACD crosses below Signal).
4. Alerts
Triggers when:
Bullish Crossover (MACD crosses above Signal).
Bearish Crossunder (MACD crosses below Signal).
🔹 How Traders Use This Indicator
Trend Identification:
MACD above zero → bullish trend.
MACD below zero → bearish trend.
Momentum Signals:
Bullish Crossover (Buy Signal): MACD crosses above Signal.
Bearish Crossunder (Sell Signal): MACD crosses below Signal.
Divergence (Not in this script, but useful):
Price makes higher highs, but MACD makes lower highs → Potential reversal.
🔹 Strengths of This Script
✅ Clean and Efficient Code – Uses Pine Script v6 best practices.
✅ Customizable Inputs – Adjust lengths and source price.
✅ Clear Visuals – Color-coded for easy interpretation.
✅ Built-in Alerts – For automated trading strategies.
[SwingMann©] MACD+ MACD+
Advanced MACD with flexible smoothing and MA types
Description:
The MACD+ is an enhanced version of the classic MACD indicator, designed to give traders greater control over the calculation and smoothing process.
With selectable moving average types (SMA, EMA, WMA) and additional smoothing options for both the MACD and Signal lines, it offers a more refined way to visualize market momentum and trend shifts.
Highlights:
• Choose between SMA, EMA, and WMA for MACD and Signal Line
• Independent smoothing for both MACD and Signal values
• Clean histogram visualization
• Alerts for bullish/bearish histogram phase shifts
• Perfect companion to SwingMann© EWTrend+
AlphaMACD - Adaptive MACD with Efficiency RatioOVERVIEW
AlphaMACD is an adaptive implementation of the classic MACD indicator that dynamically adjusts its calculation periods based on market efficiency. Unlike traditional MACD which uses fixed periods (typically 12, 26, 9), this indicator adapts its fast and slow EMA periods in real-time based on how efficiently the market is trending.
WHAT MAKES THIS ORIGINAL
This is not a simple MACD with different settings or colors. The core innovation is the adaptive period calculation using Kaufman's Efficiency Ratio, which was originally developed for the Adaptive Moving Average (AMA). This indicator applies that adaptive logic to MACD itself.
Key Differences from Standard MACD:
- Periods dynamically adjust between user-defined ranges (default: 8-21 for fast, 21-55 for slow)
- Uses Kaufman's Efficiency Ratio to measure market trendiness
- Implements gap protection to prevent extreme spikes from market gaps
- Includes market regime detection to filter signals in choppy conditions
- Provides multi-timeframe trend confirmation
HOW IT WORKS
1. Efficiency Ratio Calculation:
The indicator calculates market efficiency by comparing the absolute price change over a period to the sum of absolute price changes within that period. High efficiency = strong trending market. Low efficiency = choppy/sideways market.
2. Adaptive Period Adjustment:
- In trending markets (high efficiency): Periods move toward the minimum values for faster response
- In choppy markets (low efficiency): Periods move toward the maximum values for slower, more stable signals
- The "Sensitivity" parameter controls how aggressively periods adapt (0.5 to 5.0)
3. Gap Protection:
The custom adaptive EMA function detects abnormal price gaps (moves larger than 3x the typical ATR-based change) and limits their impact on the calculation. This prevents weekends or news gaps from causing extreme MACD spikes.
4. Signal Quality Filtering:
- Market regime detection identifies trending vs sideways conditions
- Momentum filter (RSI-based) prevents signals during overextended moves
- Signal strength calculation helps identify high-confidence setups
- Sideways market signals are marked with warning symbols
5. Multi-Timeframe Analysis:
The indicator compares current timeframe MACD with a higher timeframe (default 60 min) to provide context and filter against-trend signals.
HOW TO USE IT
Settings:
- Core Settings: Define the minimum and maximum periods for fast/slow EMAs
- Sensitivity: Higher values make the indicator more responsive to market changes
- Multi-timeframe: Set a higher timeframe for trend confirmation
- Visual options: Customize appearance and enable/disable features
Signal Interpretation:
- Strong bullish/bearish signals (large triangles): High-confidence entries in trending markets
- Warning signals (small ⚠): Crossovers in sideways markets - use caution or skip
- Divergence labels ("DIV"): Price and MACD diverging - potential reversal
- Background color: Green tint = trending market, Orange tint = sideways market
The Information Table shows:
- Current market regime (trending or sideways)
- Market efficiency percentage (how clean the trend is)
- Current adaptive fast and slow periods
- Higher timeframe trend direction
- Current signal strength
Best Practices:
- In trending markets: Trust strong signals, avoid warning signals
- In sideways markets: Reduce position sizes or skip trades entirely
- Use higher timeframe confirmation for better signal quality
- Adjust sensitivity based on your trading timeframe (higher for intraday, lower for swing)
TECHNICAL DETAILS
Calculation Method:
- Efficiency Ratio = ABS(Close - Close ) / SUM(ABS(Close - Close ), Period)
- Smoothed Efficiency = EMA(Efficiency Ratio, 5)
- Fast Period = Fast_Min + (Fast_Max - Fast_Min) × (1 - Smoothed_Efficiency × Sensitivity)
- Slow Period = Slow_Min + (Slow_Max - Slow_Min) × (1 - Smoothed_Efficiency × Sensitivity)
- Adaptive EMA uses standard EMA formula with gap detection and limiting
- MACD = Fast Adaptive EMA - Slow Adaptive EMA
- Signal = EMA(MACD, Signal Period)
- Histogram = MACD - Signal
The adaptive periods are calculated on every bar, so the MACD responds faster in trending conditions and stabilizes during consolidation.
WHAT THIS SOLVES
Standard MACD Problems:
- Fixed periods don't adapt to changing market conditions
- Too many false signals in sideways markets
- Whipsaws during low-volatility consolidation
- Price gaps can cause misleading spikes
AlphaMACD Solutions:
- Periods automatically adjust to market state
- Market regime filter identifies and warns about sideways conditions
- Adaptive smoothing reduces whipsaws
- Gap protection prevents false extremes
LIMITATIONS
- Like all indicators, this does not predict the future
- Requires trending markets for optimal performance
- Adaptive calculation means backtesting results will differ from fixed-period MACD
- More complex than standard MACD - requires understanding of adaptive concepts
- The adaptive periods mean you cannot directly compare this to traditional MACD studies
This indicator is best used as part of a complete trading system, not as a standalone signal generator.
EDUCATIONAL VALUE
For traders learning about:
- Adaptive indicators and market efficiency concepts
- Kaufman's Adaptive Moving Average principles applied to oscillators
- Market regime detection and signal filtering
- Gap handling in technical indicators
- Multi-timeframe analysis integration
Not Financial advice.
MACD Pro - Multi-Filter Smart Divergence System# MACD Pro - Multi-Filter Smart Divergence System
## Professional MACD with Advanced Filtering & Automatic Divergence Detection
Transform the classic MACD indicator with professional-grade filters, automated divergence detection, and pre-optimized profiles for different markets.
---
## KEY FEATURES
### Smart Signal Filtering
- **Zero-Line Territory Filter** - Eliminates weak crossovers
- **3-Period Confirmation** - Reduces false signals
- **Minimum Distance Threshold** - Filters out noise
- **Multi-Indicator Confirmation** - RSI + Volume validation
### Automatic Divergence Detection
- **Visual Divergence Lines** - Connects price and MACD pivots automatically
- **Bullish/Bearish Recognition** - Real-time identification
- **Customizable Lookback** - Adjust sensitivity
- **Clean Display** - Managed line limits
### Pre-Optimized Market Profiles
- **S&P 500** (2/60/2) - Tested +3.63% annual
- **Gold** (14/48/3) - Optimized for volatility
- **Forex 30m** (24/52/9) - 24/7 market adapted
- **Scalping 1m** (5/13/6) - Quick trades
- **Linda Raschke** (3/10/16) - Classic scalping
- **Swing Trading** (8/24/9) - Higher timeframes
### Advanced Technical Features
- **ATR Normalization** - Volatility adaptation
- **Predictive Forecast** - Linear regression projection
- **Multi-Timeframe View** - Higher TF overlay
- **Volume Analysis** - Spike confirmation
- **Professional Dashboard** - Real-time metrics
---
## HOW TO USE
**Quick Start:**
1. Enable "Use Optimized Profile"
2. Select your market type
3. Watch for signal arrows and divergence lines
4. Confirm with dashboard metrics
**Signal Types:**
- 🔺 Green Triangle = Bullish crossover (filtered)
- 🔻 Red Triangle = Bearish crossover (filtered)
- ⚪ Small Circle = Conservative zero-line cross
- 🟢 Green Line = Bullish divergence
- 🔴 Red Line = Bearish divergence
---
## CUSTOMIZATION
**Filters:** Toggle each filter independently for your risk tolerance
**Divergence:** Adjust lookback period, line width, and maximum displayed lines
**Confirmation:** Customize RSI levels and volume spike thresholds
**Display:** Choose histogram, forecast, and multi-timeframe options
---
## ALERT CONDITIONS
- MACD Long Signal
- MACD Short Signal
- Bullish Divergence
- Bearish Divergence
---
## IMPORTANT NOTES
**Repainting:** Divergence detection uses historical pivots and may redraw. Crossover signals are non-repainting.
**Disclaimer:** Pre-optimized profiles based on historical data. Past performance does not guarantee future results. This indicator is for educational purposes only, not financial advice.
---
## BEST PRACTICES
**Timeframes:**
- 1-5m → Scalping profile
- 15-30m → Forex profile
- 1-4h → Swing profile
- Daily → S&P 500/Gold profiles
**Market Conditions:**
- Trending → Focus on momentum
- Ranging → Enable all filters, watch divergences
- Volatile → Use ATR normalization
**Combine With:** Support/resistance levels, trendlines, moving averages, and price action analysis.
---
## WHY MACD PRO?
| Feature | Standard MACD | MACD Pro |
|---------|--------------|----------|
| Signal Filters | ❌ | ✅ 5 Advanced |
| Divergence | ❌ Manual | ✅ Automatic |
| Market Profiles | ❌ | ✅ 7 Optimized |
| Volume Filter | ❌ | ✅ Built-in |
| Multi-Timeframe | ❌ | ✅ Yes |
| ATR Adaptation | ❌ | ✅ Yes |
---
**If you find this indicator useful, please boost 🚀**
*Protected source code. Compatible with all TradingView plans.*
TREND (Type II) | Hamster-CoderTREND (Type II) — Smart Trend Reversal Indicator Based on RCI & MACD
TREND (Type II) is a powerful tool for traders who want to spot not just where the market is now, but where it might be heading next.
It combines the analytical strength of RSI and MACD to identify potential trend reversal points before they become obvious on the chart.
🚀 Key Advantages
Early trend detection. TREND can anticipate possible reversals even before the actual crossover occurs.
Flexible visualization. Displayed in a separate panel while showing buy/sell signals directly on the main chart.
Multi-timeframe support. Analyze signals from higher or lower timeframes without switching charts.
Intuitive color background. The background automatically turns red during bearish conditions for instant market sentiment recognition.
🎯 Signal Types
Primary Signal. When RCI and MACD lines actually cross, confirming a trend shift.
Preliminary Signal. When a crossover is projected to occur on the next bar.
Overheat Signal. When the market reaches a defined threshold (e.g. ±90) and starts showing signs of cooling down.
🧠 Unique Features
Extra Filters (experimental). Filters out weak or false signals, showing only those confirmed by additional criteria.
RCI–MACD Difference Mode. Visualize the distance between RCI and MACD as a histogram to assess divergence strength.
Custom Thresholds. Define your own overbought/oversold zones to fine-tune signal sensitivity.
🔍 Who It’s For
TREND (Type II) is ideal for traders who:
seek dynamic entry and exit points without lagging indicators;
want visual and statistical confirmation of trend changes;
build multi-layered strategies requiring signal validation.
💬 Use TREND (Type II) to see the market one step ahead.
This isn’t just another indicator — it’s an early warning system for potential trend reversals .
Imbalance Detector — 10 Methodsmbalance Detector — 10 Methods is a comprehensive multi-signal toolkit designed to visualize market inefficiencies, liquidity imbalances, and displacement zones — all on a single chart.
It combines 10 professional imbalance detection methods commonly used in Smart Money Concepts (SMC), Order Flow, and Volume Profile analysis.
This indicator helps traders identify where price has moved inefficiently, leaving behind imbalances, FVGs, and liquidity zones that often attract price back for mitigation or continuation.
Each method highlights a different form of imbalance or displacement, giving traders a complete structural overview for scalp, intraday, or swing analysis.
Moving Average Convergence Divergence ProThis script is an advanced and highly customizable version of the classic Moving Average Convergence Divergence (MACD) indicator for TradingView. It builds upon the standard MACD by adding professional features like divergence detection, visual enhancements, configurable alerts, and optional smoothing, making it a more powerful tool for technical analysis.
Key Features and Functionality
Enhanced Visual Customization:
Toggleable Elements: You can independently show or hide the main MACD line, signal line, histogram, and the fill area between the lines.
Customizable Colors: All elements (bullish, bearish, signal line, divergence markers) can be colored to your preference.
Dynamic Histogram: The histogram uses a gradient effect, becoming more transparent during weaker momentum and more opaque during stronger momentum.
Optional EMA Smoothing:
Includes an option to apply an Exponential Moving Average (EMA) to the main MACD line, which can help smooth out noise and provide clearer signals.
Built-in Divergence Detection:
Automatically scans for classic bullish and bearish divergences between price and the MACD line.
Bullish Divergence: Price makes a lower low, but the MACD line makes a higher low (and is above the zero line).
Bearish Divergence: Price makes a higher high, but the MACD line makes a lower high (and is below the zero line).
These are clearly marked with triangle shapes at the top and bottom of the indicator panel.
Comprehensive Alert Conditions:
The script is pre-configured to generate alert conditions for:
Bullish Crossover (MACD line crosses above Signal line)
Bearish Crossunder (MACD line crosses below Signal line)
Bullish Divergence Detection
Bearish Divergence Detection
This allows traders to set up automated notifications directly within TradingView.
Clear Visual Cues:
The entire indicator's background changes color to signal key events:
Green for a bullish crossover.
Red for a bearish crossunder.
Light Green for a bullish divergence.
Light Red for a bearish divergence.
How to Use the Indicator
Signal Generation:
Crossover: The most common signal. A buy signal occurs when the MACD line crosses above the signal line (especially near or below the zero line). A sell signal occurs when it crosses below.
Zero Line: The MACD line crossing above the zero line is considered bullish, and crossing below is bearish.
Divergence: Divergences can be powerful signals for potential trend reversals. A bullish divergence suggests selling pressure may be exhausting, while a bearish divergence suggests buying pressure may be waning.
Customization for Your Strategy:
If you find the standard MACD too noisy, enable the "Show EMA of MACD" option to smooth the main line.
If you only care about crossovers, you can turn off the histogram and fill to reduce visual clutter.
Use the divergence detection to spot high-probability reversal setups that other traders might miss.
MACD Divergence StructureMACD Divergence Structure Final
This indicator enhances the classic MACD by automatically detecting and labeling key divergence structures. It highlights bullish and bearish divergences, as well as potential sell tops and disappearing tops, directly on the chart. By combining EMA‑based MACD calculations with dynamic label plotting, it provides traders with clear, actionable signals to anticipate possible trend reversals or momentum shifts. Designed for flexibility and clarity, it helps traders quickly spot hidden market structure changes without cluttering the chart.
REMS Synergy OverlayThis 3rd generation REMS indicator builds upon the foundations assessing the relationships between RSI, EMAs, MACDs, and Stochastic RSI across multiple timeframes. Designed to help traders identify less frequent, but high probability entries across 2 time frames. Uses 3 levels of confluence indicators for both long and short moves.
Confluence Level 1 (Highest Conviction):
Evaluates selected criteria across both timeframes. All selected criteria must be in confluence to trigger signal.
Confluence Level 2 (Moderate Conviction):
Selected criteria can be selected by each timeframe individually. All selected criteria must be in confluence to trigger signal.
Confluence Level 3 (Lower/supportive confluence):
Of the selected criteria, this level can evaluate a set number of conditions that must be met. Number of conditions is user-defined.
Includes VWAP and 4 EMAs as optional visual representations.
Includes 'Enhanced Candles' than can colour code candlesticks for better visual identification. (off by default)
Originally designed with 5 minute and 2 minute timeframes in mind, and pairs well with REMS First Strike and/or REMS Snap Shot indicators.
Values coded below:
RSI
-Primary: Length = 14, Smoothing = 20 (via SMA)
-Secondary: Length = 7, Smoothing = 20 (via SMA)
Stochastic RSI
Primary:
-RSI Length = 14
-Stochastic Length = 8
-%K = 3, %D = 3
Secondary:
-RSI Length = 7
-Stochastic Length = 7
-%K = 3, %D = 2
MACD - applied to both timeframes
-Fast = 12, Slow = 26, Signal = 9
ParallaxMind™️ MACD-V: Volatility Normalized Momentum Candles🚀 Award-Winning Momentum Indicator that Outperforms the Standard MACD in All Market Conditions
📈 ParallaxMind™️ MACD-V: Volatility Normalized Momentum Colored Bars with Alerts
The MACD-V (Volatility Normalized MACD) was first developed by trader Alex Spiroglou in 2015, published in a 2022 research paper, and awarded the Charles H. Dow Award for outstanding research in technical analysis.
Unlike the standard MACD, which often suffers from noisy false signals and inconsistent readings, the MACD-V introduces volatility normalization. This innovation creates a hybrid momentum tool that solves the five core limitations of the classic MACD — making signals stable across time, universally comparable across markets, and structured within a clear momentum framework.
🔑 Key Features & Benefits
Time-Stable & Cross-Market Comparable: A reading of +100 or -100 has the same meaning across decades and across assets — stocks, forex, commodities, and crypto.
Objective Momentum Framework: Levels at +150, +50, -50, and -150 create universal benchmarks to identify rallying, declining, ranging, and extreme conditions.
Alerting Capability: Built-in alerts notify you the moment momentum shifts — including crossovers, zero-line breaks, and entries into overbought/oversold zones. This ensures you never miss critical setups without constantly watching charts.
Momentum Stage Labels: Clear, automatic labels appear on your chart to define the current state of the market — Rallying, Retracing, Ranging, Declining, Rebounding, or Risk Zones. These labels cut through noise and provide instant clarity about market conditions.
With these features, the MACD-V transforms momentum analysis from subjective art into objective science, delivering cleaner entries, smarter exits, and greater confidence in any market.
ParallaxMind™️ MACD-V: Volatility Normalized Momentum w/Alerts🚀 Award-Winning Momentum Indicator that Outperforms the Standard MACD in All Market Conditions
📈 ParallaxMind™️ MACD-V: Volatility Normalized Momentum with Alerts
The MACD-V (Volatility Normalized MACD) was first developed by trader Alex Spiroglou in 2015, published in a 2022 research paper, and awarded the Charles H. Dow Award for outstanding research in technical analysis.
Unlike the standard MACD, which often suffers from noisy false signals and inconsistent readings, the MACD-V introduces volatility normalization. This innovation creates a hybrid momentum tool that solves the five core limitations of the classic MACD — making signals stable across time, universally comparable across markets, and structured within a clear momentum framework.
🔑 Key Features & Benefits
Time-Stable & Cross-Market Comparable: A reading of +100 or -100 has the same meaning across decades and across assets — stocks, forex, commodities, and crypto.
Objective Momentum Framework: Levels at +150, +50, -50, and -150 create universal benchmarks to identify rallying, declining, ranging, and extreme conditions.
Alerting Capability: Built-in alerts notify you the moment momentum shifts — including crossovers, zero-line breaks, and entries into overbought/oversold zones. This ensures you never miss critical setups without constantly watching charts.
Momentum Stage Labels: Clear, automatic labels appear on your chart to define the current state of the market — Rallying, Retracing, Ranging, Declining, Rebounding, or Risk Zones. These labels cut through noise and provide instant clarity about market conditions.
With these features, the MACD-V transforms momentum analysis from subjective art into objective science, delivering cleaner entries, smarter exits, and greater confidence in any market.
DASM MACDMACD rules:
The main trend is bullish when the MACD is above the zero line, and bearish when it’s below.
The histogram shows when a trend starts and when it’s losing strength.
The background color highlights the trend direction.
The EMA is easy to read — green means buy, red means sell.
For scalping, it’s best used during high-volume hours (9:30–11:00 New York time).
MACD Enhanced [DCAUT]█ MACD Enhanced
📊 ORIGINALITY & INNOVATION
The MACD Enhanced represents a significant improvement over traditional MACD implementations. While Gerald Appel's original MACD from the 1970s was limited to exponential moving averages (EMA), this enhanced version expands algorithmic options by supporting 21 different moving average calculations for both the main MACD line and signal line independently.
This improvement addresses an important limitation of traditional MACD: the inability to adapt the indicator's mathematical foundation to different market conditions. By allowing traders to select from algorithms ranging from simple moving averages (SMA) for stability to advanced adaptive filters like Kalman Filter for noise reduction, this implementation changes MACD from a fixed-algorithm tool into a flexible instrument that can be adjusted for specific market environments and trading strategies.
The enhanced histogram visualization system uses a four-color gradient that helps communicate momentum strength and direction more clearly than traditional single-color histograms.
📐 MATHEMATICAL FOUNDATION
The core calculation maintains the proven MACD formula: Fast MA(source, fastLength) - Slow MA(source, slowLength), but extends it with algorithmic flexibility. The signal line applies the selected smoothing algorithm to the MACD line over the specified signal period, while the histogram represents the difference between MACD and signal lines.
Available Algorithms:
The implementation supports a comprehensive spectrum of technical analysis algorithms:
Basic Averages: SMA (arithmetic mean), EMA (exponential weighting), RMA (Wilder's smoothing), WMA (linear weighting)
Advanced Averages: HMA (Hull's low-lag), VWMA (volume-weighted), ALMA (Arnaud Legoux adaptive)
Mathematical Filters: LSMA (least squares regression), DEMA (double exponential), TEMA (triple exponential), ZLEMA (zero-lag exponential)
Adaptive Systems: T3 (Tillson T3), FRAMA (fractal adaptive), KAMA (Kaufman adaptive), MCGINLEY_DYNAMIC (reactive to volatility)
Signal Processing: ULTIMATE_SMOOTHER (low-pass filter), LAGUERRE_FILTER (four-pole IIR), SUPER_SMOOTHER (two-pole Butterworth), KALMAN_FILTER (state-space estimation)
Specialized: TMA (triangular moving average), LAGUERRE_BINOMIAL_FILTER (binomial smoothing)
Each algorithm responds differently to price action, allowing traders to match the indicator's behavior to market characteristics: trending markets benefit from responsive algorithms like EMA or HMA, while ranging markets require stable algorithms like SMA or RMA.
📊 COMPREHENSIVE SIGNAL ANALYSIS
Histogram Interpretation:
Positive Values: Indicate bullish momentum when MACD line exceeds signal line, suggesting upward price pressure and potential buying opportunities
Negative Values: Reflect bearish momentum when MACD line falls below signal line, indicating downward pressure and potential selling opportunities
Zero Line Crosses: MACD crossing above zero suggests transition to bullish bias, while crossing below indicates bearish bias shift
Momentum Changes: Rising histogram (regardless of positive/negative) signals accelerating momentum in the current direction, while declining histogram warns of momentum deceleration
Advanced Signal Recognition:
Divergences: Price making new highs/lows while MACD fails to confirm often precedes trend reversals
Convergence Patterns: MACD line approaching signal line suggests impending crossover and potential trade setup
Histogram Peaks: Extreme histogram values often mark momentum exhaustion points and potential reversal zones
🎯 STRATEGIC APPLICATIONS
Comprehensive Trend Confirmation Strategies:
Primary Trend Validation Protocol:
Identify primary trend direction using higher timeframe (4H or Daily) MACD position relative to zero line
Confirm trend strength by analyzing histogram progression: consistent expansion indicates strong momentum, contraction suggests weakening
Use secondary confirmation from MACD line angle: steep angles (>45°) indicate strong trends, shallow angles suggest consolidation
Validate with price structure: trending markets show consistent higher highs/higher lows (uptrend) or lower highs/lower lows (downtrend)
Entry Timing Techniques:
Pullback Entries in Uptrends: Wait for MACD histogram to decline toward zero line without crossing, then enter on histogram expansion with MACD line still above zero
Breakout Confirmations: Use MACD line crossing above zero as confirmation of upward breakouts from consolidation patterns
Continuation Signals: Look for MACD line re-acceleration (steepening angle) after brief consolidation periods as trend continuation signals
Advanced Divergence Trading Systems:
Regular Divergence Recognition:
Bullish Regular Divergence: Price creates lower lows while MACD line forms higher lows. This pattern is traditionally considered a potential upward reversal signal, but should be combined with other confirmation signals
Bearish Regular Divergence: Price makes higher highs while MACD shows lower highs. This pattern is traditionally considered a potential downward reversal signal, but trading decisions should incorporate proper risk management
Hidden Divergence Strategies:
Bullish Hidden Divergence: Price shows higher lows while MACD displays lower lows, indicating trend continuation potential. Use for adding to existing long positions during pullbacks
Bearish Hidden Divergence: Price creates lower highs while MACD forms higher highs, suggesting downtrend continuation. Optimal for adding to short positions during bear market rallies
Multi-Timeframe Coordination Framework:
Three-Timeframe Analysis Structure:
Primary Timeframe (Daily): Determine overall market bias and major trend direction. Only trade in alignment with daily MACD direction
Secondary Timeframe (4H): Identify intermediate trend changes and major entry opportunities. Use for position sizing decisions
Execution Timeframe (1H): Precise entry and exit timing. Look for MACD line crossovers that align with higher timeframe bias
Timeframe Synchronization Rules:
Daily MACD above zero + 4H MACD rising = Strong uptrend context for long positions
Daily MACD below zero + 4H MACD declining = Strong downtrend context for short positions
Conflicting signals between timeframes = Wait for alignment or use smaller position sizes
1H MACD signals only valid when aligned with both higher timeframes
Algorithm Considerations by Market Type:
Trending Markets: Responsive algorithms like EMA, HMA may be considered, but effectiveness should be tested for specific market conditions
Volatile Markets: Noise-reducing algorithms like KALMAN_FILTER, SUPER_SMOOTHER may help reduce false signals, though results vary by market
Range-Bound Markets: Stability-focused algorithms like SMA, RMA may provide smoother signals, but individual testing is required
Short Timeframes: Low-lag algorithms like ZLEMA, T3 theoretically respond faster but may also increase noise
Important Note: All algorithm choices and parameter settings should be thoroughly backtested and validated based on specific trading strategies, market conditions, and individual risk tolerance. Different market environments and trading styles may require different configuration approaches.
📋 DETAILED PARAMETER CONFIGURATION
Comprehensive Source Selection Strategy:
Price Source Analysis and Optimization:
Close Price (Default): Most commonly used, reflects final market sentiment of each period. Best for end-of-day analysis, swing trading, daily/weekly timeframes. Advantages: widely accepted standard, good for backtesting comparisons. Disadvantages: ignores intraday price action, may miss important highs/lows
HL2 (High+Low)/2: Midpoint of the trading range, reduces impact of opening gaps and closing spikes. Best for volatile markets, gap-prone assets, forex markets. Calculation impact: smoother MACD signals, reduced noise from price spikes. Optimal when asset shows frequent gaps, high volatility during specific sessions
HLC3 (High+Low+Close)/3: Weighted average emphasizing the close while including range information. Best for balanced analysis, most asset classes, medium-term trading. Mathematical effect: 33% weight to high/low, 33% to close, provides compromise between close and HL2. Use when standard close is too noisy but HL2 is too smooth
OHLC4 (Open+High+Low+Close)/4: True average of all price points, most comprehensive view. Best for complete price representation, algorithmic trading, statistical analysis. Considerations: includes opening sentiment, smoothest of all options but potentially less responsive. Optimal for markets with significant opening moves, comprehensive trend analysis
Parameter Configuration Principles:
Important Note: Different moving average algorithms have distinct mathematical characteristics and response patterns. The same parameter settings may produce vastly different results when using different algorithms. When switching algorithms, parameter settings should be re-evaluated and tested for appropriateness.
Length Parameter Considerations:
Fast Length (Default 12): Shorter periods provide faster response but may increase noise and false signals, longer periods offer more stable signals but slower response, different algorithms respond differently to the same parameters and may require adjustment
Slow Length (Default 26): Should maintain a reasonable proportional relationship with fast length, different timeframes may require different parameter configurations, algorithm characteristics influence optimal length settings
Signal Length (Default 9): Shorter lengths produce more frequent crossovers but may increase false signals, longer lengths provide better signal confirmation but slower response, should be adjusted based on trading style and chosen algorithm characteristics
Comprehensive Algorithm Selection Framework:
MACD Line Algorithm Decision Matrix:
EMA (Standard Choice): Mathematical properties: exponential weighting, recent price emphasis. Best for general use, traditional MACD behavior, backtesting compatibility. Performance characteristics: good balance of speed and smoothness, widely understood behavior
SMA (Stability Focus): Equal weighting of all periods, maximum smoothness. Best for ranging markets, noise reduction, conservative trading. Trade-offs: slower signal generation, reduced sensitivity to recent price changes
HMA (Speed Optimized): Hull Moving Average, designed for reduced lag. Best for trending markets, quick reversals, active trading. Technical advantage: square root period weighting, faster trend detection. Caution: can be more sensitive to noise
KAMA (Adaptive): Kaufman Adaptive MA, adjusts smoothing based on market efficiency. Best for varying market conditions, algorithmic trading. Mechanism: fast smoothing in trends, slow smoothing in sideways markets. Complexity: requires understanding of efficiency ratio
Signal Line Algorithm Optimization Strategies:
Matching Strategy: Use same algorithm for both MACD and signal lines. Benefits: consistent mathematical properties, predictable behavior. Best when backtesting historical strategies, maintaining traditional MACD characteristics
Contrast Strategy: Use different algorithms for optimization. Common combinations: MACD=EMA, Signal=SMA for smoother crossovers, MACD=HMA, Signal=RMA for balanced speed/stability, Advanced: MACD=KAMA, Signal=T3 for adaptive behavior with smooth signals
Market Regime Adaptation: Trending markets: both fast algorithms (EMA/HMA), Volatile markets: MACD=KALMAN_FILTER, Signal=SUPER_SMOOTHER, Range-bound: both slow algorithms (SMA/RMA)
Parameter Sensitivity Considerations:
Impact of Parameter Changes:
Length Parameter Sensitivity: Small parameter adjustments can significantly affect signal timing, while larger adjustments may fundamentally change indicator behavior characteristics
Algorithm Sensitivity: Different algorithms produce different signal characteristics. Thoroughly test the impact on your trading strategy before switching algorithms
Combined Effects: Changing multiple parameters simultaneously can create unexpected effects. Recommendation: adjust parameters one at a time and thoroughly test each change
📈 PERFORMANCE ANALYSIS & COMPETITIVE ADVANTAGES
Response Characteristics by Algorithm:
Fastest Response: ZLEMA, HMA, T3 - minimal lag but higher noise
Balanced Performance: EMA, DEMA, TEMA - good trade-off between speed and stability
Highest Stability: SMA, RMA, TMA - reduced noise but increased lag
Adaptive Behavior: KAMA, FRAMA, MCGINLEY_DYNAMIC - automatically adjust to market conditions
Noise Filtering Capabilities:
Advanced algorithms like KALMAN_FILTER and SUPER_SMOOTHER help reduce false signals compared to traditional EMA-based MACD. Noise-reducing algorithms can provide more stable signals in volatile market conditions, though results will vary based on market conditions and parameter settings.
Market Condition Adaptability:
Unlike fixed-algorithm MACD, this enhanced version allows real-time optimization. Trending markets benefit from responsive algorithms (EMA, HMA), while ranging markets perform better with stable algorithms (SMA, RMA). The ability to switch algorithms without changing indicators provides greater flexibility.
Comparative Performance vs Traditional MACD:
Algorithm Flexibility: 21 algorithms vs 1 fixed EMA
Signal Quality: Reduced false signals through noise filtering algorithms
Market Adaptability: Optimizable for any market condition vs fixed behavior
Customization Options: Independent algorithm selection for MACD and signal lines vs forced matching
Professional Features: Advanced color coding, multiple alert conditions, comprehensive parameter control
USAGE NOTES
This indicator is designed for technical analysis and educational purposes. Like all technical indicators, it has limitations and should not be used as the sole basis for trading decisions. Algorithm performance varies with market conditions, and past characteristics do not guarantee future results. Always combine with proper risk management and thorough strategy testing.
MNQ TopStep 50K | Ultra Quality v3.0MNQ TopStep 50K | Ultra Quality v3.0 - Publish Summary📊 OverviewA professional-grade trading indicator designed specifically for MNQ futures traders using TopStep funded accounts. Combines 7 technical confirmations with 5 advanced safety filters to deliver high-quality trade signals while managing drawdown risk.🎯 Key FeaturesCore Signal System
7-Point Confirmation: VWAP, EMA crossovers, 15-min HTF trend, MACD, RSI, ADX, and Volume
Signal Grading: Each signal is rated A+ through D based on 7 quality factors
Quality Threshold: Adjustable minimum grade requirement (A+, A, B, C, D)
Advanced Safety Filters (Customizable)
Mean Reversion Filter - Prevents chasing extended moves beyond VWAP bands
ATR Spike Filter - Avoids trading during extreme volatility events
EMA Spacing Filter - Ensures proper trend separation (optional)
Momentum Filter - Requires consecutive directional bars (optional)
Multi-Timeframe Confirmation - Aligns with 15-min trend (optional)
TopStep Risk Management
Real-time drawdown tracking
Position sizing calculator based on remaining cushion
Daily loss limit monitoring
Consecutive loss protection
Max trades per day limiter
Visual Components
VWAP with 1σ, 2σ, 3σ bands
EMA 9/21 with cloud fill
15-min EMA 50 for HTF trend
Comprehensive metrics dashboard
Risk management panel
Filter status panel
Detailed trade labels with entry, stops, and targets
⚙️ Default Settings (Balanced for Regular Signals)Technical Indicators
Fast EMA: 9 | Slow EMA: 21 | HTF EMA: 50 (15-min)
MACD: 10/22/9
RSI: 14 period | Thresholds: 52 (buy) / 48 (sell)
ADX: 14 period | Minimum: 20
ATR: 14 period | Stop: 2x | TP1: 2x | TP2: 3x
Volume: 1.2x average required
Session Settings
Default: 9:30 AM - 11:30 AM ET (adjustable)
Avoids first 15 minutes after market open
Customizable trading hours
Safety Filters (Default Configuration)
✅ Mean Reversion: Enabled (2.5σ max from VWAP)
✅ ATR Spike: Enabled (2.0x threshold)
❌ EMA Spacing: Disabled (can enable for quality)
❌ Momentum: Disabled (can enable for quality)
❌ MTF Confirmation: Disabled (can enable for quality)
Risk Controls
Minimum Signal Quality: C (adjustable to A+ for fewer/better signals)
Min Bars Between Signals: 10
Max Trades Per Day: 5
Stop After Consecutive Losses: 2
📈 Expected PerformanceWith Default Settings:
Signals per week: 10-15 trades
Estimated win rate: 55-60%
Risk-Reward: 1:2 (TP1) and 1:3 (TP2)
With Aggressive Settings (Min Quality = D, All Filters Off):
Signals per week: 20-25 trades
Estimated win rate: 50-55%
With Conservative Settings (Min Quality = A, All Filters On):
Signals per week: 3-5 trades
Estimated win rate: 65-70%
🚀 How to UseBasic Setup:
Add indicator to MNQ 5-minute chart
Adjust TopStep account settings in inputs
Set your risk per trade percentage (default: 0.5%)
Configure trading session hours
Set minimum signal quality (Start with C for balanced results)
Signal Interpretation:
Green Triangle (BUY): Long signal - all confirmations aligned
Red Triangle (SELL): Short signal - all confirmations aligned
Label Details: Shows entry, stop loss, take profit levels, position size, and signal grade
Signal Grade: A+ = Elite (6-7 points) | A = Strong (5) | B = Good (4) | C = Fair (3)
Dashboard Monitoring:
Top Right: Technical metrics and market conditions
Top Left: Filter status (which filters are passing/blocking)
Bottom Right: TopStep risk metrics and position sizing
⚡ Customization TipsFor More Signals:
Lower "Minimum Signal Quality" to D
Decrease ADX threshold to 18-20
Lower RSI thresholds to 50/50
Reduce Volume multiplier to 1.1x
Disable additional filters
For Higher Quality (Fewer Signals):
Raise "Minimum Signal Quality" to A or A+
Increase ADX threshold to 25-30
Enable all 5 advanced filters
Tighten VWAP distance to 2.0σ
Increase momentum requirement to 3-4 bars
For TopStep Compliance:
Adjust "Max Total Drawdown" and "Daily Loss Limit" to match your account
Update "Already Used Drawdown" daily
Monitor the Risk Panel for cushion remaining
Use recommended contract sizing
🛡️ Risk DisclaimerIMPORTANT: This indicator is for educational and informational purposes only.
Past performance does not guarantee future results
All trading involves substantial risk of loss
Use proper risk management and position sizing
Test thoroughly in paper trading before live use
The indicator does not guarantee profitable trades
Adjust settings based on your risk tolerance and trading style
Always comply with your broker's and TopStep's rules
MACD (Buy & Sell signals)This file uses the original code of the MACD and adds a Buy Sell signal when the MACD cuts the signal
LA - MACD EMA BandsOverview of the "LA - MACD EMA Bands" Indicator
For Better view, use this indicator along with "LA - EMA Bands with MTF Dashboard"
The "LA - MACD EMA Bands" is a custom technical indicator written in Pine Script v6 for TradingView. It builds on the traditional Moving Average Convergence Divergence (MACD) oscillator by incorporating additional smoothing via Exponential Moving Averages (EMAs) and Bollinger Bands (BB) applied directly to the MACD line. This creates a multi-layered momentum and volatility tool displayed in a separate pane below the price chart (not overlaid on the price itself).
The indicator allows for customization, such as selecting a different timeframe (for multi-timeframe analysis) and adjusting period lengths. It fetches data from the specified timeframe using request.security with lookahead enabled to avoid repainting issues. The core idea is to provide insights into momentum trends, crossovers, and volatility expansions/contractions in the MACD's behavior, making it suitable for identifying potential trend reversals, continuations, or ranging markets.
Unlike a standard MACD, which focuses primarily on momentum via a single line, signal line, and histogram, this version emphasizes longer-term smoothing and volatility boundaries. It uses visual fills between lines to highlight bullish/bearish conditions, aiding quick interpretation. Below, I'll break down each component, its calculation, visual representation, and practical uses.
Detailed Breakdown of Each Component and Its Uses
MACD Line (Blue Line, Labeled 'MACD Line')
Calculation: This is the core MACD value, computed as the difference between a fast EMA (default length 12) and a slow EMA (default length 144) of the input source (default: close price). The EMAs are calculated on data from the selected timeframe.
Visuals: Plotted as a solid blue line.
Uses:
Measures momentum: When above zero, it indicates bullish momentum (prices rising faster in the short term); below zero, bearish momentum.
Trend identification: Rising MACD suggests strengthening uptrends; falling suggests downtrends.
Divergence spotting: Compare with price action—e.g., if price makes higher highs but MACD makes lower highs, it signals potential bearish reversal (and vice versa for bullish divergence).
In trading: Often used for entry/exit signals when crossing the zero line or other lines in the indicator.
MACD EMA (Red Line, Labeled 'MACD EMA')
Calculation: A 12-period EMA applied to the MACD Line itself.
Visuals: Plotted as a solid red line.
Uses:
Acts as a signal line for the MACD, smoothing out short-term noise.
Crossover signals: When the MACD Line crosses above the MACD EMA, it can signal a bullish buy opportunity; crossing below suggests a bearish sell.
Trend confirmation: Helps filter false signals in choppy markets by requiring confirmation from this slower-moving average.
In trading: Useful for momentum-based strategies, like entering trades on crossovers in alignment with the overall trend.
Fill Between MACD Line and MACD EMA (Green/Red Shaded Area, Titled 'MACD Fill')
Calculation: The area between the MACD Line and MACD EMA is filled with color based on their relative positions.
Color Logic: Green (with 57% transparency) if MACD Line > MACD EMA (bullish); red if MACD Line < MACD EMA (bearish).
Visuals: Semi-transparent fill for easy visibility without overwhelming the lines.
Uses:
Quick visual cue for momentum shifts: Green areas highlight bullish phases; red for bearish.
Enhances readability: Makes crossovers more apparent at a glance, especially in fast-moving markets.
In trading: Can be used to time entries/exits or as a filter (e.g., only take long trades in green zones).
Bollinger Bands on MACD (BB Upper: Black Dotted, BB Basis: Maroon Dotted, BB Lower: Black Dotted)
Calculation: Bollinger Bands applied to the MACD Line.
BB Basis: 144-period EMA of the MACD Line.
BB Standard Deviation: 144-period stdev of the MACD Line.
BB Upper: BB Basis + (2.0 * BB Stdev)
BB Lower: BB Basis - (2.0 * BB Stdev)
Visuals: Upper and lower bands as black dotted lines; basis as maroon dotted
Uses:
Volatility measurement: Bands expand during high momentum volatility (strong trends) and contract during low volatility (ranging or consolidation).
Mean reversion: When MACD Line touches or exceeds the upper band, it may signal overbought conditions (potential sell); lower band for oversold (potential buy).
Squeeze detection: Narrow bands (squeeze) often precede big moves—watch for breakouts.
In trading: Combines momentum with volatility; e.g., a MACD Line breakout above the upper band could confirm a strong uptrend.
BB Basis EMA (Green Line, Labeled 'BB Basis EMA')
Calculation: A 72-period EMA applied to the BB Basis (which is already a 144-period EMA of the MACD Line).
Visuals: Solid green line.
Uses:
Further smoothing: Provides a longer-term view of the MACD's average behavior, reducing noise from the BB Basis.
Trend direction: Acts as a baseline for the BB system—above it suggests bullish bias in momentum volatility; below, bearish.
Crossover with BB Basis: Can signal shifts in volatility trends (e.g., BB Basis crossing above BB Basis EMA indicates increasing bullish volatility).
In trading: Useful for confirming longer-term trends or as a filter for BB-based signals.
Fill Between BB Basis and BB Basis EMA (Gray Shaded Area, Titled 'BB Basis Fill')
Calculation: The area between BB Basis and BB Basis EMA is filled.
Color Logic: Currently set to a constant semi-transparent gray regardless of position.
Visuals: Semi-transparent gray fill.
Uses:
Highlights divergence: Shows when the shorter-term BB Basis deviates from its longer-term EMA, indicating potential volatility shifts.
Visual aid for crossovers: Makes it easier to spot when BB Basis crosses its EMA.
In trading: Could be used to identify overextensions in volatility (e.g., wide gray areas might signal impending mean reversion).
Zero Line (Black Horizontal Line)
Calculation: A simple horizontal line at y=0.
Visuals: Solid black line.
Uses:
Reference point: Divides bullish (above) from bearish (below) territory for all MACD-related lines.
In trading: Crossovers of the zero line by the MACD Line or BB Basis can signal major trend changes.
How It Differs from a Normal MACD
A standard MACD (e.g., the built-in TradingView MACD with defaults 12/26/9) consists of:
MACD Line: EMA(12) - EMA(26).
Signal Line: EMA(MACD Line, 9).
Histogram: MACD Line - Signal Line (bars showing convergence/divergence).
Key differences in "LA - MACD EMA Bands":
Periods: Uses a much longer slow EMA (144 vs. 26), making it more sensitive to long-term trends but less reactive to short-term price action. The MACD EMA is 12 periods (vs. 9), further emphasizing smoothing.
No Histogram: Replaces the histogram with fills and bands for visual emphasis on crossovers and volatility.
Added Bollinger Bands: Applies BB directly to the MACD Line (with a long 144-period basis), introducing volatility analysis absent in standard MACD. This helps detect "squeezes" or expansions in momentum.
Additional EMA Layer: The BB Basis EMA (72-period) adds a secondary smoothing level to the BB system, providing a hierarchical view of momentum (short-term MACD → mid-term BB → long-term EMA).
Multi-Timeframe Support: Built-in option for higher timeframes, unlike basic MACD.
Focus: Standard MACD is purely momentum-focused; this version integrates volatility (via BB) and multi-layer smoothing, making it better for trend-following in volatile markets but potentially overwhelming for beginners.
Overall, this indicator transforms the MACD from a simple oscillator into a comprehensive momentum-volatility hybrid, reducing false signals in trending markets but introducing lag.
Overall Pros and Cons
Pros:
Enhanced Visualization: Fills and bands make trends, crossovers, and volatility easier to spot without needing multiple indicators.
Reduced Noise: Longer periods (144, 72) smooth out whipsaws, ideal for swing or position trading in trending assets like stocks or forex.
Volatility Integration: BB adds a dimension not in standard MACD, helping identify breakouts or consolidations.
Customizable: Inputs for timeframes and lengths allow adaptation to different assets/timeframes.
Multi-Layered Insights: Combines short-term signals (MACD crossovers) with long-term confirmation (BB EMA), improving signal reliability.
Cons:
Lagging Nature: Long periods (e.g., 144) delay signals, missing early entries in fast markets or leading to late exits.
Complexity: Multiple lines and fills can clutter the pane, requiring experience to interpret; beginners might misread it.
Potential Overfitting: Custom periods (12/144/12/144/72) may work well on historical data but underperform in live trading without backtesting.
No Built-in Alerts/Signals: Relies on visual interpretation; users must manually set alerts for crossovers.
Resource Intensive: On lower timeframes or with lookahead, it might slow chart loading on Trading View.
This indicator shines in strategies combining momentum and volatility, like trend-following with BB squeezes, but test it on your assets (e.g., via backtesting) to ensure it fits your style.
For Better view, use this indicator along with "LA - EMA Bands with MTF Dashboard"
MACD Zones (Background Only)Indicator which shows the convergence and divergence zones directly on the graph by highlighting in red (convergence) and green (divergence).
MACD-V+ (ATR Normalized MACD)MACD-V+ is an ATR-normalized MACD tool that focuses on true turning points inside Overbought/Oversold zones. It marks a signal only when the MACD’s slope changes direction and shows real progress back toward the zero line, with an optional dwell (depth & time) filter so you don’t get faked out by shallow pokes into a zone. Clean visuals, “first-in-zone” gating, and configurable labeling make it practical for discretionary and systematic traders alike.
For best results, adjust Overbought and Oversold levels based on stock volatility. The default settings of 150 and -150 are for highly volatile tickers. Reduce for less volatile tickers.
Please help me improve the code for everyone.
LBR Oscillator with Signals & AlertsLinda Bradford Raschke MacD indicator. Has alerts and can be used in the pine screener on different timeframes.
BUY, SELL, RESUME, & CAUTION signal (EMA 9 & 20 + MACD) ON CHART BUY, SELL, CAUTION signal (with RESUME)
What it does
A clean, on-chart signal set that works on whatever timeframe your chart is on. It prints labeled circles above the bar and draws a thin connector line with a tiny arrow that points to the bar. All shapes are kept above both EMAs and never touch wicks—spacing is ATR-based and fully adjustable.
Signals
• BUY – when EMA(9) crosses above EMA(20).
• SELL – when EMA(9) crosses below EMA(20).
• CAUTION – MACD momentum crosses against the current EMA trend
◦ Bull trend (EMA9 > EMA20) + MACD cross down → CAUTION
◦ Bear trend (EMA9 < EMA20) + MACD cross up → CAUTION
• RESUME – after a CAUTION, MACD crosses back with the EMA trend. The circle is labeled “RESUME” (green for bull, red for bear).
Why traders use it
• Trade with the current: BUY/SELL reflect short-vs-long EMA control on your active timeframe.
• Early risk heads-up: CAUTION flags a momentum flip against trend.
• Re-engage cleanly: RESUME helps rejoin the move after a wobble.
• Uncluttered visuals: Circles/lines/arrows are spaced off price and kept above EMAs for clarity.
Inputs
Core
• EMA Fast / EMA Slow (default 9 / 20)
• MACD Fast / Slow / Signal (default 12 / 26 / 9)
• Show circles with text, Plot EMAs
• Wait for candle close (prevents intrabar flicker; signals/alerts confirm at close)
Spacing (ATR-based)
• Gap above wick
• Base connector length
• Extra circle lift
• Line top gap under circle (so the line doesn’t touch the circle)
• Pad above higher EMA
• Extra arrow clearance above EMAs
Alerts
• BUY Crossover, SELL Crossover, MACD CAUTION, BUY Resume, SELL Resume.
• Respect the Wait for candle close setting. For close-only alerts, also choose “Once per bar close” in the alert dialog.
Suggested use
• Let BUY/SELL define bias on your chart timeframe.
• Treat CAUTION as a brake—tighten risk or wait.
• Use RESUME to re-enter when momentum realigns with trend.
• Combine with higher-TF context and your own entry/exit rules.
Notes
• Works on futures, stocks, FX, and crypto.
• Signals are calculated on the current chart timeframe (no security calls).
• With Wait for candle close ON, signals/alerts confirm at close and do not repaint.
• Educational tool only—this is not financial advice.
• When price action is sideways and choppy, this indicator doesn't function well, when this happens, wait until a trend is established and then try to get in when price touches the 9 EMA line for a higher profitability trade
MACD-V+MACD-V+ Indicator - Advanced Momentum Analysis
The MACD-V+ indicator is an enhanced version of the volatility-normalized MACD methodology developed by Alex Spiroglou. This approach addresses critical limitations of traditional MACD through ATR-based volatility normalization, providing comparable values across time and markets.
What is MACD-V?
MACD-V applies Average True Range (ATR) normalization to traditional MACD, creating a universal momentum indicator that works consistently across all markets and timeframes. The methodology was developed through extensive statistical research analyzing multiple markets and timeframes.
Formula: × 100
This normalization transforms MACD from price-dependent values into standardized momentum readings.
Traditional MACD Limitations
Limitation 1: Non-Comparable Values Across Time
Traditional MACD values cannot be compared across different time periods due to varying price levels. S&P 500 maximum MACD was 1.56 in 1957-1971, but reached 86.31 in 2019-2021 - not indicating 55x stronger momentum, but simply different price scales.
Solution: MACD-V provides comparable historical values where a reading of 100 today has the same mathematical meaning as 100 in any previous period.
Limitation 2: Non-Comparable Across Markets
Traditional MACD cannot compare momentum between different assets. S&P 500 MACD of 65 versus EUR/USD MACD of -0.5 reflects price differences, not relative strength.
Solution: MACD-V creates universal levels that work across all markets. The ±150 extreme levels apply consistently whether analyzing stocks, bonds, commodities, or currencies.
Limitation 3: No Objective Momentum System
Traditional MACD lacks universal overbought or oversold level definitions, making systematic analysis difficult.
Solution: MACD-V provides an objective 7-stage momentum lifecycle system with clearly defined zones and state transitions.
Limitation 4: Signal Line False Signals
In low momentum environments, traditional MACD generates multiple false signals as the line oscillates near zero.
Solution: MACD-V filters signal quality by identifying neutral zones (-50 to +50) where signal reliability is lower.
Limitation 5: Signal Line Timing Lag
During extreme momentum, traditional MACD signal line lags significantly due to large separation from the MACD line.
Solution: MACD-V anticipates timing issues in extreme momentum environments (±150) through zone-based analysis and lifecycle states.
Universal Application
MACD-V+ works across:
Individual Stocks
Forex Pairs
Commodity Futures
Cryptocurrencies
All Timeframes
Key Features
Zone System
Overbought Zone: Above +150 (extreme bullish momentum)
Rally Zone: +50 to +150 (strong bullish momentum)
Ranging Zone: -50 to +50 (neutral/low momentum)
Rebound Zone: -50 to -150 (strong bearish momentum)
Oversold Zone: Below -150 (extreme bearish momentum)
7-Stage Lifecycle States
Ranging: Neutral momentum in -50 to +50 zone
Rallying: Rally zone + MACD above Signal + rising momentum
Overbought: Extreme zone above +150
Retracing: Rally zone + MACD below Signal (pullback from overbought)
Reversing: Rebound zone + MACD below Signal + falling momentum
Oversold: Extreme zone below -150
Rebounding: Rebound zone + MACD above Signal (recovery from oversold)
Visual Status Display
Real-Time State Table: Shows current lifecycle state name
Color-Coded States: Blue (Rallying/Rebounding), Red (Overbought/Oversold), Orange (Retracing/Reversing), Gray (Ranging)
Strength Multiplier: Live histogram strength indicator (e.g., "x 1.45")
Enhanced Features (Plus)
Absolute Histogram MA: ATR-length moving average of absolute histogram values for strength measurement
Direction-Aware Display: MA line follows histogram sign (positive above 0, negative below 0)
Strength Multiplier: Current momentum vs. average strength ratio (always positive value)
Histogram Extreme Levels: Short-term overbought/oversold (±40) for pullback detection
Chart Legend - Visual Signal Guide
Lines and Histogram
🔵 Blue Line: MACD-V value (ATR-normalized momentum)
🟠 Orange Line: Signal line (9-period EMA of MACD-V)
📊 Histogram Bars: MACD-V minus Signal line (momentum differential)
Histogram Colors: Green shades (positive momentum), Red shades (negative momentum)
🟡 Yellow Line: Dynamic MA of absolute histogram values (follows histogram sign)
Background Colors
🟥 Light Red Background: Extreme overbought zone (MACD-V > +150)
🟩 Light Green Background: Extreme oversold zone (MACD-V < -150)
Horizontal Reference Lines
➖ +150 (Gray Dashed): Overbought extreme level
➖ +50 (Gray Dashed): Rally zone entry level
➖ 0 (Gray Solid): Zero line - trend separator
➖ -50 (Gray Dashed): Rebound zone entry level
➖ -150 (Gray Dashed): Oversold extreme level
Optional Histogram Levels
➖ +40 (Yellow Dashed): Histogram short-term overbought
➖ -40 (Yellow Dashed): Histogram short-term oversold
Status Table
📋 Top-Center Table: Current lifecycle state display
State Name: RANGING / RALLYING / OVERBOUGHT / RETRACING / REVERSING / OVERSOLD / REBOUNDING
Histogram Warning: Short-term overbought/oversold alerts (±40 levels)
State Label
📊 Label at MACD/Signal Midpoint: Current lifecycle state with strength analysis
State Name: RANGING / RALLYING / OVERBOUGHT / RETRACING / REVERSING / OVERSOLD / REBOUNDING
Strength Multiplier Interpretation:
- Strong acceleration (>1.75): Powerful momentum, trend continuation likely
- Moderate progression (1.25-1.75): Normal trend strength
- Trend continuation (0.75-1.25): Stable momentum near average
- Watch for reversal (0.25-0.75): Weakening momentum
- Trend exhaustion (<0.25): Very weak momentum, reversal possible
Trading Applications
1. Lifecycle State Trading
Enter Long: When state changes to "RALLYING" (strong bullish momentum established)
Enter Short: When state changes to "REVERSING" (strong bearish momentum established)
Exit/Reduce: When state reaches "OVERBOUGHT" or "OVERSOLD" (extreme levels)
Avoid Trading: When state is "RANGING" (low momentum, unreliable signals)
2. Zone-Based Trading
Rally Zone (+50 to +150): Look for pullback entries (histogram dips)
Rebound Zone (-50 to -150): Look for bounce entries (histogram rises)
Extreme Zones (±150+): Prepare for reversal or take profits
Ranging Zone (-50 to +50): Wait for breakout confirmation
3. Signal Line Crossovers
Bullish Cross: MACD-V crosses above Signal line (momentum shift up)
Bearish Cross: MACD-V crosses below Signal line (momentum shift down)
Quality Filter: Trust crossovers in Rally/Rebound zones, ignore in Ranging zone
4. Zero Line Crosses
Cross Above 0: Transition to bullish regime
Cross Below 0: Transition to bearish regime
Trend Confirmation: Strong trends keep MACD-V on same side of zero
5. Histogram Extreme Strategy
Above +40: Short-term overbought - potential pullback
Below -40: Short-term oversold - potential bounce
Use with Trend: Buy dips to -40 in uptrend, sell rallies to +40 in downtrend
6. Strength Multiplier Analysis
> 1.75: Strong acceleration - powerful momentum, trend continuation highly likely
1.25 to 1.75: Moderate progression - normal healthy trend strength
0.75 to 1.25: Trend continuation - stable momentum near average strength
0.25 to 0.75: Watch for reversal - momentum weakening significantly
< 0.25: Trend exhaustion - very weak momentum, reversal possible
Comprehensive Alert System
Lifecycle State Change Alerts
Range Entered (low momentum warning)
Rally Started (bullish momentum established)
Overbought Reached (extreme bullish level)
Overbought Exit (leaving extreme zone)
Retracing Started (pullback from overbought)
Reversal Started (bearish momentum established)
Oversold Reached (extreme bearish level)
Oversold Exit (leaving extreme zone)
Rebounding Started (recovery from oversold)
Alert Builder Integration
Binary outputs (1/0) for external alert systems:
Individual state flags for each of 7 lifecycle states
Strength multiplier value for programmatic trend assessment
Settings & Parameters
MACD Configuration
MACD Fast: Fast EMA period (default: 12)
MACD Slow: Slow EMA period (default: 26)
Signal Line: Signal smoothing period (default: 9)
Source: Price source (default: Close)
Zone Boundaries
Overbought: Extreme bullish level (default: 150)
Oversold: Extreme bearish level (default: -150)
Rally: Strong bullish zone entry (default: 50)
Rebound: Strong bearish zone entry (default: -50)
Histogram Bounds
Histogram OB: Short-term overbought (default: 40)
Histogram OS: Short-term oversold (default: -40)
Trend Filters
MA Type: Histogram strength MA calculation method (None / SMA / EMA)
Show Elder Impulse Plus: Bar color system based on EMA(13) + histogram direction
200 EMA trend: Trend Filter v1 - Bull/Bear classification (adaptive MACD-V levels)
50/200 EMA 6-stage: Trend Filter v2 - Chuck Dukas Diamond 6-stage market classification
Best Practices
Trending Markets
Focus on "RALLYING" or "REVERSING" states for entries
Use histogram pullbacks (±40) for position additions
Monitor strength multiplier - exit if drops below 0.25
Take profits in extreme zones (±150+)
Yellow MA crossing histogram warns of momentum shift
Ranging Markets
Avoid trading when state is "RANGING"
Wait for clear zone entry (Rally/Rebound zone)
Use shorter timeframes for precision
Reduce position sizes due to lower reliability
Multi-Timeframe Analysis
Higher timeframe: Identify market regime (lifecycle state)
Lower timeframe: Time precise entries (histogram pullbacks)
Alignment: Trade only when both timeframes agree on direction
Risk Management
Reduce position size in extreme zones (±150+)
Use lifecycle state changes for stop-loss placement
Scale out of positions when strength multiplier < 0.25
Avoid counter-trend trades in strong states (RALLYING/REVERSING)
Watch yellow MA - when it crosses below histogram absolute value, momentum weakening
Combining with LBR 3/10-V Indicator
MACD-V+ and LBR 3/10-V create a powerful two-timeframe momentum system for strategic direction and tactical timing.
Strategic Filter: MACD-V+ determines WHETHER to trade (market regime)
Tactical Precision: LBR 3/10-V determines WHEN to enter (timing)
Double Confirmation: Both indicators must agree on direction
Lifecycle Management: Exit when MACD-V+ state changes
Strength Validation: Use MACD-V+ multiplier for position sizing
Extreme Respect: Both hitting extremes = high reversal probability
Methodology
MACD-V methodology is based on volatility normalization using Average True Range (ATR). This approach transforms traditional MACD into a universal momentum indicator with statistically-validated zones and objectively-defined states.
The indicator implements:
ATR-based normalization for cross-market comparability
Statistical analysis for universal zone definitions (±150, ±50)
Lifecycle state system for objective trend identification
Absolute histogram MA with direction-aware visualization (ATR-length period)
Strength multiplier: ratio of current to average absolute momentum (always positive)
Dynamic status table adapting to active trend filters
MACD-V+ transforms momentum analysis from subjective interpretation into objective, quantifiable measurements. Combined with LBR 3/10-V for tactical timing, it provides a complete framework for systematic trading across all financial markets and timeframes.
This indicator is designed for educational and analytical purposes. Past performance does not guarantee future results. Always conduct thorough research and consider consulting with financial professionals before making investment decisions.
MACD Forecast [Titans_Invest]MACD Forecast — The Future of MACD in Trading
The MACD has always been one of the most powerful tools in technical analysis.
But what if you could see where it’s going, instead of just reacting to what has already happened?
Introducing MACD Forecast — the natural evolution of the MACD Full , now taken to the next level. It’s the world’s first MACD designed not only to analyze the present but also to predict the future behavior of momentum.
By combining the classic MACD structure with projections powered by Linear Regression, this indicator gives traders an anticipatory, predictive view, redefining what’s possible in technical analysis.
Forget lagging indicators.
This is the smartest, most advanced, and most accurate MACD ever created.
🍟 WHY MACD FORECAST IS REVOLUTIONARY
Unlike the traditional MACD, which only reflects current and past price dynamics, the MACD Forecast uses regression-based projection models to anticipate where the MACD line, signal line, and histogram are heading.
This means traders can:
• See MACD crossovers before they happen.
• Spot trend reversals earlier than most.
• Gain an unprecedented timing advantage in both discretionary and automated trading.
In other words: this indicator lets you trade ahead of time.
🔮 FORECAST ENGINE — POWERED BY LINEAR REGRESSION
At its core, the MACD Forecast integrates Linear Regression (ta.linreg) to project the MACD’s future behavior with exceptional accuracy.
Projection Modes:
• Flat Projection: Assumes trend continuity at the current level.
• LinReg Projection: Applies linear regression across N periods to mathematically forecast momentum shifts.
This dual system offers both a conservative and adaptive view of market direction.
📐 ACCURACY WITH FULL CUSTOMIZATION
Just like the MACD Full, this new version comes with 20 customizable buy-entry conditions and 20 sell-entry conditions — now enhanced with forecast-based rules that anticipate crossovers and trend reversals.
You’re not just reacting — you’re strategizing ahead of time.
⯁ HOW TO USE MACD FORECAST❓
The MACD Forecast is built on the same foundation as the classic MACD, but with predictive capabilities.
Step 1 — Spot Predicted Crossovers:
Watch for forecasted bullish or bearish crossovers. These signals anticipate when the MACD line will cross the signal line in the future, letting you prepare trades before the move.
Step 2 — Confirm with Histogram Projection:
Use the projected histogram to validate momentum direction. A rising histogram signals strengthening bullish momentum, while a falling projection points to weakening or bearish conditions.
Step 3 — Combine with Multi-Timeframe Analysis:
Use forecasts across multiple timeframes to confirm signal strength (e.g., a 1h forecast aligned with a 4h forecast).
Step 4 — Set Entry Conditions & Automation:
Customize your buy/sell rules with the 20 forecast-based conditions and enable automation for bots or alerts.
Step 5 — Trade Ahead of the Market:
By preparing for future momentum shifts instead of reacting to the past, you’ll always stay one step ahead of lagging traders.
🤖 BUILT FOR AUTOMATION AND BOTS 🤖
Whether for manual trading, quantitative strategies, or advanced algorithms, the MACD Forecast was designed to integrate seamlessly with automated systems.
With predictive logic at its core, your strategies can finally react to what’s coming, not just what already happened.
🥇 WHY THIS INDICATOR IS UNIQUE 🥇
• World’s first MACD with Linear Regression Forecasting
• Predictive Crossovers (before they appear on the chart)
• Maximum flexibility with Long & Short combinations — 20+ fully configurable conditions for tailor-made strategies
• Fully automatable for quantitative systems and advanced bots
This isn’t just an update.
It’s the final evolution of the MACD.
______________________________________________________
🔹 CONDITIONS TO BUY 📈
______________________________________________________
• Signal Validity: The signal will remain valid for X bars .
• Signal Sequence: Configurable as AND or OR .
🔹 MACD > Signal Smoothing
🔹 MACD < Signal Smoothing
🔹 Histogram > 0
🔹 Histogram < 0
🔹 Histogram Positive
🔹 Histogram Negative
🔹 MACD > 0
🔹 MACD < 0
🔹 Signal > 0
🔹 Signal < 0
🔹 MACD > Histogram
🔹 MACD < Histogram
🔹 Signal > Histogram
🔹 Signal < Histogram
🔹 MACD (Crossover) Signal
🔹 MACD (Crossunder) Signal
🔹 MACD (Crossover) 0
🔹 MACD (Crossunder) 0
🔹 Signal (Crossover) 0
🔹 Signal (Crossunder) 0
🔮 MACD (Crossover) Signal Forecast
🔮 MACD (Crossunder) Signal Forecast
______________________________________________________
______________________________________________________
🔸 CONDITIONS TO SELL 📉
______________________________________________________
• Signal Validity: The signal will remain valid for X bars .
• Signal Sequence: Configurable as AND or OR .
🔸 MACD > Signal Smoothing
🔸 MACD < Signal Smoothing
🔸 Histogram > 0
🔸 Histogram < 0
🔸 Histogram Positive
🔸 Histogram Negative
🔸 MACD > 0
🔸 MACD < 0
🔸 Signal > 0
🔸 Signal < 0
🔸 MACD > Histogram
🔸 MACD < Histogram
🔸 Signal > Histogram
🔸 Signal < Histogram
🔸 MACD (Crossover) Signal
🔸 MACD (Crossunder) Signal
🔸 MACD (Crossover) 0
🔸 MACD (Crossunder) 0
🔸 Signal (Crossover) 0
🔸 Signal (Crossunder) 0
🔮 MACD (Crossover) Signal Forecast
🔮 MACD (Crossunder) Signal Forecast
______________________________________________________
______________________________________________________
🔮 Linear Regression Function 🔮
______________________________________________________
• Our indicator includes MACD forecasts powered by linear regression.
Forecast Types:
• Flat: Assumes prices will stay the same.
• Linreg: Makes a 'Linear Regression' forecast for n periods.
Technical Information:
• Function: ta.linreg()
Parameters:
• source: Source price series.
• length: Number of bars (period).
• offset : Offset.
• return: Linear regression curve.
______________________________________________________
______________________________________________________
⯁ UNIQUE FEATURES
______________________________________________________
Linear Regression: (Forecast)
Signal Validity: The signal will remain valid for X bars
Signal Sequence: Configurable as AND/OR
Table of Conditions: BUY/SELL
Conditions Label: BUY/SELL
Plot Labels in the graph above: BUY/SELL
Automate & Monitor Signals/Alerts: BUY/SELL
Linear Regression (Forecast)
Signal Validity: The signal will remain valid for X bars
Signal Sequence: Configurable as AND/OR
Table of Conditions: BUY/SELL
Conditions Label: BUY/SELL
Plot Labels in the graph above: BUY/SELL
Automate & Monitor Signals/Alerts: BUY/SELL
______________________________________________________
📜 SCRIPT : MACD Forecast
🎴 Art by : @Titans_Invest & @DiFlip
👨💻 Dev by : @Titans_Invest & @DiFlip
🎑 Titans Invest — The Wizards Without Gloves 🧤
✨ Enjoy!
______________________________________________________
o Mission 🗺
• Inspire Traders to manifest Magic in the Market.
o Vision 𐓏
• To elevate collective Energy 𐓷𐓏
🎗️ In memory of João Guilherme — your light will live on forever.