XXUANTIFYInvite a friend

Support & Resistance Under the Microscope

Where are the levels price might stall at? BacktestRookies answers with a short script that marks the latest swing highs and lows as dotted levels, each turning green or red as price closes above or below it. We found a faithful, non-repainting map of the recent range. On the hourly charts, a close through some of its levels was more often followed by a move back than by follow-through.

Candlestick path between three dotted light levels above and three below, touching the nearest upper level and turning down
Levels from old swing tops and bottoms, with price working between the nearest two.

Key takeaways

Exact 1:1 match with the original on all four charts, with no repainting

Calm on the daily chart: BTC's nearest swing-high level changes colour 13.4 times a year, median run 7 candles

BTC hourly: after a close above the nearest swing high, price was higher 10 candles later only 40% of the time, against 51% after any candle

On no chart did a colour change lead price clearly better than any candle

Scorecard

Faithful

Reproduced 1:1: every plotted value matches the original on BTC and ETH, daily and hourly.

Repainting

None. A level only appears once its swing is confirmed, and then it stays put.

Calm

Daily: 13.4 colour switches a year on BTC (median run 7 candles), 11.2 on ETH (median 8).

Edge

No signal clearly better than any candle. On hourly, some breaks were clearly followed by moves back.

What the author built

In the author's own description, the script looks for large swings in past price, the tops and bottoms that might later act as support (a floor) or resistance (a ceiling). By default it marks the last three significant swing highs and the last three swing lows and draws a line at each.

The code does this with pivots. A pivot high is a candle whose high is the highest of the 50 candles before it and a set number after it. The script asks for two kinds. Quick pivots need only 5 candles after the top or bottom, so they catch the most recent swing. Major pivots need 25 candles after, so they mark larger, older turns. That gives eight levels in all: the nearest quick swing high and low, plus the last three major highs and three major lows.

Each level is painted green while the close is at or above it and red while the close is below it, and it is drawn as a line running across the chart. There are no settings to change: the lookbacks are fixed in the code. Because a pivot is only known once its right-hand candles have closed, every level arrives 5 or 25 candles after the swing itself. That delay is the price of a level that never moves afterwards.

What we measured

We measured the script with its author's default settings on BTC and ETH perpetuals, on daily and hourly charts. Daily runs from September 2019 (BTC) and November 2019 (ETH) to October 2026. Hourly runs from January 2025 to October 2026.

Behaviour. The levels frame the recent range well. On BTC daily, the close sat below the nearest swing-high level 81% of the time and above the nearest swing-low level 93% of the time. The nearest high changed colour 13.4 times a year with a median run of 7 candles. The latest major swing high was calmer still: 5.8 switches a year, median run 17 candles. On hourly the same nearest-high level switched about 227 times a year on BTC and 206 on ETH, with median runs of 6 and 7 candles.

BTC daily candles over the last year with the script's dotted swing levels and three marked colour changes
Watch the nearest swing high: one close above it in September, then a slip back below within days.

Reliability. Every plotted value matched the original exactly on all four charts, and nothing repaints. It is its own idea, not a classic in disguise: the nearest swing high looks a bit like the middle of a 100-candle Donchian channel (a correlation of 0.87 on BTC daily), but it is not the same line.

After its signals. We compared what price did after each colour change with what it did after any candle. On the daily charts nothing stood out. After a close above the nearest swing high on BTC daily, price was higher 10 candles later 53% of the time, against 54% after any candle (47 signals). Most daily lines have fewer than 25 signals, too few to judge. On hourly a few gaps were clear, and all of them went against the break. On BTC hourly, after a close above the nearest swing high, price was higher 10 candles later 40% of the time against 51% (203 signals). On ETH hourly, after a close below the latest major swing low, price was lower 10 candles later only 35% of the time against 48% (141 signals). None of these patterns held on all four charts.

Where it shines, and where it is quieter

Where it shines

Mapping the range on daily charts: on BTC daily the close stayed between the nearest swing high and low most of the time (below the high 81%, above the low 93%). It is calm there too, with 13.4 switches a year on BTC and 11.2 on ETH. On hourly the levels held up as levels: on BTC hourly, after a close above the nearest high, price was higher 10 candles later only 40% of the time (203 signals), against 51% for any candle.

Where it is quieter

As a breakout signal. No colour change led price clearly better than a random candle on any chart. On the daily charts most lines carry fewer than 25 signals, so they cannot say much either way. On hourly the levels change often (about 227 switches a year on BTC), and the clear hourly gaps show up on different lines for BTC and ETH, not one pattern on every chart.

Make it better

No measured change passed our test for this script, so these are hints for using it well, not tested improvements.

Give a trade room for a stop. On the daily chart, 9 in 10 of the winning moves after its signals went no more than 9% against the entry first. A stop just beyond that leaves most winners alone.

Treat a close through a level as a question, not an answer. On hourly, the clearest gaps came after breaks that turned back, so watching a candle or two to see whether the break holds is a sensible habit. Acting only on a closed candle is a rule of the market more than a finding about this script, but it suits a tool built on confirmed swings.

The bottom line

BacktestRookies built a compact, honest map of the recent range: eight levels from confirmed swings, coloured by where the close sits, reproduced exactly and never redrawn. Read it as context, the floor and ceiling price has been living between, rather than as a buy or sell button. A natural next step for the author would be optional lookback inputs, so traders can choose between more recent and larger swings.

For another calm, non-repainting trend tool, see our look at the Evasive SuperTrend, or browse the newest reports on /latest/.

These measurements use the author's default settings on BTC and ETH, on daily and hourly charts; your own settings or market may behave differently.

This article is education, not investment advice.

Every test here counts trading costs, runs on many markets and compares the result with just holding the same market. A result is a starting point, not a verdict. How we test

Newsletter

New tests, now and then.

Only for this newsletter; we send a mail to confirm first, and every mail has a link to stop. Privacy