Skip to content
The Casebook · A classic strategy

MACD bullish cross while both lines are below zero

Buy when the MACD line crosses above its signal line while both are below zero.
VerdictTested Nov 22, 2026

Killed by costs

There is something there before trading costs; after them, too little is left to count (under 0.04R a trade).

  • +0.125R a trade before costs, +0.038R after the spread and the selection haircut.
Trades on the laggards
1,799

42 large US stocks, 15 years

Per trade, after costs
+0.038R

Before costs +0.125R

Bar to clear
t > 2.01

By trade and by day, sized to a first try

What the numbers say

On 1799 laggard trades the idea made +0.125R a trade before costs but 0.038R after them. In bull markets it was −0.013R (t −0.35); in bear markets 0.290R (t 3.58, 100% of random draws beaten). The bull and flat results are not clearly different from zero, so costs leave only a thin edge and the verdict is killed by costs.

How it was tested

Go long at the close when the MACD line crosses above its signal line while both are below zero, using a 2 x ATR stop, a 2R target and a 20-day time limit.

Side
Long
Time limit
Exit at the close after 20 trading days, unless the stop, the target or its own exit comes first
Bar to clear
t > 2.01, by trade and by day, sized to a first try (one idea, tested once)
Prices
15 years of daily bars through 2026-11-20; judged 2026-11-22
Choices made where the idea was open
  • MACD uses the standard parameters: EMA(12) minus EMA(26) of the close, signal line = EMA(9) of the MACD line
  • Cross means MACD is above signal today and was at or below it on the prior day
  • Both below zero is checked on the cross day (day t) for the MACD line and the signal line
  • No stop or target was given, so stop = 2 x ATR(14) below entry and target = 2R (4 x ATR(14)) above entry
  • No holding period was given, so the time limit is 20 trading days
  • Entry is at the signal day's close

The evidence

The laggards decide: 22 large stocks that lagged or fell, where hindsight can't flatter a rule. Today's winners sit beside them to show what survivorship would add.

MarketTradesPer tradet, by tradet, by dayRandom datesWinners, per trade
Bull1,248−0.013R−0.350.00 · 852d−0.044R · beats 85%+0.160R
Flat331+0.059R0.850.87 · 201d−0.060R · beats 90%+0.058R
Bear220+0.290R3.582.39 · 114d+0.097R · beats 100%+0.190R
All1,799+0.038R−0.030R+0.143R

R is the result per trade in units of the risk taken (entry to stop). Costs are each stock's own trading spread (median 13.0 bps) plus 0.045R for the fills a real order wouldn't get. “By day” groups trades opened the same day, so a rule that fires on the same dates for every stock counts as a few events. “Random dates” places the same plan on random days of the same stocks in the same kind of market, 20 times; the idea must beat 95% of those draws.

The scanner we wroteShow the code
from decimal import Decimal

from core.domain import Bar
from strategies.indicators import atr
from scanners.base import Candidate


class MacdBullishCrossBelowZero:
    name = "macd_bullish_cross_below_zero"
    description = "MACD(12,26,9) bullish cross with both lines below zero; 2 ATR stop, 2R target"

    def __init__(self, fast: int = 12, slow: int = 26, signal: int = 9,
                 atr_period: int = 14, stop_atr: float = 2.0,
                 target_atr: float = 4.0, min_bars: int = 60) -> None:
        self._fast = fast
        self._slow = slow
        self._signal = signal
        self._atr_period = atr_period
        self._stop_atr = stop_atr
        self._target_atr = target_atr
        self._min_bars = min_bars

    @staticmethod
    def _ema_series(values, period):
        if len(values) < period:
            return []
        k = 2.0 / (period + 1)
        out = [sum(values[:period]) / period]
        for v in values[period:]:
            out.append(v * k + out[-1] * (1.0 - k))
        return out

    def scan(self, ticker: str, bars: list[Bar]) -> Candidate | None:
        if len(bars) < self._min_bars:
            return None
        closes = [float(b.close) for b in bars]
        fast_s = self._ema_series(closes, self._fast)
        slow_s = self._ema_series(closes, self._slow)
        if not fast_s or not slow_s:
            return None
        offset = self._slow - self._fast
        macd_line = [fast_s[i + offset] - slow_s[i] for i in range(len(slow_s))]
        sig_line = self._ema_series(macd_line, self._signal)
        if len(sig_line) < 2:
            return None

        m_t = macd_line[-1]
        m_p = macd_line[-2]
        s_t = sig_line[-1]
        s_p = sig_line[-2]

        if not (m_t > s_t and m_p <= s_p):
            return None
        if not (m_t < 0 and s_t < 0):
            return None

        atr_val = atr(bars, self._atr_period)
        if atr_val is None or atr_val <= 0:
            return None
        atr_dec = Decimal(str(atr_val))
        current = bars[-1]
        entry = current.close
        stop = entry - Decimal(str(self._stop_atr)) * atr_dec
        target = entry + Decimal(str(self._target_atr)) * atr_dec
        if stop <= 0:
            return None
        risk = entry - stop
        if risk <= 0:
            return None
        rr = (target - entry) / risk
        if rr < Decimal("1.5"):
            return None

        atr_f = float(atr_val)
        # Components: cross thrust, depth below zero, volume, close strength
        thrust = (m_t - s_t) - (m_p - s_p)
        thrust_score = min(30, max(0, int(thrust / atr_f * 600)))
        depth_score = min(25, max(0, int(abs(m_t) / atr_f * 25)))
        prior = bars[-21:-1]
        avg_vol = sum(float(b.volume) for b in prior) / max(len(prior), 1)
        vol_ratio = float(current.volume) / max(avg_vol, 1.0)
        vol_score = min(25, max(0, int((vol_ratio - 0.5) * 17)))
        rng = max(float(current.high - current.low), 0.01)
        close_pos = float(current.close - current.low) / rng
        close_score = min(20, max(0, int(close_pos * 20)))
        strength = int(max(0, min(100, thrust_score + depth_score + vol_score + close_score)))

        return Candidate(
            ticker=ticker,
            side="buy",
            entry=entry,
            stop=stop,
            target=target,
            risk_reward_ratio=rr.quantize(Decimal("0.01")),
            signal_strength=strength,
            thesis="MACD crossed above its signal line with both below zero, suggesting downside momentum is fading and a bounce may follow; 2 ATR stop, 2R target, 20-day time limit.",
        )

Hypothetical results from our own backtest of the rule as restated, on 42 large US stocks over 15 years. Past performance, real or simulated, does not predict future results. Research and education only; not investment advice.

Have an idea of your own?

Describe it in plain words and get the same honest test in about a minute.

Run the Gauntlet
MACD bullish cross while both lines are below zero: Killed by costs · EdgeProven