My SPY swing trading strategy gets the same question from almost everyone: what is the one trick — the magic indicator or signal? The honest answer is that it does something less glamorous and far more durable: it combines two forces usually pitched as opposites — trend-following and mean reversion — into one set of rules. Here is how it works, and why pairing them holds up where either one alone tends to break.
Two edges that cover each other’s weakness
Trend-following makes money by staying with a move; its weakness is the chop, where it gets whipsawed buying highs and selling lows. Mean reversion makes money by fading stretched moves back toward the average; its weakness is the runaway trend, where “too far” just keeps going. Each approach fails precisely where the other works. This SPY system uses the trend to decide direction and mean reversion to decide timing — so it only fades pullbacks in the direction the market is already moving.
Step 1: Establish the trend
Before any trade, the system asks one question: which way is SPY actually moving? It reads the macro trend with a moving-average filter on closing prices. If SPY is in a confirmed uptrend, the system only looks for longs. If it is in a downtrend, it only looks for shorts. It never fights the dominant direction — no shorting strong markets, no bottom-fishing in falling ones.
Step 2: Wait for price to stretch, then enter with the trend
Inside that trend, the system waits. It does not chase strength; it waits for price to push well beyond its short-term range — a statistically meaningful stretch away from the average — and then enters in the trend’s direction. In an uptrend that means buying a pullback; in a downtrend it means shorting a bounce. The threshold is volatility-based, so the bar for “stretched” widens automatically when SPY is volatile and tightens when it is calm.
Step 3: Exit on reversion, cap risk with a stop
Once in, the exit mirrors the entry: as price reverts back toward its average, the system books the move. There is no hoping or holding for a home run — the edge is the snap-back, and the system takes it. A user-adjustable, volatility-based stop-loss sits on every trade, so a position that keeps moving the wrong way is cut rather than nursed.
Long and short, sized to conditions
Because the trend filter works in both directions, the system trades long and short — built to operate in rising and falling markets, not just bull runs. Position sizing is volatility-adaptive: it scales exposure down when SPY is wild and up when it is orderly, so a single ugly week does not dominate the account. The same signals also carry to instruments like SSO, SDS, and SPY options for traders who want more or less leverage.
Written in 2016, still trading live
I wrote and tested this system in 2016 and have traded it in real time ever since — with no re-optimization. That part matters: a strategy that only looks good after you re-tune it to recent data is not a strategy, it is a curve fit. You receive the complete, fully annotated EasyLanguage source code — no black boxes — so you can read every rule and adapt it as your own testing evolves.
Reading the back-tested numbers
The statistics in the panel above come straight from the strategy’s store page, so they stay in sync with what I publish there. A profit factor above 1 means the back-test’s winners outweighed its losers; the CAGR is the compounded annual rate over the test window; the win rate is how often trades closed positive; and the maximum drawdown is the deepest peak-to-valley dip you would have had to sit through. Read them together — a high return paired with a stomach-churning drawdown is a very different system from a steadier one. And remember: every figure is hypothetical, modeled with estimated commissions and slippage, not a promise about the future.
Who this is for
This is built for traders who already work in TradeStation or MultiCharts and want disciplined, mechanical rules instead of discretion. You don’t need to be a programmer, but you should be comfortable loading EasyLanguage, setting inputs, and following signals without overriding them mid-trade. Trade futures instead of the ETF? The same engine runs on the E-mini (ES) version.
If you are newer to systematic trading, start with the bare-bones logic in the 3-line SPY swing strategy. When you are ready to run this one yourself, the full version is in the store.
Back-tested results are hypothetical and shown for educational purposes only; they include estimated (modeled) commissions and slippage. Past performance is not indicative of future results. RelaxedTrader is not a registered investment advisor or broker-dealer, and nothing here is investment advice.
Every purchase includes the fully annotated EasyLanguage source code, a ready-to-run TradeStation workspace, a quick-start guide, the full back-test report, and free lifetime updates — and you can always ask me questions directly.
Get the code: SPY Swing Trading strategy → — EasyLanguage source for TradeStation or MultiCharts, instant download.
Related reading
More from the blog: the E-mini (ES) version, the 3-line SPY strategy, and the QQQ swing strategy.
