TL;DR:
- A gap fade involves trading against an opening price gap, expecting partial or full retracement. A systematic, automatable approach with specific setups, risk controls, and live deployment tools like Tickerly enhances trading discipline. Proper backtesting, execution precision, and rules enforcement are essential for consistent success.
A gap fade is a trade taken against the direction of an opening price gap, with the expectation that price will retrace to partially or fully close that gap. This article delivers exactly what algorithmic traders need to act: five automatable gap-fade setups with entry, stop, and target rules; a Pine Script skeleton with adjustable parameters; a backtesting checklist covering walk-forward and slippage-adjusted validation; and a deployment workflow connecting TradingView alerts to live execution via Tickerly.
You’ll get:
-
Five concrete gap-fade setups with per-example rules
-
A Pine Script template ready for TradingView
-
A backtesting checklist (sample size, out-of-sample, slippage)
-
Execution and automation steps for live deployment
-
Risk controls and position-sizing formulas
Table of Contents
-
How to deploy a gap-fade strategy from TradingView to live execution
-
Tickerly turns your TradingView gap-fade alerts into live bots
Five automatable gap-fade setups with entry and exit rules
SmartAsset defines fading as taking a contrarian position against the gap direction when the move lacks supporting fundamentals. The five setups below apply that logic with specific, automatable rules.
1. Low-liquidity common gap fade
When it applies: Small gap from prior close, no news, ranging market, pre-market volume below average. Entry: Short (gap up) or long (gap down) at the open, or after a 2-minute candle confirms reversal. Stop: 0.5 ATR above the gap high (for shorts) or below the gap low (for longs). Target: Prior session close (full fill). Partial exit at 50% fill. Timeframe: 1-minute to 5-minute chart; exit by 11:00 AM ET.
2. Pre-market momentum fade
When it applies: Gap in the lower single-digit percent range, pre-market volume elevated but no major catalyst, price extended beyond Bollinger Band on the 15-minute pre-market chart. Entry: Wait for the first 5-minute candle to close back inside the prior day’s range. Stop: Above the pre-market high (shorts) or below the pre-market low (longs). Target: VWAP or prior close, whichever comes first. Timeframe: 5-minute chart; position closed by noon ET.
3. Earnings morning common-gap fade
When it applies: Post-earnings gap that is relatively small, stock already in a defined range, no analyst upgrade/downgrade accompanying the print. Entry: After the first 15-minute candle closes in the gap direction’s opposite, confirming rejection. Stop: 1 ATR beyond the opening candle’s extreme. Target: 50% gap fill minimum; full fill as secondary target. Timeframe: 15-minute chart; hold up to 2 hours.
4. Gap-to-key-level fade
When it applies: Gap opens directly into a major support/resistance zone, prior swing high/low, or round number. Entry: Limit order placed at the key level itself, anticipating rejection. Stop: 0.25 ATR beyond the key level. Target: 75% gap fill. Timeframe: 5-minute or 15-minute chart.
5. Overnight-news fade (crypto/forex)
When it applies: Weekend or overnight gap on a low-liquidity pair (crypto) or forex cross, gap under 2%, no sustained follow-through in the first 30 minutes. Entry: Market or limit order after the first 30-minute candle shows a reversal wick. Stop: Beyond the gap extreme. Target: Prior session close. Timeframe: 30-minute chart; hold up to 4 hours.
| Parameter | Entry trigger | Stop rule | Target | Timeframe | Slippage allowance |
|---|---|---|---|---|---|
| Common gap fade | Open or 2-min reversal candle | 0.5 ATR beyond gap extreme | Prior close | 1–5 min | 0.1–0.2% |
| Pre-market momentum | 5-min candle back inside range | Pre-market high/low | VWAP or prior close | 5 min | 0.3% |
| Earnings gap fade | 15-min rejection candle | 1 ATR beyond open candle | 50–100% fill | 15 min | 0.2% |
| Key-level fade | Limit at key level | 0.25 ATR beyond level | 75% fill | 5–15 min | 0.1–0.2% |
| Overnight news fade | 30-min reversal wick | Gap extreme | Prior close | 30 min | 0.2–0.5% |

