Home › Guides › Opening Range Breakout

WHY BOTS FAILFREENO ACCOUNTAUTOMATED TRADE BOTSOpening RangeBreakoutThe arithmetic of how bots failEDUCATION ONLY | NO SIGNALSEXAMPLE NUMBERS ARE LABELLEDAUTOMATED TRADE BOTSautomatedtradebots.com
A free page on opening range breakout. Education only, with example numbers labelled.
WHY BOTS FAIL

Opening Range Breakout

Short answer

The opening range breakout (ORB) marks the high and low of the first part of the session, here the first 6 five-minute bars, and trades the first close outside that range.

Mark the high and low of the first half hour, then trade the first close outside it. The test shows what has to be true about prices for that to pay.

The page explains the idea in plain words, works through the arithmetic with a table, and shows how it hits grid, martingale and DCA bots, then tells you what to check before you run one.

  • A worked example with real arithmetic
  • How it hits grid, martingale and DCA bots
  • How to check for it before you run a bot
  • No advice, no signals, no profit promises

Last reviewed 28 October 2026. Education only, not advice.

Free, no account Runs in your browser Worked numbers shown Not advice Examples labelled

Ready to go further

Next: test your own rule

The Monte Carlo simulator shows how much of a good-looking result can come from luck alone.

Reading time4 minutes
Worked exampleExact arithmetic
Tools linked1 on this page
Reviewed28 Oct 2026

What is included

  • What it is, in plain words
  • The formula or mechanism, with exact arithmetic
  • How it hits grid, martingale and DCA bots
  • A check you can run before you switch a bot on

Who it is for

  • People who run or plan to run a trading bot
  • Anyone reading a backtest or a bot sales page
  • Readers who want the numbers, not the pitch
  • Not advice, and not a signal service
Average result per trade after a cost of 0.04, in points, by how prices behave (made-up)-0.055tend to reversepersistence -0.1-0.046are randompersistence 0-0.009tend to continuepersistence 0.1Simulated 5,000 days of 78 five-minute bars each for every setting, seed 20261029. Calculated by us on 29 Oct 2026.
The picture for this page. Example numbers are made up unless the page says they were calculated.

Key facts

  • The opening range breakout (ORB) marks the high and low of the first part of the session, here the first 6 five-minute bars, and trades the first close outside that range.
  • In the simulation the rule traded on 100.0% of days when moves were random, won 31.7% of its trades and averaged -0.006 points a trade before cost and -0.046 after a cost of 0.04 (calculated by us on 29 Oct 2026).
  • When prices were set to continue their moves slightly, the net average was -0.009. When they were set to reverse slightly it was -0.055.
  • So the rule is not an edge by itself. Moves out of the range would have to continue by more than the cost of each trade before it pays, and that has to be shown on real data, with real costs.
  • The simulated prices are made up. They show what the rule needs, not what any market does.

The rules

  • The range. The highest high and lowest low of the first 6 bars of the session.
  • The entry. Go long at the first bar that closes above the range, or short at the first bar that closes below it.
  • The stop. The opposite side of the range. If the stop is hit, the trade closes there.
  • The exit. Otherwise, the close of the last bar of the day.

Every setting is a choice: the length of the range, the stop, the exit time, and whether to ignore very wide or very narrow ranges. Each choice added to a backtest is a chance to fit the past, as in overfitting.

The test

We made 5,000 days of 78 five-minute bars at each of three settings of how a bar's move relates to the one before it. At 0 the moves are independent, so there is nothing to find. At +0.1 a move slightly tends to be followed by another in the same direction, and at -0.1 it tends to be followed by one in the opposite direction. The size of a move is the same in all three. The rule above was applied to every day, and a cost of 0.04 points was taken from each trade.

How prices behaveDays with a tradeTrades wonAverage before costAverage after costBad-luck trade (5th percentile)
moves tend to reverse (-0.1)100.0%30.3%-0.015-0.055-0.530
moves are random (0)100.0%31.7%-0.006-0.046-0.561
moves tend to continue (0.1)100.0%31.2%+0.031-0.009-0.588

With random moves the average before cost is -0.006, close to zero as it should be, and after cost it is -0.046. With a slight tendency to continue, the average before cost is +0.031 and after cost -0.009: the gain is smaller than the cost. With a slight tendency to reverse it is -0.015 before cost and -0.055 after. The average range was about 0.26 points wide, so the cost of 0.04 is 15.5% of the range on every trade. The result depends on one thing you cannot see in advance: whether moves from the range continue or reverse.

Share of days with a breakout trade, and the share of trades won, when moves are random100.0%Days with a tradeof 5,00031.7%Trades wonrandom movesRandom walk, no persistence. Calculated by us on 29 Oct 2026.
The rule trades every day and wins under a third of its trades, so its average comes from a few larger winners against many small losers. A busy bot does not show an edge.

Where bots go wrong with this

  • Believing a good-looking sample. A few weeks of breakouts that continued is exactly what the random setting also produces some of the time. See backtesting and Monte Carlo.
  • Ignoring costs. A narrow range means the cost is a bigger share of the move, as in spread and slippage. Breakouts also fill worse than the signal price, because many orders arrive together.
  • Fake breakouts. A close beyond the range can reverse straight away. The stop at the other side of the range limits the loss, and it can also be large. See stop loss orders.
  • Tuning the range length. Choosing the bars that fit the past gives a good backtest and a poor forward result. See forward testing.
  • Treating all days alike. News days, holidays and half days behave differently, and a test that lumps them together hides it.

How to check an opening range breakout bot

Test it on real intraday data from several years and several market conditions, with spread, fees and delayed fills. Split the data and keep a final part untouched. Compare the average per trade after costs with the cost itself, and check the worst losing run with max drawdown. Then run it in paper trading before real money.

What this page does not tell you

It does not say that the strategy works or fails on any market. The prices are made up with a chosen tendency to continue or reverse, the cost is made up, and this is education, not advice.

FAQ

Frequently Asked Questions

What is an opening range breakout?

A strategy that marks the high and low of the first part of the trading session and trades the first close above or below that range.

How do you trade an opening range breakout?

Define the range, enter on a close outside it, place a stop at the other side of the range, and exit at a set time or target. Each of those is a setting to test.

Does the opening range breakout strategy work?

It depends on whether moves out of the range tend to continue. In the simulation on this page it lost money after costs when moves were random and made money only when they continued.

What is the best opening range length?

There is no single answer. Choosing the length that fits past data is a common form of overfitting, so test several lengths across several periods.

Can a bot trade an opening range breakout?

Yes, the rules are simple to code. The hard part is knowing there is an edge after costs, which needs real data and careful testing.

Are the numbers on this page real?

Example numbers are made up to show how the maths works, and the page says so. A figure only counts as exact when the page says it was calculated on a stated date. Nothing you enter in a calculator leaves your browser.

Can I use this to decide whether to run a bot?

It can show whether a bot's numbers hold together and how much an account can lose. It cannot say what the market will do, and it is not advice. Use it to ask better questions, then read the terms of your own broker or exchange.

Is this financial advice?

No. It is general education about a strategy. The prices and costs are made up and it does not consider your situation.

Know the Risk Before You Run It

Free calculators and guides, added every week. Leave your details and we will email you when new ones go up.

Trading carries a risk of loss