🔥Black Friday Sale: Get 25% OFF Premium with code BLACKFRIDAY — Sale ends December 1st!🎉
Swing Trading Mean Reversion — High-Probability Setups Across Stocks, Forex, and Crypto

Swing Trading Mean Reversion — High-Probability Setups Across Stocks, Forex, and Crypto

By HorizonAI Team

Day traders think in minutes—but some of the cleanest mean reversion trades unfold over days to weeks.
Swing trading mean reversion lets you capture larger moves back to fair value with fewer, higher-quality decisions.

In this guide you’ll learn:

  • How mean reversion looks on 4H and Daily charts
  • How to define “fair value” for swings using moving averages, Bollinger Bands, and premium/discount
  • Swing setups you can apply to stocks, forex, and crypto
  • How to start automating these ideas in Pine Script v6
  • How HorizonAI can generate swing-trading systems and test them for you

What Swing Mean Reversion Looks Like

On swing timeframes (4H, D1, sometimes W1), mean reversion shows up as:

  • Sharp extensions away from a trend or average
  • Exhaustion and reversal back toward:
    • A major moving average (e.g., 50/100/200 SMA)
    • A range midline
    • A premium/discount equilibrium

You’re not trying to catch every tick. You’re looking for moves like:

  • Overextended selloffs snapping back to a 50 or 200 SMA
  • Parabolic rallies reverting back to a D1 Bollinger middle
  • Deviations from a trading range returning to its center

Defining the Swing “Mean”

You can define mean for swing trading in several ways:

  • Moving averages:
    • 50 SMA/EMA (shorter-term trend)
    • 100 or 200 SMA (longer-term anchor)
  • Bollinger Bands (Daily):
    • Middle band (20 SMA)
    • Extremes at ±2 standard deviations
  • Premium/discount zones:
    • 0–100% range of a major swing
    • 50% equilibrium as “fair value”

You don’t need them all at once.
Pick one or two as your main reference and test them.

Setup #1: D1 Bollinger Snapback

Markets: large cap stocks, major indices, BTC/ETH, liquid FX pairs
Timeframe: Daily

Concept

  • Price stretches outside the upper/lower Bollinger Band
  • Momentum stalls (smaller candles, wicks), then reverses
  • You target a move back to the middle band or beyond

Rules (Bearish Example)

  • Price closes above the upper Bollinger Band
  • Next few candles:
    • Show wicks/rejection
    • A close back inside the bands
  • Entry:
    • Short on confirmation candle close (back inside bands)
  • Stop:
    • Above recent swing high
  • Target:
    • Middle band (conservative)
    • Or opposite band / fixed RR (aggressive)

You can mirror this logic for bullish snaps from the lower band.

Setup #2: 4H Pullback to 50/200 SMA

Markets: forex majors, indices, crypto
Timeframe: 4H

Concept

In a strong trend, price often:

  • Pushes away from the 50/200 SMA combo
  • Pulls back to the 50/200 zone
  • Bounces and continues in trend direction

You can treat that pullback as a swing mean reversion entry point.

Rules (Bullish Example)

  • D1 trend is bullish (price above 200 SMA)
  • On 4H:
    • 50 SMA > 200 SMA
    • Price pulls back to or slightly below 50 SMA
    • RSI on 4H dips below 40 then turns up
  • Entry:
    • Long when price closes back above 50 SMA
  • Stop:
    • Below recent swing low / below 200 SMA
  • Target:
    • Prior swing high
    • Or 2–3R

This blends:

  • Trend following (with D1/4H)
  • Mean reversion (into the moving-average “mean”)

Setup #3: Range Mean Reversion with Premium/Discount

Markets: range-bound stocks, FX pairs, or crypto
Timeframe: 4H or D1

Concept

When a market sets a clear range:

  • You can treat:
    • Range highs as premium
    • Range lows as discount
    • Range midline (50%) as mean

You then:

  • Buy in discount and target mean/premium
  • Sell in premium and target mean/discount

Rules (Generic)

  • Identify a multi‑week range high and low
  • Mean = (high + low) ÷ 2
  • Long idea:
    • Price tags or pierces range low
    • RSI < 35 on 4H
    • Entry long on bullish confirmation
    • Target = midline or range high
  • Short idea:
    • Price tags or pierces range high
    • RSI > 65
    • Entry short on bearish confirmation
    • Target = midline or range low