Pro Tip: For early-session entries, widen your stop by 1.5x the normal ATR multiplier during the first 10 minutes. Slippage on market orders at open can be 2–3x the mid-session average, and a stop that’s too tight gets hunted before the fade even develops.
How to build a Pine Script gap-fade template
The skeleton below assumes daily open, prior close, volume, and a configurable gap threshold. It is written for TradingView’s Pine Script v5. Pair it with advanced alert message formatting to push signals to an automation layer.
//@version=5
strategy("Gap Fade Strategy", overlay=true, default_qty_type=strategy.percent_of_equity, default_qty_value=2)
// --- Parameters ---
gapThresholdPct = input.float(0.5, "Min Gap % (0.3–2.0)", minval=0.1, maxval=5.0)
maxGapPct = input.float(1.5, "Max Gap % (fade only)", minval=0.1, maxval=5.0)
volMultiplier = input.float(0.8, "Max Vol Multiplier vs 20-day avg", minval=0.1, maxval=3.0)
stopAtrMult = input.float(0.5, "Stop ATR Multiplier", minval=0.1, maxval=3.0)
slippageTicks = input.int(2, "Max Slippage Ticks", minval=0, maxval=20)
sessionEnd = input.int(1100, "Exit by (HHMM ET)", minval=900, maxval=1600)
// --- Gap detection ---
prevClose = request.security(syminfo.tickerid, "D", close[1])
gapPct = (open - prevClose) / prevClose * 100
isGapUp = gapPct >= gapThresholdPct and gapPct <= maxGapPct
isGapDown = gapPct <= -gapThresholdPct and gapPct >= -maxGapPct
// --- Volume filter ---
avgVol = ta.sma(volume, 20)
lowVolume = volume < avgVol * volMultiplier
// --- ATR stop ---
atrVal = ta.atr(14)
stopDist = atrVal * stopAtrMult
// --- Entry conditions (fade direction) ---
fadeShort = isGapUp and lowVolume and barstate.isconfirmed
fadeLong = isGapDown and lowVolume and barstate.isconfirmed
if fadeShort
strategy.entry("FadeShort", strategy.short)
strategy.exit("ExitShort", "FadeShort", stop=close + stopDist, limit=prevClose)
if fadeLong
strategy.entry("FadeLong", strategy.long)
strategy.exit("ExitLong", "FadeLong", stop=close - stopDist, limit=prevClose)
Key parameters to expose for automation:
-
gapThresholdPct: minimum gap size to trigger a fade (default 0.5%, range 0.3–2.0%) -
maxGapPct: upper limit; gaps above this are breakaway candidates, not fade candidates -
volMultiplier: volume filter relative to 20-day average (default 0.8x) -
stopAtrMult: ATR multiplier for stop distance (default 0.5) -
slippageTicks: pre-execution check; cancel entry if spread exceeds this value
Check which indicators fit your automation before adding filters like RSI or VWAP to this skeleton.
Pro Tip: Add a pre-execution sanity check: before the entry fires, compare the current bid-ask spread to slippageTicks. If the spread exceeds your threshold, suppress the entry signal. In Pine Script, you can use request.security to pull tick data, or handle this check at the broker/API layer via Tickerly’s alert conditions.
What does a solid gap-fade backtest look like?
Walk-forward and slippage-adjusted backtests are required before you deploy any gap-fade system with live capital. QuantifiedStrategies.com notes that institutional order flow and pre-market options activity now dominate many opening gaps, making thorough backtesting non-negotiable for retail automated systems.
- Walk-forward testing: Roll the optimization window forward in 3-month increments. Consistent performance across windows signals robustness. See optimizing automated strategies for a practical framework.
Minimum acceptance thresholds: expectancy above zero after costs, Sharpe ratio above 0.5 on out-of-sample data, and maximum drawdown within 2x the average monthly profit.
How to deploy a gap-fade strategy from TradingView to live execution

