Automation & Bots Advanced

Intrabar Execution

Also known as: intra-bar fill, within-bar execution, mid-candle execution, tick-level execution

What is it?

Intrabar execution means an order triggers inside a candle rather than at its close, so the fill happens at whatever price the market touched during the period instead of at the one value the bar reports. It is where a great many backtests quietly lie. A tester working from OHLC bars knows a candle's open, high, low and close, but not the order in which those prices occurred. Take a long entered at 1.0850 with a stop at 1.0838 and a target at 1.0862, on a candle whose high is 1.0864 and low is 1.0836.

Side by side
Bar-close testing: the tester guesses

One 15-minute candle: open 1.0850, high 1.0864, low 1.0836, close 1.0858. Your stop sits at 1.0838 and your target at 1.0862. The bar reached both.

  • The tester has no record of which came first
  • Assume the target and the trade books as a win
  • Reported win rate: 61%
Tick-level testing: the market answers

The same candle replayed tick by tick shows price fell to 1.0836 first, then recovered to close at 1.0858.

  • The stop was touched before the target existed
  • The trade books as a loss
  • Actual win rate: 47%
Nothing about the strategy changed between these two columns. Only the assumption about what happened inside one candle did.

Both levels were reached inside that one bar. A tester has to assume which came first, and if it assumes the target, a losing trade is recorded as a winner. The same gap shows up live in the opposite direction. A strategy that evaluates only on bar close will not see a spike that reversed within the candle, so it holds through moves a tick-level version of itself would have exited.

Neither behaviour is wrong in itself, but they are different strategies, and the results of one do not transfer to the other. This is why a serious test states its execution model and uses tick data or a lower-timeframe series whenever a stop and a target can both sit inside one bar.

Why it matters: When a stop and a target both sit inside one candle, the backtest has to guess which was hit first, and a favourable guess turns a losing strategy into a profitable-looking one.

Trade impact: Critical

An optimistic intrabar assumption inflates the win rate on exactly the trades that lost, so the reported edge can be entirely an artefact of the testing model.

Real-world example

A strategy reporting a 61 percent win rate on bar data fell to 47 percent on tick data, because 14 percent of its trades had both the stop and the target inside a single candle and the tester had resolved every one of them as a win.

How SignalBots handles it

SignalBots signals state entry, stop and target as explicit prices, so the outcome depends on what the market actually traded rather than on how a tester resolved the inside of a bar. See /risk-warning.

Pro tip

Count how many backtested trades had both the stop and the target inside one candle. Above a few percent, the headline result is an assumption rather than a measurement.

Common pitfalls

Comparing a bar-close backtest against live tick-level results and blaming slippage, when the difference is the execution model rather than the fills.

FAQs

Frequently asked questions

Which strategies are most affected?

Anything with a stop and a target close enough together to both sit inside one candle: scalping, tight-stop breakout systems, and grid or martingale approaches. Strategies that act only on the close of a bar are largely immune.

How do I test intrabar behaviour properly?

Use tick data where your platform supports it, or run the strategy against a much lower timeframe series so each higher-timeframe bar is resolved by real sub-bars. MetaTrader's every-tick modelling modes exist for exactly this.

Does a higher timeframe make the problem worse?

Yes, because a wider bar can contain far more price action. A daily candle can easily contain a full round trip between your stop and your target, while a 1-minute candle rarely does.

Can I just assume the stop was hit first?

That is the conservative choice and a reasonable default, since it never flatters the result. It will understate some genuinely winning trades, but a strategy that survives the pessimistic assumption is one you can trust. Your capital is at risk.

Does this affect live trading or only backtests?

Both, differently. Live, the question is whether your logic evaluates on every tick or only at bar close, which changes when you enter and exit. In a backtest it is an assumption; live it is a design decision you should make deliberately.

Trading involves substantial risk of loss. Historical and backtested results do not guarantee future performance. Read the full risk warning.

Add SignalBots as a preferred source on Google Add SignalBots as a preferred source on Google