Levels tester

A focused check of one idea: levels, a trend on two windows and an exit after a set number of candles. Your browser takes the candles straight from Binance, and the calculation runs on your device. The general lab

The strip on top is the regime: green, both trends up; red, both down; yellow, a range. Faint lines are the levels as they stood at each candle.

A backtest is a calculation by set rules on historical data: levels and trend only from past candles, a trade at the next candle’s open, the stop before the take-profit, a fee and slippage on every fill. It does not account for futures funding, taxes, the cost of shorting or order book liquidity, and it is easy to fit to history. Past returns do not guarantee or promise future returns. The calculation runs in your browser and is not individual investment advice.

How the tester works

A level is where the price traded for a long time

The window of recent candles is split into price steps. Each candle adds one to every step it touched, which gives a time-at-price profile, as in MyLevels and the market profile. The peaks of the profile are the levels: the price often comes back to them and turns there. The step and the smoothing are set in typical candle moves, so the same settings work on Bitcoin and on Dogecoin.

The second way: pivots

A pivot is a high or a low among neighbouring candles. If the market turned at the same price twice or more, that is a level. Highs and lows go into one list: broken resistance becomes support. Both joins the profile and the pivots; Matched keeps only the common levels.

No look into the future

Levels are recalculated once an hour from past candles. A decision at a candle’s close sees only the levels built before it; a pivot appears only after neighbouring candles confirm it; the trade happens at the next candle’s open. An automatic test checks this.

A trend on two windows

The short window is about a day of 15-minute candles, the long one about 50 four-hour candles, as planned: one timeframe, 4 hours = 16 candles. A trend is a change of the average over the window larger than half the usual price move for that window; otherwise it is a range.

Three draft strategies

1: both trends up, a candle touched the nearest support and closed above it: buy. 2: the same in reverse, a short from resistance when both trends are down. 3: both windows in a range: buy at support, short at resistance. The exit comes after a set number of candles, optionally with a stop beyond the level and a take-profit at the next level.

The main check: a random entry

A trade in the right regime can earn just from the trend. So for each trade a random candle of the same regime is taken, with an entry on the same side for the same time, 300 times over. Levels are useful only if the strategy is clearly better than this random entry, on several coins and on new data.

First results: 8 coins, 15 minutes, 2021–2026

The default settings were fixed before the calculation. The history was split in advance: development is 2021–2023, validation is January 2024 to April 2026, and from May 2026 there is a held-out part that has not been opened yet. The exit is after 16 candles (4 hours); costs are a 0.05% fee and 0.02% slippage per side.

StrategyTradesAverage trade after costsBefore costsBetter than a random entry byCoins in profit
1. Long from support1,365 / 1,045+0.13% / −0.12%+0.27% / +0.02%+0.09% / −0.07%5 / 2 of 8
2. Short from resistance994 / 851−0.35% / −0.16%−0.21% / −0.02%−0.05% / +0.10%1 / 1 of 8
3. Range6,398 / 4,836−0.12% / −0.16%+0.02% / −0.02%+0.02% / −0.02%1 / 0 of 8
1 with an exit after 24 hours701 / 532+1.07% / +0.27%+1.21% / +0.41%+0.55% / −0.12%6 / 5 of 8
1 with a limit order at the level, fee 0.02%1,768 / 1,355+0.21% / −0.06%+0.31% / +0.04%+0.13% / −0.05%4 / 2 of 8

Each cell: development / validation, all 8 coins together. The two bottom rows are hypotheses stated on the development part and checked once on the second part. Calculated on 9 November 2026 from Binance candles; to repeat it, run scripts/levels-research.mjs.

What it means

Levels give no edge yet

On average a bounce from a level is no better than a random entry in the same regime: strategy 1 beats 58% of random repeats on development and 33% on validation. That is within noise.

The profit of strategy 1 comes from the trend

A random purchase in the “both trends up” regime in 2021–2023 made +0.18% over 4 hours before costs, almost as much as an entry from a level. With an exit after 24 hours strategy 1 is in profit on both parts, but a random purchase in the same regime made +0.65% and +0.52% per day: the trend filter brings the profit, not the level.

A 4-hour short loses

In a downtrend crypto more often bounces than falls further over this horizon: even a random short in this regime lost −0.15% before costs on development.

Costs eat the range

Before costs it is zero, after costs minus 0.12–0.16% per trade. The lab’s earlier experiment with mean reversion on 30-minute candles reached the same result.

Settings do not save it

Of 16 variants on the development part (pivots, windows of 400 and 1,600, volume, a limit order at the level, a stop, a take-profit, a strict trend) none makes strategies 2 and 3 profitable. The two best ideas for strategy 1 did not beat a random entry on the second part.

Stop and take-profit: 1% / 3% and 2% / 4%