The deployment flow is: Pine Script alert fires → TradingView alert triggers → Tickerly listener receives the webhook → exchange order executes. Automating trade exits from TradingView follows the same pipeline and is worth reviewing alongside this section.
Deployment steps:
-
Pre-market parameter check: Confirm gap size, volume filter, and session time are set correctly before the open. Automate this as a pre-session alert.
-
Alert formatting: Use Tickerly’s advanced alert message format to pass symbol, direction, quantity, stop, and target in a single JSON payload.
Operational checks to automate before each session:
-
Spread/slippage check: suppress entries if spread exceeds your
slippageTicksthreshold -
Daily trade cap: halt new entries after a set number of trades (e.g., 5 per symbol per day)
-
Circuit-breaker kill switch: pause all bots if daily P&L loss exceeds 2% of account equity
-
Session time gate: block entries outside your validated time window
Risk controls and position sizing for gap fades
Size every gap-fade trade as a fixed percentage of account equity at risk, adjusted for the stop distance and instrument tick value.
Core formula:
Position size = Risk per trade ($) ÷ (Stop distance in ticks × Tick value)
For example: $200 risk, stop distance of 10 ticks, tick value of $1.00 → 20 contracts or shares.
| Asset class | Typical spread | Stop multiplier | Max risk per trade | Max daily loss |
|---|---|---|---|---|
| US equities | — | 0.5 ATR | 1% of equity | 3% of equity |
| Crypto | 0.1–0.5% | 1 ATR | — | 2% of equity |
| Futures | 1–2 ticks | 0.5 ATR | 1% of equity | 3% of equity |
| Forex | 0.5–2 pips | — | — | 2% of equity |
Additional risk rules:
-
Cap total open gap-fade positions at three simultaneous trades to limit correlation risk
-
Widen stops by 1.5x during the first 10 minutes of the session
-
Halt trading on any symbol showing a gap above your
maxGapPctthreshold -
Review risk management for trading bots for a complete framework on daily loss limits and emergency stops
For risk management strategies that actually work, the core principle applies here too: define your maximum loss before you enter, not after.
Two sample gap-fade trades in practice
Both examples illustrate how the rules apply in real conditions, including where slippage bites.
Sample trade 1: US stock common gap fade
Pre-market (8:45 AM ET): SPY-correlated mid-cap stock gaps up 0.8% on no news. Pre-market volume is 60% of the 20-day average. Gap size is within the typical common-gap range.
9:30 AM ET: Open prints at $52.40, prior close was $52.00. Entry signal fires: short at $52.40 via limit order. Fill received at $52.43 (3-cent slippage, 0.06%).
Stop: $52.40 + (0.5 × $0.30 ATR) = $52.55. Target: $52.00 (prior close, full fill).
10:18 AM ET: Price reaches $52.02. Exit limit fills at $52.03. Realized slippage on exit: 1 cent.
Result: Entry $52.43, exit $52.03. Gross gain $0.40/share. Net after slippage: $0.38/share. Gap filled 95%.
Sample trade 2: Crypto overnight gap fade
Sunday night: A low-liquidity altcoin gaps down 1.2% at the weekly open, no major news catalyst. CryptoFutures.trading notes that weekend gaps on low-liquidity pairs are frequently fill-prone when volume is absent.
Entry: Long at market open, fill at $0.9880 vs. prior close of $1.0000. Stop: $0.9760 (1 ATR below entry). Target: $1.0000.
30 minutes later: Price retraces to $0.9995. Exit limit fills at $0.9990.
Result: Entry $0.9880, exit $0.9990. Gain of 1.1%. Slippage cost: 0.2% total round-trip.
Pro Tip: Log every fill price alongside your theoretical entry price. After 50 trades, calculate average slippage per asset class. Feed that number back into your Pine Script slippageTicks parameter so your backtest reflects actual execution costs, not theoretical ones.
Key Takeaways
Gap fades work best on small, low-volume, news-free common gaps where price lacks institutional follow-through to sustain the opening move.
| Point | Details |
|---|---|
| Target common gaps only | Fade gaps that are small (0.3–1.5%), low-volume, and news-free; avoid breakaway and continuation gaps. |
| Validate with walk-forward tests | Require slippage-adjusted, out-of-sample backtests with at least 200 sample trades before live deployment. |
| Size by stop distance | Use the formula: position size = risk ($) ÷ (stop ticks × tick value) and cap daily loss at 2–3% of equity. |
| Paper-trade before going live | Run your Pine Script strategy in TradingView’s paper mode for at least two weeks to measure real fill quality. |
| Automate with Tickerly | Tickerly converts TradingView gap-fade alerts into live bot orders with order-type control and slippage guards. |
The real friction in gap fades is execution, not the idea
Most traders who fail at gap fading do not fail because the statistical edge is wrong. They fail because they underestimate how much the first five minutes of a session punish imprecise execution. A 0.3% slippage hit on a trade targeting a 0.8% gap fill wipes out a third of the expected profit before the position even breathes.
The setups in this article are not novel. Common gaps filling is one of the oldest observations in market microstructure. What separates a profitable automated gap-fade system from a losing manual one is the discipline to enforce rules without exception: the volume filter, the time gate, the stop width, and the daily loss cap. Manual traders override these rules constantly, usually at exactly the wrong moment.
Automation does not guarantee profitability. But it does guarantee that your rules run as written. That alone removes the single biggest source of gap-fade failure. Start with paper trading, measure your actual slippage, and only then scale to live capital. The edge is real; the execution is where it gets lost.
Tickerly turns your TradingView gap-fade alerts into live bots
The gap between a working Pine Script strategy and a live, executing bot is where most traders stall. Tickerly closes that gap directly: your TradingView alert fires, Tickerly parses the JSON payload, and the order hits your exchange within milliseconds, with order-type control, slippage guards, and a circuit-breaker kill switch already built in.
Connect your gap-fade Pine Script to Tickerly’s webhook listener, configure your limit vs. IOC order preference, and run the strategy in paper mode first. When your fill quality meets your backtest assumptions, flip to live with a small position size. Tickerly supports crypto, forex, stocks, and futures across multiple exchanges simultaneously, so you can run the overnight crypto fade and the US equity common-gap fade from a single dashboard. Start automating your TradingView gap-fade strategy with a 30-day free trial.
Useful sources and further reading
-
Gap Trading Strategy (Trade a Gap Fill With Backtest and Trading Rules) – QuantifiedStrategies.com
-
How to Fade Gaps : What Does Fading the Gap Mean? (Insights)
FAQ
What is a gap fade in trading?
A gap fade is a trade taken against the direction of an opening price gap, betting that price will retrace to close or partially close the gap. It works best on small, low-volume common gaps with no news catalyst.
What percentage of common gaps fill?
LiteFinance cites a rule-of-thumb range of 70–80% for smaller, news-free common gaps filling over time, though this varies by market and gap size.
How do you automate a gap-fade strategy on TradingView?
Write your gap detection and entry logic in Pine Script, set a TradingView alert on the strategy signal, and connect the alert webhook to Tickerly. Tickerly parses the alert and executes the order on your exchange with your configured order type and slippage settings.
Which gap types should you avoid fading?
Breakaway and continuation (runaway) gaps backed by high volume and strong news catalysts typically run rather than fill. Investopedia’s gap taxonomy recommends treating these as gap-and-go candidates, not fade setups.
How many sample trades do you need before trusting a gap-fade backtest?
At least 200 qualifying trades per market, tested across both in-sample and out-of-sample periods, with slippage and commissions modeled at realistic live-trading rates.

