Skip to content

Indicator Formula

Technical Details — Moving Average Crossovers (MACross)

Section titled “Technical Details — Moving Average Crossovers (MACross)”

All crossovers calculate: Difference = FastMA(price, fastPeriod) - SlowMA(price, slowPeriod).

Key Concepts:

  • Fast Period: Shorter lookback — more responsive to recent price
  • Slow Period: Longer lookback — captures broader trend
  • Crossover: When fast crosses above slow, momentum shifts bullish

Mathematical Derivation

Purpose: Measure the gap between fast and slow MAs.

$$Diff = MA_{fast}(Close, n_1) - MA_{slow}(Close, n_2)$$

Where:

  • $$n_1$$ = Fast period
  • $$n_2$$ = Slow period
  • $$MA$$ = The specific MA type (SMA, EMA, HMA, etc.)

What This Measures: The convergence/divergence of two moving averages



Compact Formula Summary

$$Diff = MA(Close, fastPeriod) - MA(Close, slowPeriod)$$ $$bullish_cross: Diff > 0$$ $$bearish_cross: Diff < 0$$

Defaults: Fast = 10, Slow = 20


Complete Calculation Example

EMACross with Fast=10, Slow=20: If EMA(10) = 45.80 and EMA(20) = 45.50: Diff = 45.80 - 45.50 = +0.30 → bullish_cross is active

When EMA(10) drops below EMA(20), Diff becomes negative → bearish_cross fires.


Key Takeaways from the Example
  1. Same signals, different behavior: EMACross is more responsive than SMACross for the same periods
  2. Period separation matters: Fast and slow periods need enough gap to produce meaningful signals
  3. HMACross: Fastest to detect crossovers but more false signals
  4. VW variants: Add volume weighting for confirmation