The same signals, with the exit only at a stop or a take-profit from the entry price and no time limit. To cover costs of 0.14% per round trip, at least 28.5% of trades have to reach the take-profit with 1%/3% and 35.7% with 2%/4%; a random walk gives 25% and 33.3%.

Strategy and exitTradesTake-profitsAverage trade after costsBefore costsRandom entry, before costsCoins in profit
1. Long, 1% / 3%1,555 / 1,04223% / 24%−0.21% / −0.17%−0.07% / −0.03%−0.02% / −0.01%1 / 2 of 8
1. Long, 2% / 4%1,195 / 75934% / 34%−0.07% / −0.09%+0.07% / +0.05%−0.06% / −0.01%2 / 4 of 8
2. Short, 1% / 3%1,163 / 91623% / 25%−0.22% / −0.13%−0.08% / +0.01%−0.02% / +0.05%1 / 1 of 8
2. Short, 2% / 4%887 / 68530% / 34%−0.29% / −0.05%−0.15% / +0.09%+0.01% / +0.12%1 / 4 of 8
3. Range, 1% / 3%5,438 / 3,53525% / 25%−0.11% / −0.13%+0.03% / +0.01%+0.04% / +0.05%1 / 0 of 8
3. Range, 2% / 4%2,952 / 1,97134% / 34%−0.10% / −0.07%+0.04% / +0.07%+0.05% / +0.07%2 / 2 of 8

Each cell: development 2021–2023 / validation 01.2024–04.2026, 8 coins together. The random entry is in the same regime, on the same side, with the same stop and take-profit. Calculated on 9 November 2026; to repeat it, run scripts/levels-trades.mjs.

Losing trades, taken apart

Trades with 1%/3% and 2%/4% were broken down by features of the signal candle: where it closed, its volume, how far the opposite level was, how many times the price had already come to the level. Patterns were searched on the site’s 8 coins and checked on 8 new ones (AVAX, DOT, LTC, TRX, ATOM, NEAR, UNI, BCH) that the analysis had not seen.

The stop hits at once

With a 1% stop about half of the losing trades closed within the first hour and three in four within 4 hours; only 18% got halfway to the take-profit. At the moment of the touch a bounce is hardly different from a coin flip, and 1% is just 1–2 ordinary moves of a 15-minute altcoin candle.

Take-profits as with a random entry

The share of take-profits is 23–25% with 1%/3% and 30–34% with 2%/4%, just what a random walk gives. The stop-to-target ratio changes the share of winning trades but creates no edge: an edge can only come from the entry.

What hurt the longs

On the site’s 8 coins a long does worse when resistance is more than 5% away (a deep pullback) and when the price came to the level more than 5 times in the past day. With these filters 2%/4% turned positive: +0.07% and +0.17% per trade. On the 8 new coins the same filters gave −0.36% and −0.02%: this is fitting, not a pattern.

What hurt the shorts

A short does worse when the entry is more than 0.55% from the resistance and when the resistance is the strongest peak of the profile. On the 8 new coins these filters gave +0.15% and +0.22% per trade, with 6 of 8 coins in profit on both parts. But the edge over a random entry is weak, beating 66–76% of repeats: a candidate for the next check, not a finished rule.

What did not work

An entry confirmed by the next candle, moving the stop to breakeven after +2%, and a stop and take-profit in typical candle moves (3 and 6) did not improve any strategy, on either the old or the new coins.

How to improve further

  1. Look for the edge in the entry, not the exit: while the entry is no better than random, the stop and take-profit only change the shape of the loss.
  2. Check every finding on coins and periods the analysis has not seen: that is how the long filters were weeded out.
  3. The short filters (an entry within 0.55% of the level, without the strongest levels) go into the next set of hypotheses for the held-out part.
  4. Add a pressure feature for the touch candle: Binance candles carry the volume bought at market, and its share during a bounce may separate a real bounce from a breakout.
  5. Cut costs: limit orders for the entry and the take-profit with a maker fee. With an edge of 0.1–0.3% per trade, costs of 0.14% per round trip decide everything.

How to search further

  1. Measure levels first, trade later: the share of bounces from a level against random lines, as in Osler (2000), by level strength, the number of past bounces, distance and volume.
  2. The trend on its own: the “both windows up” filter with a one-day hold is the most visible finding; it is worth testing as a rule of its own, and levels as a way to improve the entry timing inside the trend.
  3. Horizons and costs: holds from 4 hours to several days, limit orders with a maker fee; the edge has to exceed costs with a margin.
  4. Other levels: round numbers, the previous day’s and week’s high and low, the volume-weighted average price, each through the same random-entry check.
  5. An honest order: hypothesis, development part, one run on validation, the held-out part only for the final candidate. Count how many variants have been tried.