Buy-the-dip in an uptrend, backtested
"Buy the dip" is advice until you say which dip. This template makes it a rule: the stock has to be in a long-term uptrend first, the pullback has to reach the 50-day average, and the price has to turn back up through it before anything is bought — so a dip that keeps going is never bought at all. Unlike the crossover systems, this one is a complete trade: it carries a stop, a target, and a position size derived from them.
The rules, exactly
This is what the run above loads. Every number in it stays editable — change the ticker, widen the stop, and run it again.
- The price must be above its 200-day average — the definition of an uptrend used here.
- Wait for a pullback to the 50-day EMA, then buy when the price closes back above it.
- Stop 1.5 ATR below the entry. That distance also sets the position size, at 1% of capital risked per trade.
- Take profit at 2R — twice the distance to the stop — and move the stop to breakeven once the trade is 1R in front.
Screens for: $2B+ · 1M+ shares a day · profitable. That filter does nothing on the single-stock run above — it is the pool this strategy is really meant to trade, and it comes into play when step 1 is switched from one ticker to the whole US stock market. The momentum screener is a free way to see a ranked pool like it today.
What to watch for
Risk-based sizing is what makes results across different stocks comparable, and it is also what makes this template's numbers unlike a simple buy-and-hold line: you are not always fully invested, so in a straight-up market it will trail simply holding. The 200/50 pair also defines an uptrend somewhat arbitrarily. Try a couple of the other numbers below before treating any single result as the strategy's real behaviour rather than one parameter set's luck.
Before you trust any backtest
A backtest is a measurement of the past under assumptions you chose, and the assumptions are where results go wrong. Three that matter here: the run covers five years of daily closes, so it has seen one bull market and one bad year rather than a full cycle; fees and slippage are included but your broker’s may differ; and a strategy that fired only a handful of times has told you almost nothing, however good the numbers look. The tool reports the trade count for that reason — read it first.
Want to change the rules rather than the numbers? The full backtester builds a setup out of plain-English conditions, and this template arrives in it already loaded and editable.
The other prebuilt strategies
- Golden Cross — Hold while the 50-day average is above the 200-day; step aside when it crosses back under.
- RSI-2 reversion — Buy an uptrending market when the 2-day RSI washes out below 10; sell the bounce above 70.
- Impulse pullback — A fresh 6/18 EMA cross marks a brand-new trend; buy its first small dip as it resumes.
- Donchian breakout — Buy a 20-day high the way the Turtles did; exit on a 10-day low or the 2R target.
- Bollinger reversion — Buy a close under the lower 20-day band; sell the snap back to the middle band.