Skip to content
The Casebook · A classic strategy

Doji after three down days, sell after 3 days

Buy a doji after three down days and sell after 3 days.
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.046R a trade before costs, −0.043R after the spread and the selection haircut.
Trades on the laggards
903

42 large US stocks, 15 years

Per trade, after costs
−0.043R

Before costs +0.046R

Bar to clear
t > 2.01

By trade and by day, sized to a first try

What the numbers say

On 903 laggard trades the idea made 0.046R before costs but −0.043R after the spread and selection haircut. In bull markets it came to −0.056R (t −2.01 by day) and in bear markets −0.083R; flat markets showed 0.030R, with t 0.83. Costs erase the small edge, so the verdict is killed by costs.

How it was tested

Buy at the close of a doji day that follows three consecutive down closes, and exit after 3 trading days.

Side
Long
Time limit
Exit at the close after 3 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
  • Doji defined as a candle body no larger than 10% of the day's high-low range
  • Three down days means three consecutive closes each below the previous close, ending the day before the doji
  • The doji day itself may close up or down; only its small body matters
  • Entry at the close of the doji day
  • Sell after 3 days means exit at the close 3 trading days after entry
  • No stop or target was given, so chose a 2 x ATR(14) stop and a target at twice the risk

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
Bull615−0.056R−2.21−2.01 · 511d−0.088R · beats 85%−0.022R
Flat168+0.030R0.580.83 · 128d−0.055R · beats 100%+0.016R
Bear120−0.083R−1.58−0.95 · 71d−0.055R · beats 35%+0.093R
All903−0.043R−0.077R0.000R

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.6 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 DojiAfterThreeDownDaysLong:
    name = "doji_after_three_down_days_long_3d_hold"
    description = "Long at the close of a doji day following three consecutive down closes; 3-day hold."

    def __init__(self, doji_body_frac: float = 0.10, atr_period: int = 14, stop_mult: float = 2.0, target_mult: float = 4.0, hold_days: int = 3) -> None:
        self._doji_body_frac = doji_body_frac
        self._atr_period = atr_period
        self._stop_mult = stop_mult
        self._target_mult = target_mult
        self._hold_days = hold_days

    def scan(self, ticker: str, bars: list[Bar]) -> Candidate | None:
        if len(bars) < max(self._atr_period + 2, 6):
            return None
        cur = bars[-1]
        rng = cur.high - cur.low
        if rng <= 0:
            return None
        body = abs(cur.close - cur.open)
        if body > Decimal(str(self._doji_body_frac)) * rng:
            return None
        # three consecutive down closes ending at day t-1
        for i in (-4, -3, -2):
            if not (bars[i].close < bars[i - 1].close):
                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))
        entry = cur.close
        stop = entry - Decimal(str(self._stop_mult)) * atr_dec
        target = entry + Decimal(str(self._target_mult)) * atr_dec
        risk = entry - stop
        if risk <= 0 or stop <= 0:
            return None
        rr = (target - entry) / risk
        return Candidate(
            ticker=ticker,
            side="buy",
            entry=entry,
            stop=stop,
            target=target,
            risk_reward_ratio=rr.quantize(Decimal("0.01")),
            signal_strength=50,
            thesis="Doji day after three consecutive down closes; long with 2xATR stop, 4xATR target, 3-day hold.",
        )

    def exit_now(self, ticker: str, bars: list[Bar], entry: Decimal, side: str, bars_held: int) -> bool:
        return bars_held >= self._hold_days

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
Doji after three down days, sell after 3 days: Killed by costs · EdgeProven