Experiment

Is support and resistance just confirmation bias?

Every chart below is simulated. No level is an input to it, nothing in it remembers a price and the lines land at a height drawn from a random number. Press the button a few times and count how many of them look like they held.

If lines that cannot possibly matter hold about as often as lines on a real chart do, then a line holding says nothing about whether the level matters. The code under the chart prints the seed and the draw behind every line, so the claim that they are drawn blind is checkable.

Simulated price

Press New chart to start.
In [1]:
// One integer decides everything about the chart.
const seed = …;

// The shape of the path: two to five phases, each with its own drift,
// volatility and autocorrelation, every one of them drawn from the seed.
const specRng = makeRng(seed ^ 0xa5a5a5a5);
const spec    = randomSpec(specRng, regime);

// The path itself. Every trade moves price one tick up or down, and the
// steps follow a two-state Markov chain. No level is ever an input.
const sim = pricesim(spec, { relative: 0.1, step_budget: 300000 }, seed);
Out[1]:
In [2]:
// The only two numbers a line is allowed to see: the chart's own low and high.
let lo = Infinity, hi = -Infinity;
for (const b of sim.bars) { if (b.l < lo) lo = b.l; if (b.h > hi) hi = b.h; }

// One uniform draw, and that is the whole level. Nothing reads the price
// path, the candles, the highs, the lows or where the last line landed.
const u     = lineRng.random();     // 0 <= u < 1
const level = lo + (hi - lo) * u;
Out[2]:

lineRng is seeded from the clock when the page loads rather than from the chart seed. The draws printed above are the ones on screen at this moment. Each additional line redraws u and leaves the bar lows and highs untouched.

Why it happens

A random walk revisits everything

Put a horizontal line anywhere inside the traded range and price will come back to it repeatedly, because that is what a wandering path does. Each return counts as a test and each test resolves on one side or the other. Arithmetic alone produces lines that get touched twenty times and send price away on twelve of them, the same record a level described as working would have.

Why it convinces

The line is drawn after the fact

On a real chart the level is chosen once the bounces are already visible, so the lines that would have failed were never drawn and never counted. Here the order runs the other way: the level is fixed before anyone looks at the outcome, and every line dropped stays on the board whether it works or not. The two procedures differ in that ordering alone, and a published chart rarely shows which one produced it.

Why the number moves

The rule decides the result

Widen the touch zone and every line collects more tests, most of them shallow ones that resolve on the side they came from, while narrowing it leaves only decisive approaches in the count. The hold rate therefore follows the definition of a touch, which makes a quoted rate close to meaningless without the rule that produced it. Moving the slider changes that definition, and the reported rate changes with it.

What would change the claim

What a real level has to beat

A coin flip is the wrong baseline, because the comparison worth making is against the rate on this page: paths with no levels in them at all, measured under the same touch rule. A real level has to beat that rate on charts selected before the outcome is known. Nothing short of that comparison turns a line holding into evidence.

daru.finance · Lab