MACD 4C Line — 4-Color MACD


Hidden Redirect Link
Loading...

MACD 4C Line — 4-Color MACD Line with Momentum Phase Visualization MACD 4C Line is a clean, 4-color

 MACD implementation for Indie that applies momentum phase logic to a classic line-based MACD display.

This version is designed for traders who prefer traditional MACD line visualization but want deeper insight into momentum strength, acceleration, and phase transitions without relying solely on crossovers.

Instead of using a single static color, the MACD line dynamically changes color based on both direction and slope.

Why This Version Exists

Many MACD users prefer a line over histogram bars for readability and structural clarity.

However, standard MACD lines:

  • Do not show whether momentum is strengthening or weakening
  • Do not visually differentiate slope changes
  • Rely heavily on signal crossovers

MACD 4C Line solves this by embedding a 4-state momentum model directly into the MACD line itself.

4-State Momentum Model

The line color reflects both polarity (above/below zero) and acceleration (rising/falling):

  • Lime → Positive and rising (bullish momentum strengthening)
  • Green → Positive but falling (bullish momentum weakening)
  • Maroon → Negative and falling (bearish momentum strengthening)
  • Red → Negative but rising (bearish momentum weakening)

This transforms MACD into a clear momentum phase analyzer, not just a crossover oscillator.

Key Features

  • 4-color dynamic MACD line
  • Zero line reference
  • Optional Signal Line
  • Optional Zero-Cross markers (U/D labels)
  • Symmetric Noise Filter (abs MACD threshold)
  • Deterministic slope comparison (filtered vs filtered)
  • NaN-safe first-bar handling
  • Native Indie implementation (Macd.new)

Noise Filter (Important)

A symmetric absolute threshold allows you to suppress small fluctuations around zero.

This reduces:

  • Micro color flipping in ranging markets
  • False phase transitions
  • Visual noise on lower timeframes

Zero-cross detection remains based on the unfiltered MACD for structural integrity.

Parameters

  • Fast EMA (default 12)
  • Slow EMA (default 26)
  • Signal Length (default 9)
  • Noise Filter (abs MACD)
  • Toggle: Show Signal Line
  • Toggle: Show Zero Cross Markers

Best Use Cases

  • Traders who prefer line-style MACD
  • Swing traders analyzing momentum transitions
  • Trend-following systems
  • Momentum continuation setups
  • Clean higher-timeframe bias analysis

Works on all timeframes.
Lower timeframes may benefit from applying a small threshold.

Who This Is For

  • Traders who find histogram bars visually cluttered
  • Classic MACD users seeking deeper state clarity
  • System builders requiring a consistent momentum state signal
  • Price action traders confirming directional bias

This is not a zero-lag or predictive MACD.
It is a structurally clean, phase-aware MACD line implementation.

Alternative Version Available

If you prefer a histogram-based momentum display instead of a line, see:

MACD 4C Pro (Histogram) — identical 4-color logic rendered as columns for a more impulse-focused visualization.

Both versions use the same core momentum model. The difference is purely visual preference and workflow style.

© Licensed under MIT

Comments

loading