You can automate the range detection or draw it manually and have Pine reference those levels.

Simple Swing Mean-Reversion Shell in Pine

Here’s a D1 Bollinger snapback skeleton you can run on any symbol.

//@version=5
strategy("D1 Bollinger Snapback (Swing)", overlay = true,
     initial_capital = 10000, commission_type = strategy.commission.percent, commission_value = 0.01)

length = input.int(20, "BB Length")
mult   = input.float(2.0, "Std Dev")

basis = ta.sma(close, length)
dev   = mult * ta.stdev(close, length)
upper = basis + dev
lower = basis - dev

plot(basis, "Middle", color = color.blue)
plot(upper, "Upper", color = color.red)
plot(lower, "Lower", color = color.green)

// Bearish snapback: close above upper band, then close back inside
aboveUpper = close[1] > upper[1]
backInside = close < upper and close < close[1]

shortCondition = aboveUpper and backInside

// Risk management
riskPercent    = input.float(1.0, "Risk per Trade (%)", minval = 0.1, maxval = 3.0)
rewardMultiple = input.float(2.0, "Target RR", minval = 1.0, maxval = 5.0)

if shortCondition and barstate.isconfirmed
    entryPrice  = close
    stopPrice   = ta.highest(high, 3)  // swing high area
    risk        = math.abs(stopPrice - entryPrice)
    riskAmount  = strategy.equity * riskPercent / 100.0
    qty         = risk > 0 ? riskAmount / risk : 0.0
    targetPrice = entryPrice - risk * rewardMultiple

    if qty > 0
        strategy.entry("Short", strategy.short, qty = qty)
        strategy.exit("TP/SL", "Short", stop = stopPrice, limit = targetPrice)

From here you can:

  • Restrict trades to certain symbols (e.g., large caps only)
  • Add filters (e.g., D1 trend, earnings filters, volatility regimes)
  • Compare performance across stocks, FX, and crypto

HorizonAI can handle these enhancements for you.

Risk Management for Swing Mean Reversion

Because swing trades last days to weeks:

  • Gaps and overnight moves matter
  • News and macro events can blow through stops

Guidelines:

  • Risk 0.5–2% per trade, depending on account size and diversification
  • Use ATR‑based stops to account for volatility
  • Avoid over‑concentration:
    • Don’t load 80% of capital into one correlated idea
  • Consider time‑based exits:
    • If a swing hasn’t mean‑reverted in X days, reevaluate

These rules can be built into Pine Script and generated automatically by HorizonAI.

Use HorizonAI to Build and Test Swing Mean-Reversion Systems

Instead of:

  • Manually testing each symbol and timeframe
  • Hand‑coding every parameter variation

You can:

  • Describe your swing mean‑reversion idea in plain English
  • Let HorizonAI generate Pine Script v6 strategies that:
    • Use Bollinger, SMA/EMA, or premium/discount means
    • Apply volatility, trend, and volume filters
    • Include risk management and portfolio‑style constraints
  • Run backtests across multiple symbols and see where the edge is strongest

Example prompts:

"Create a Pine Script v6 strategy for D1 charts that shorts stocks when they close above the upper Bollinger Band and then close back inside, with 1% risk per trade and 2:1 RR, skipping trades during earnings weeks."

"Build a 4H swing mean-reversion strategy for EURUSD and GBPUSD that buys pullbacks to the 50 SMA in a D1 uptrend, using ATR-based stops and daily loss limits."

"Generate a script that scans a watchlist of crypto pairs for range-bound behavior and signals mean reversion trades from range highs/lows back to the midline."

Design and test swing mean-reversion systems with HorizonAI →

Final Thoughts

Swing trading mean reversion is about:

  1. Defining your “mean” clearly (Bollinger, SMA/EMA, range midline, or equilibrium)
  2. Operating on higher timeframes where noise is lower and moves are larger
  3. Using structure and volatility to filter when mean reversion makes sense
  4. Managing risk around gaps, news, and multi‑day exposure
  5. Turning ideas into systematic rules and backtests

Once you’ve sketched your preferred swing mean‑reversion playbook, HorizonAI can help you translate it to Pine Script, run robust tests on stocks, forex, and crypto, and keep iterating until you find the combinations that fit your risk profile and style.

Have a swing idea you want to stress‑test? Join our Discord community and compare notes with other swing traders.