Articles ·

Backtests now trade inside every bar on the exchange's finer candles

A candle does not say whether its high or its low came first. Until now, a Metrand backtest walked a bar that reached a position's stop and its target both ways and kept the way worse for the account. That is a safe bound, never a flattering one, but it is an assumption. Backtests now read what happened instead: the exchange's own finer candles under the bars, the minutes under an hour where they fit.

ETHUSDT on 14 July 2025, 05:00 to 06:00 UTC. The hour reached the long's stop at 3,022.10 and its target at 3,061.58. Walked the worse way it is a stop, −6.19 USDT. Its minutes show the target at 05:24 and the stop's price only at 05:49: +6.79 USDT
One real hour: the worse way said stop, the minutes say target.

The strategy still decides on its own bars, at their close. Inside each bar, its orders, stops, targets and liquidation trade on the finer candles, in the order the market made them.

Which finer candles

The finest candles of the same market and exchange that divide the bars, as many as fit in 50,000 for one market:

Bars 1m up to 3m up to 5m up to 15m up to 30m up to 1h up to
15m 34 days 104 days 173 days — — —
1h 34 days 104 days 173 days 520 days 2.8 years —
4h, 1d 34 days 104 days 173 days 520 days 2.8 years 5.7 years

Longer windows of 4-hour and daily bars go on to 2-hour and 4-hour candles. A basket or a test across periods shares 100,000 between its markets or periods, so 20 markets get 5,000 each. The result says which candles it used, under the trades: "Inside every bar, orders, stops, take-profits and liquidation traded on the 1m candles under it".

What it changed on real data

We replayed one strategy on Binance USDⓈ-M futures, BTCUSDT, ETHUSDT and SOLUSDT, July to September 2025, on hourly bars: long while EMA 5 is above EMA 20, short while below, 1,000 USDT a trade on a 10,000 USDT account, 5 bps fees and 2 bps slippage. Each run three ways: every hour walked the worse way, on the 3-minute candles inside it (what a quarter of hourly bars gets now), and on the minutes.

Net result of the strategy, walked the worse way inside each hour and on the minutes inside it. With a 0.5% stop and a 0.8% target: BTC −829 and −816, ETH −2,276 and −2,004, SOL −2,136 and −1,720 USDT. With 1% and 1.5%: ETH −838 and −763, SOL −389 and −314. With 2% and 3% the two agree
The tighter the stop and target against a bar's range, the more the worse way decided.

The worse way was never wrong in the direction that matters: it never showed a strategy better than it was. Now it no longer shows one worse either, where the exchange's candles can say.

When the finer candles are missing

A bar the exchange has no finer candles for, or whose finer candles do not reach its own high and low, is walked both ways as before and counted. Past one such bar in twenty, the finer candles are not used at all. If the exchange does not answer in time, the backtest still runs on its bars. Either way the result says so and why.

What is still a limit

A one-minute candle has an order too: two of ETH's trades in the quarter met both levels inside a single minute and are still marked "either way". And no candle carries the order book, so a large market order still fills at its touch plus the slippage you set.

In the API

The engine's POST /backtest takes the finer candles as detail, the platform's answers carry report.inside_bars (interval, own_bars and, when none were used, why), and report.config.bar_ms is the span the account was marked on. How the engine walks a bar: How a Metrand backtest fills orders inside a bar.