Backtesting
A backtest applies a written rule to past prices: 100 trades leave the win rate uncertain by about 10 points, and costs of 0.2% per round trip ($2 on $1,000) must be included.
Direct answer
Write the entry and exit as exact rules, run them over historical data with realistic costs, and report the result alongside the sample size and what could bias it. A backtest is only as trustworthy as its stated limitations.
Using information that would not have been available at the time of the trade.
Testing only on instruments that still exist today, which excludes every failure.
Tuning a rule's parameters until it fits the past perfectly and the future not at all.
Spread, commission and slippage that would have erased the edge in live trading.
A result from a few dozen trades is closer to noise than to evidence.
Trying many rules and reporting only the one that happened to work.
This is the same discipline behind the candlestick work: 125 formations are written as executable rules with a stated trend filter and published thresholds, every rule is checked for look-ahead, and the engine is run against a browser mirror until the two agree on every detection. When a measured run is found to have been computed on a different version of the engine, it is set aside and redone rather than published with a caveat - which is what happened to the first one here. Read that study →
Crypto strategies, crypto indicators, breakout signals and custom bots, in one account.
Create your accountThe five steps above are the general discipline; the guide covers the failure modes in detail. This is what the engine behind the formation pages does specifically, because a method described in prose is not checkable and one described exactly is.
| Decision | What was chosen |
|---|---|
| Entry | The open of the bar after the formation completes - the earliest price actually available |
| Exit | The close of the Nth bar. No stop, no target: the raw forward move, not a system |
| Direction | Returns signed to the formation’s own claim, so a bearish rule that falls scores positive |
| Benchmark | An arbitrary entry on the same instrument, timeframe and period, sample size matched |
| Correction | Benjamini-Hochberg across the whole family, not per formation |
| Sample | De-overlapped, because consecutive detections share forward windows |
A result is only reproducible if a second implementation agrees. The Python engine and the browser mirror were run against each other across D1, H4 and H1: 81,301 detections, 0 differing. Every rule was checked for look-ahead, and the swing primitive carries a negative test - that a pivot is invisible one bar before it confirms.
The most useful thing on this page is not the method, it is what happened when the method caught something.
A completed run measuring all 107 candlestick formations was ready to publish. It was set aside instead: the candlestick rows had been computed with the still-forming bar included, and the engine fingerprint had moved when eighteen chart formations were added. The formation definitions, thresholds and invalidation conditions were unaffected - those describe what is tested, not what was measured - so they remain published. The hit rates did not.
Where this goes wrong
The cost of catching a forming-bar leak late is one study thrown away. The cost of not catching it is a wrong number that gets quoted for years. A site that reports a figure for every formation regardless of whether it survived scrutiny is easier to read and worth less.
When the new run completes, every figure appears with its sample size, a benchmark measured on the same bars, a confidence interval, the correction applied across the family of 125, and the rule that produced it - precisely enough that someone else can run it and get the same number. Anything that cannot carry all six is not published.
Spread, commission and slippage are paid on every round trip, so they matter most for strategies that trade often and aim for small moves. A backtest that leaves them out is measuring a market with no friction.
| Item | Amount |
|---|---|
| Gross result of the trade | $5.00 |
| Cost of 0.2% per round trip | $2.00 |
| Net result | $3.00 |
| Share of the gross move lost to costs | 40% |
At that cost level a strategy needs a gross edge of more than 0.2% per trade before it is positive at all, and the margin grows thinner as the move per trade shrinks. This is why the engine reports the measured spread cost beside every result.
Where this goes wrong
A backtest describes what a rule did on past prices. It cannot say what the rule will do next, and nothing on this page should be read as saying so.
Running a written rule on past prices to see what it would have done, with fees and slippage included. It is hypothetical, because no real money was traded.
At least 100. With 30 trades a 50% win rate is uncertain by about 18 points; with 100 trades, by about 10.
No. It shows the rule fitted the past. A result on data the rule never saw, then paper trading, is stronger evidence, and neither guarantees future results.
© 2026 Custom Trading Platform
Nothing here is financial advice, a signal or an offer. Trading can lose money, and on some products more than you put in. Past results describe the past.