Strategies8 min read
How to test a trend-pullback strategy
Turn a vague pullback idea into a testable trend pullback strategy with measurable rules, ATR/Fibonacci options, and a reproducible backtest plan.
By TerraTrade Team

Turn a vague pullback into a testable strategy#
We’ll build a baseline long-side setup for daily and intraday use, give two measurable options for defining a pullback (Fibonacci percent retracement and ATR-based volatility scaling), and outline a robustness protocol (IS/OOS splits, walk-forward, bootstrap, and cost modelling). Where a concept relies on a standard indicator or primary dataset, we cite it directly so your results are portable across platforms Average True Range - IndicatorsFibonacci Retracement Explained: Levels, Setup, and Trading RulesAverage True Range (ATR) Definition | Forexpedia™ by Babypips.comassip-2026-empirical-finance/data-cards/crsp.md at main · edwardlg/assip-2026-empirical-finance · GitHub.

| Component | Deterministic definition to test | Notes / sources |
|---|---|---|
| Trend | Uptrend if Close is above SMA(200) and the SMA(200) slope over the last 20 bars is positive | Simple, reproducible. Parameters are placeholders to test. |
| Pullback (option A) | Fibonacci retracement of the last impulse: allow entries only if pullback depth is within 23.6%–61.8% of that impulse | Use clearly defined swing points to compute the impulse. These Fibonacci bands are widely referenced for retracements Fibonacci Retracement Explained: Levels, Setup, and Trading Rules. |
| Pullback (option B) | ATR‑scaled: distance from the recent swing high to current Close is between 1.0×ATR(14) and 3.0×ATR(14) | ATR is a standard volatility measure; scaling rules and stops by ATR makes risk adaptive Average True Range - IndicatorsAverage True Range (ATR) Definition | Forexpedia™ by Babypips.com. |
| Trigger | Price‑action confirmation: enter long when Close crosses above the high of the most recent pullback bar (or the pullback swing high) | Keeps entries deterministic; no look‑ahead if triggers use completed bars. |
| Exits / invalidation | Initial stop = 2.0×ATR(14) below entry; profit target = 2R; trend filter exit = Close falls below SMA(200); time stop = exit after 20 bars if neither hit | Combines a volatility‑scaled stop, a defined reward multiple, a structural exit, and a time stop Average True Range (ATR) Definition | Forexpedia™ by Babypips.com. |
The four pillars: trend, retracement, trigger, exit#
A baseline trend pullback strategy you can test#
- Universe/timeframe: choose one consistent context (e.g., U.S. equities on daily bars; or a liquid futures contract on 5‑minute bars). Verify contract specifications and trading hours directly with the listing exchange when testing futures.
- Indicator precomputation: compute SMA(200), its 20‑bar slope, ATR(14), and your swing logic (defined below). ATR is the Average True Range, a volatility indicator based on true range averaged over N periods Average True Range (ATR) Definition | Forexpedia™ by Babypips.com; platforms such as cTrader include ATR as a built‑in indicator Average True Range - Indicators.
- Trend filter (longs): uptrend if Close is above SMA(200) and the SMA(200) slope over the last 20 bars is positive.
- Swing/impulse definition for option A (Fibonacci): define swing points with a 3‑bar pivot rule. A pivot high at bar t is confirmed only after the next bar closes and the high at t is greater than both the prior and next bar highs; similarly define a pivot low. The latest confirmed impulse is the move from the most recent confirmed pivot low to the most recent confirmed pivot high occurring after that low. Compute retracement as a percent of that impulse.
- Retracement rule (option A, Fibonacci): allow a setup only if price pulls back between 23.6% and 61.8% of the impulse range Fibonacci Retracement Explained: Levels, Setup, and Trading Rules.
- Retracement rule (option B, ATR‑scaled): allow a setup only if the distance from the most recent high to the current Close is between 1.0×ATR(14) and 3.0×ATR(14), where the recent high is the highest Close since the trend filter turned true.
- Entry trigger: buy on a Close that exceeds the high of the prior bar during an approved pullback; or place a limit order at a chosen retracement level (e.g., 38.2%) for option A Fibonacci Retracement Explained: Levels, Setup, and Trading Rules. Use one trigger per experiment to avoid mixing effects.
- Initial stop: set stop at Entry minus 2.0×ATR(14) Average True Range (ATR) Definition | Forexpedia™ by Babypips.com.
- Profit target: 2R (twice the initial risk); if using a limit entry and slippage model, compute R from the actual fill.
- Trend invalidation: if Close falls below SMA(200) after entry, exit at the next bar’s open (or modeled stop).
- Time stop: exit after 20 bars if neither stop nor target is reached.
- Risk and sizing: size positions so that a full stop‑out equals your defined risk per trade; ATR‑based stops naturally standardize risk across volatility regimes Average True Range (ATR) Definition | Forexpedia™ by Babypips.com.
| Parameter | Baseline value | Why this is testable |
|---|---|---|
| Trend average | SMA(200) | Widely used; slow enough to limit whipsaw; easily reproduced. |
| Slope window | 20 bars | Simple sign test for slope; avoids subjective angle measures. |
| ATR length | 14 | Documented definition exists Average True Range - IndicatorsAverage True Range (ATR) Definition | Forexpedia™ by Babypips.com. |
| Retracement band (A) | 23.6%–61.8% | Common Fibonacci bands to evaluate—not presumed predictive Fibonacci Retracement Explained: Levels, Setup, and Trading Rules. |
| ATR pullback band (B) | 1.0× to 3.0× ATR | Volatility‑normalized dip depth. |
| Stop distance | 2.0× ATR | Volatility‑scaled invalidation anchored to current regime Average True Range (ATR) Definition | Forexpedia™ by Babypips.com. |
| Reward target | 2R | Risk‑unit framing supports clean expectancy math. |
| Time stop | 20 bars | Prevents capital lock‑up in dead trades. |
Make it testable without hidden bias#
- No look‑ahead: confirm swing points with a lag (e.g., wait one bar) and generate signals only from completed bars.
- One clock: don’t mix intraday highs with end‑of‑day fills unless your order model explicitly simulates intraday execution.
- Deterministic logic: encode every condition as a Boolean expression of available data. If a human must “eyeball” a swing, it’s not testable.
- Costs and frictions: include commissions, fees, slippage, and spread. ATR‑sized stops won’t save you from over‑trading thin names.
- Data integrity: use survivorship‑bias‑free datasets for equities (e.g., CRSP) so delistings are included assip-2026-empirical-finance/data-cards/crsp.md at main · edwardlg/assip-2026-empirical-finance · GitHub.
- Corporate actions: ensure splits and dividends are handled consistently in your backtest engine.
Backtest plan: step‑by‑step#
- Define the universe and horizon. Example: top 1,000 U.S. equities by median dollar volume on daily bars; or a single highly liquid futures contract on intraday bars. For equities, prefer survivorship‑free sources such as CRSP assip-2026-empirical-finance/data-cards/crsp.md at main · edwardlg/assip-2026-empirical-finance · GitHub.
- Partition data. Pick a long in‑sample (IS) period across multiple regimes and a hold‑out out‑of‑sample (OOS) period. Avoid peeking at OOS until IS is frozen.
- Precompute indicators. SMA(200), 20‑bar slope, ATR(14) per its published definition Average True Range (ATR) Definition | Forexpedia™ by Babypips.com. Ensure ATR calculation matches your platform’s built‑in specification Average True Range - Indicators.
- Encode signals. Implement Option A (Fibonacci) and Option B (ATR‑scaled) as separate experiments. Use lagged swing confirmation for Option A. Record every signal bar, trigger bar, and fill bar.
- Order/fill model. Choose market, limit, or stop entries to match your trigger. Simulate partial fills realistically for limit orders; apply slippage models appropriate to liquidity.
- Costs. Add realistic commissions/fees and spread/slippage assumptions. Sensitivity‑test them higher to see if edge persists.
- Risk rules. Size by R using the ATR stop distance. Cap portfolio exposure and concurrent positions explicitly.
- Performance metrics. Track expectancy per trade, win rate, average R, drawdown depth/duration, turnover, and exposure. Segment by regime (trend strength, volatility) to understand context.
- Robustness sweeps. Grid‑search key parameters: SMA length (100–250), ATR length (10–20), stop multiplier (1.5–3.0), retracement bands (e.g., 23.6%/38.2%/50%/61.8%) Fibonacci Retracement Explained: Levels, Setup, and Trading Rules. Report distributions, not single winners.
- Walk‑forward. Re‑optimize on rolling IS windows and deploy to the next OOS window. Aggregate OOS results across rolls to estimate live‑like behavior.
- Bootstrap and reality checks. Resample trades to estimate confidence intervals for expectancy and drawdown. Stress‑test with volatility spikes and cost shocks.
- Outlier audit. Manually inspect the top/bottom 10 trades by P&L and by adverse excursion. Verify logic behaved as designed.
- Pre‑live checklist. Re‑run OOS after any code change; freeze parameters; encode journaling tags so live tracking matches the backtest.
When a trend‑pullback strategy is likely to fail#
- Range‑bound, low‑trend markets where SMA(200) filters still let through choppy conditions; you’ll buy dips that don’t resume.
- News‑driven gaps that skip over stops/targets; volatility scaling helps but cannot remove event risk.
- Late‑cycle trend exhaustion where pullbacks deepen beyond your maximum (e.g., more than 3× ATR) before basing.
- Thin liquidity or wide spreads where cost drag turns small edges negative.
- Timeframe mismatch: using daily trend filters to justify very short intraday pullback entries without testing the cross‑frequency assumptions.
Strengths and limitations at a glance
Strengths
- ✓Deterministic rules that can be coded or journaled precisely.
- ✓ATR‑based sizing uses volatility to scale stops and targets (Source: Average True Range (ATR) Definition | Forexpedia™ by Babypips.com).
- ✓Two measurable pullback definitions enable A/B testing rather than belief (Source: Fibonacci Retracement Explained: Levels, Setup, and Trading Rules).
- ✓Clear separation of setup, trigger, and exits simplifies review.
Limitations
- —Trend filters lag and can whipsaw near regime shifts.
- —Swing definition for the Fibonacci option requires lag to avoid look‑ahead, which can delay entries.
- —Small statistical edges can be erased by commissions, slippage, and spread; cost modelling is mandatory.
- —Liquidity constraints and gaps can cause slippage beyond modeled stops.
Journal tags to codify the setup#
- setup:trend-pullback
- trend:sma200-up
- pullback:type-fib or pullback:type-atr
- trigger:close-above-prior-high or trigger:limit-fib
- risk:stop-2x-atr
- target:2R
- time-stop:20-bars
- context:volatility-low/med/high
- result:win/loss
- mistake:rule-violation (if any)
FAQ#
Why use ATR for stops instead of a fixed percent?
Average True Range (ATR) measures the average of true ranges over N periods; it scales with volatility so your stop distance adapts as markets speed up or slow down Average True Range (ATR) Definition | Forexpedia™ by Babypips.com. Many platforms include a built‑in ATR implementation you can reference for consistency Average True Range - Indicators.
Are Fibonacci levels really special?
Fibonacci retracement bands (e.g., 23.6%, 38.2%, 50%, 61.8%) are commonly referenced levels to frame pullback depth, but they are not predictive by decree. Treat them as hypotheses and test whether entries at those bands plus a trigger produce better distributions than nearby levels Fibonacci Retracement Explained: Levels, Setup, and Trading Rules.
Why insist on survivorship‑free equity data?
Because survivorship bias inflates results by excluding delisted or failed securities. CRSP is a survivorship‑free U.S. equity database used in empirical finance, making it suitable for unbiased historical tests assip-2026-empirical-finance/data-cards/crsp.md at main · edwardlg/assip-2026-empirical-finance · GitHub.
Can I run this strategy intraday?
Yes—use the same measurable logic but compute indicators on your bar interval. Confirm your order model (market/limit/stop), include spread/slippage, and be explicit about session hours and breaks. For futures, verify specifications and trading hours with the listing exchange before testing live.
How do I avoid curve‑fitting this strategy?
Hold back a clean OOS sample, prefer rolling walk‑forward re‑optimization, and report parameter‑sweep distributions rather than single best values. Use bootstrap resampling of trades to estimate variability of expectancy and drawdowns.
What if price never reaches the stop or the target?
Use the time stop and the trend invalidation rule. If a trade stalls around breakeven, exiting after N bars frees capital and keeps your backtest results closer to what you would execute in practice.
Bottom line#
Sources#
- assip-2026-empirical-finance/data-cards/crsp.md at main · edwardlg/assip-2026-empirical-finance · GitHub — github.com
- Average True Range - Indicators — help.ctrader.com
- Fibonacci Retracement Explained: Levels, Setup, and Trading Rules — monkeytrade.com
- Average True Range (ATR) Definition | Forexpedia™ by Babypips.com — babypips.com
KEEP READING

Strategies10 min read
VWAP strategy setups and when they fail
A practical VWAP strategy guide for intraday traders—three setups, explicit invalidation, and a reproducible backtest plan.
Read post
Strategies7 min read
Opening range breakout: rules, filters, and a test plan
A practical opening range breakout strategy guide: define range, triggers, invalidation, filters, and a falsifiable backtest before risking capital.
Read post
Backtesting8 min read
Manual vs automated backtesting: choose by hypothesis
Manual vs automated backtesting isn’t a rivalry. Match your method to your hypothesis, controlling bias, timing, execution, and reproducibility.
Read post