How long a sample to use

Updated 2026-09-26 Читать по-русски

Sample length is how many of the latest candles you take as "the current situation". That is the stretch of chart whose historical look-alikes are then searched for.

The choice is usually narrow: from a couple of dozen candles up to a hundred. The difference between the ends of that range is fundamental, and it is not about precision but about what you are looking for.

What changes with length

The longer the sample, the stricter the search. A short stretch has many look-alikes: across twenty candles there are only so many shapes and they recur. A long sample describes the move in more detail, and matching it along its whole length is harder — fewer analogues, each one closer.

There is a flip side. A long sample takes in more events, including ones with no bearing on the current situation, and then demands a match on those too.

A short window finds a lot, and nearly all of it is useless

This is the main practical effect, and it is not obvious.

The shorter the sample, the fewer distinguishable shapes it can hold. Across a couple of dozen candles there is a finite number of "up, pullback, up again" variants, and they recur throughout the history. The search will honestly find dozens of matches — they will simply be matches about nothing: at that length, stretches with nothing in common come out looking alike.

This is also the most common trap. Many matches look like solid statistics, while in fact they are a sign that the criterion is too weak.

A long window finds little, and that is normal

As length grows, agreement has to hold along the whole stretch, and accidental resemblance becomes ever less likely. Analogues come down to a handful, sometimes none.

An empty result on a long sample is not a failure and not a reason to immediately relax the requirements. It is an answer: the instrument's history contains no stretch resembling the current one across the length you chose.

If nothing is found

There is one temptation: drop the similarity threshold and see what falls out. That is the worst option — you are not finding analogues, you are lowering the bar until something squeezes through.

A better order: shorten the sample by one step, check the neighbouring timeframe, look at an instrument with a longer history. And keep in mind that "there was nothing similar" is a legitimate and fairly common answer, especially at fresh extremes: if price has gone where it has never been, there may be no analogues at all.

One number, different spans

This is the main thing to keep in mind: length is set in candles, not in time.

Fifty four-hour candles is roughly eight days. Fifty daily candles is two and a half months. Fifty hourly candles is two days. The same slider means very different things across timeframes, and a "similar situation" on hourlies versus dailies answers different questions.

Relation to the forward horizon

Sample length and the length of "what happened next" are linked, and linked inversely: the longer the sample, the smaller the horizon relative to it.

The reason is that a long continuation needs a reason. Attaching a long future to a short shape is easy enough, but over that future so much happens that the link to the original shape is lost. The reverse is bad too: too short a continuation after a long sample tells you nothing about the outcome.

What length does not settle

No length turns the output into a forecast. A list of similar places in history stays a description of the past at any sample length — all that changes is how strictly those places were selected.

Related questions

In depth

See it on a live chart

The same markup on a prepared example: the chart, the objects it found and what followed.

Open the example