FreeIndicators·ThinkorSwim
Reversion to 50-Day SMA
Distance-from-mean signal for snap-back trades.
How to install in ThinkorSwim
- In ThinkorSwim, open a chart, then go to Studies → Edit Studies.
- Click Create, clear the editor, and paste the code.
- Name it, click Apply, then OK, and it draws on your chart.
How to Use — WeTradePro Reversion To 50-SMA
Plots how far (in %) price has stretched from its 50-SMA, with fade bands that flag over-extension. Educational, not advice.
What it is (one line)
A mean-reversion oscillator showing the percent distance of price from the 50-period SMA, with ±bands — when price stretches too far from the average, a snap-back toward it is the higher-odds path.
Who it's for & best timeframe
| Trader type | How you use it | Best timeframe | Recommended setting |
|---|---|---|---|
| Day trader | Flag intraday over-extension from the 50-SMA for fade scalps | 5-min – 15-min | pctBand 1.5–2.5 |
| Swing trader | Best fit — buy pullbacks toward the rising 50-SMA, fade vertical extensions | Daily | smaLength 50, pctBand 5.0 |
| Position trader | Spot stretched weekly moves likely to consolidate back to the average | Weekly | pctBand 8–12 |
Best overall: Daily, `pctBand 5%`. Calibrate the band per symbol — high-beta names need wider bands than slow ETFs.
What you see (lower panel below price)
- Histogram: % distance of price from the 50-SMA. Cyan above zero, magenta below; turns red/green when at/beyond a band.
- Gray dashed zero: price = 50-SMA.
- Red dashed band (+%): stretched above — over-extended long, fade-short zone.
- Green dashed band (−%): stretched below — over-extended short, fade-long zone.
- Dots: red = crossing back below the upper band; green = crossing back above the lower band.
- Label: live % distance.
How to trade it (the core play)
- Find the over-extension — histogram reaches a band.
- Enter on the dot (cross back inside) in the direction of reversion.
- In an uptrend, prefer green dots — buying the snap back to a rising 50-SMA is the classic pullback entry.
- Stop beyond the price extreme that made the stretch.
- Target: the zero line (the 50-SMA itself).
Settings (inputs)
smaLength(50) — the moving average price reverts to. 50 is the institutional standard.pctBand(5.0) — the % distance that counts as over-extended. Tune per symbol — wider for volatile names.showSignals(yes) — toggle the reversion dots.
Best on
- Trending stocks and ETFs that respect the 50-SMA on pullbacks: AAPL, MSFT, SPY, QQQ, sector ETFs.
Common mistakes
- Using one `pctBand` for everything — 5% is a lot for SPY and nothing for a small-cap. Calibrate.
- Fading a parabolic move too early — over-extended can get more over-extended. Wait for the cross-back dot.
- Ignoring trend direction — fade longs in uptrends, fade shorts in downtrends; don't fight the average's slope.
- Treating zero as a hard target — it's a magnet, not a guarantee.
Video script outline (for your WeTradePro tutorial)
- Hook: "Price always comes home to the 50. Measure how far it's wandered."
- Show a vertical run hitting the upper band, then the snap back to the SMA.
- Why % distance (not raw price) makes it comparable across symbols.
- Calibrating
pctBandper name. - The pullback-to-rising-50 long: the green dot.
- Target = the moving average = the zero line.
- Recap + "import link in description."
Educational analysis, not financial advice.
← Back to all 103 indicators