Opening Range Breakout
The opening range breakout is not an indicator at all — it is a state machine with a clock. It freezes the high and low of the first bars after a chosen time, then reports whether price has left that box, as +1, -1 or 0. MetaTrader 5 has no function for it, the Builder creates no indicator handle, and the whole day is rebuilt from bar times on every tick.
- Range bars
- 2
- Signals per day
- 1
- Handles created
- 0
Ilustrativo — datos sintéticos, no una cotización en vivo.
What the opening range breakout tells you
Pick a time. Take the bars that follow it, freeze their highest high and lowest low, and treat that box as the day's opening range. From then on the only question is whether price has left the box, and in which direction. Nothing here is smoothed, averaged or weighted — the box stops moving the moment it is frozen, so a break is a fact about a level that was fixed hours earlier rather than about a line that is still adjusting. What makes it worth a page of its own is that the Builder implements it as a state machine rather than an indicator: there is no buffer to read, and the value you get is one of three integers.
- The output is a signal, not a price — read it with a comparison against zero
- First-break-only makes it exactly one signal a day: measured 1.00, maximum 1
- It creates no indicator handle; the day is replayed from bar times each tick
- 1 Find the first bar at or after the anchor time, today
- 2 Freeze the high and low of that bar and the next ones, up to the range count
- 3 Report +1 if a later bar left the box upward, -1 downward, 0 otherwise
Mostrar la fórmula y detalles de cálculo
Every other page on this hub describes a calculation over prices. This one describes a rule about a clock.
1. find the first bar today at or after the anchor time
2. freeze the high and low of that bar and the next N-1
3. a later bar that opens inside the box and closes outside it = break
That is the whole thing. There is no smoothing constant, no period to tune for responsiveness, and no indicator: the Builder emits it as an inline state machine, so the generated EA creates zero indicator handles and there is no buffer to read. The output is not a price but one of three integers — +1, -1, 0 — which is why the template reads it with comparisons against zero rather than a crossover.
One trade a day is a property, not a restriction. With first-break-only on, a synthetic series produced exactly 1.00 signals a day, maximum 1. With it off, the same series produced 7.18 a day, maximum 19. Those are two different strategies.
The 500-bar cap is the thing to know. There is no stored state — the day is rebuilt on every tick — and the loop that hunts backwards for the first bar of today stops at 500 bars. So the node is correct only while fewer than 500 bars have passed since the anchor:
| Timeframe | Bars per day | Frozen range wrong |
|---|---|---|
| M1 | 1440 | 40.4% |
| M2 | 720 | 0.0% |
| M5 | 288 | 0.0% |
| M15 | 96 | 0.0% |
On M1 with a 10:00 anchor the failure starts at 18:20 — 500 minutes after the anchor — and covers 339 of the 840 bars left in the day. Nothing errors; the box is simply frozen around the wrong bars. The template pins M15 for this reason.
A gap is not a break. The bar must open inside the box and close outside it. With gaps injected into a test series, 0 of 13 gap bars produced a signal, while removing the open condition produced 13 of 13 — and of those 13 gap days, only 2 signalled at all. If your instrument jumps, this setup will quietly sit out the days it jumps on.
Señales
Las señales distintivas y testeables que ofrece ORB — y el régimen adecuado para cada una.
Break Below the Range
Listo en BuilderRange Held All Day
Listo en BuilderSecond Break After a Failure
Lógica avanzadaImplementación en MT5
Lo que MetaTrader 5 calcula y dibuja realmente: la referencia de cada regla de esta página.
Notas de la plataforma
Funciona mejor / usar con cuidado
Ningún indicador tiene ventaja universal. Aquí es donde ORB ayuda — y donde engaña.
Funciona mejor
- Instruments with a real session open, where the first bars genuinely set a range
- M5 and above — the day-boundary search gives up after 500 bars
- One-shot intraday trading, where at most one entry a day is the point rather than a limitation
- Anchors chosen from the instrument's own session, not from a round number on your clock
Usar con cuidado
- Instruments that gap: a bar that opens already outside the box is never counted
- M1, where the frozen range silently drifts from 500 bars after the anchor onward
- Broker server time — the anchor is in server time unless you set the GMT offset
- Reading the output as a level or a strength: it is +1, -1 or 0 and nothing else
Crear una estrategia ORB
Conecta la señal a las reglas de entrada y salida, luego exporta un EA MT5 compilable — sin código.
- One opening-range node: anchor at 600 minutes, two range bars, first break only
- Signal greater than zero → Open Buy · SL 50 / TP 100
- Signal less than zero → Open Sell, same distances mirrored
- Shift 1, so the break is judged on a closed bar
- The timeframe is pinned to M15 rather than following the chart
Combinar ORB con otros indicadores
Un indicador raramente se sostiene solo. Estas combinaciones cubren los puntos ciegos de ORB.
ORB + ATR
- ATR at 14
- Stop loss in ATR mode
- Signal greater than zero
The Stop Loss node has an ATR mode, so swapping the fixed distance needs no extra condition. For the range-width filter, add an ATR node and a Compare, then join it to the entry with an And gate.
Abrir el Builder →ORB + Donchian Channel
- Donchian upper at 20
- Signal greater than zero
- Buy
No single-flow template combines them. Add a Donchian node with MODE_UPPER at 20 and a Compare against price, then join it to the opening-range Compare with an And gate.
Abrir el Builder →ORB + ADX
- ADX above 25
- Signal greater than zero
- Buy
No single-flow template combines them. Add an ADX node with a Compare at 25 to Opening Range Breakout and join it to the entry with an And gate.
Abrir el Builder →Parámetros
Valores iniciales para validar en tu propio par y temporalidad — no son configuraciones garantizadas.
| Parámetro | Valor predeterminado | Rango de prueba sugerido | Qué hace |
|---|---|---|---|
| Range start (minutes from midnight) | 600 | 0–1439 | The anchor. The node walks today's bars from the oldest forward and takes the first one whose time is at or after this many minutes — so 600 means the first bar at or after 10:00. If the instrument has no bar that late in its day the anchor is never found and the output stays 0. This is server time unless the GMT offset is set. |
| Range bars | 2 | 1–100 | How many bars from the anchor form the box. The high and low are accumulated across them, and the box is frozen on the last one. Two bars on M15 is a 30-minute opening range; the same intent on M5 needs six. |
| GMT offset (hours) | 0 | -12–14 | Added to every bar time before the day and the minute-of-day are computed. This is how you express an anchor in your own session rather than the broker's — and it also moves the day boundary, which is what decides which bars belong to today. |
| Minimum break (pips) | 0 | 0–10000 | How far beyond the box the close has to be. Zero means touching the edge counts, which is the template's setting. Raising it asks for commitment and costs you the earliest part of the move. |
| Maximum break (pips) | 0 | 0–10000 | A cap, so a bar that has already run far past the box is not chased. Zero means no cap — and it has to, because an earlier version used zero as a real limit, which made the default fire only when the close matched the edge exactly. |
| First break only | Yes | Yes / No | With this on, the day's first break is the only one reported: measured on a synthetic series it gives 1.00 signals a day with a maximum of 1. Off, the same series gives 7.18 a day with a maximum of 19, which is a different strategy rather than a looser version of this one. |
| Shift | 1 | 0–100 | Which bar the break is judged on. The template uses 1, so the decision is made on a closed bar. The signal is a one-bar pulse — it is non-zero only when the break happened on exactly the bar being read. |
| Timeframe | Current | Current / M1–MN1 | Which timeframe's bars the box and the break are built from. The template pins M15 instead of following the chart, because the day-boundary search stops after 500 bars: on M1 that is only 500 minutes of history and the range drifts for the rest of the day. |
Ajustes preestablecidos iniciales
Ejemplos de mercado
Dónde ORB funciona, dónde falla y cómo un filtro cambia el resultado.
Out of the box and away
The first two bars after the anchor set a tight range, a later bar opens inside it and closes above, and the position is taken on that bar's close. The day trends and nothing else fires, because the first break is the only one taken.
Out and straight back
The box is broken, the trade is on, and price is back inside within a few bars. The box was correct and the day was simply not directional — the failure the trend-strength filter above exists for.
The day that gapped
Price leaps clear of the range in a single bar that opens already outside it. No signal is produced, because leaving the range is defined as crossing out of it rather than being beyond it.
Indicadores relacionados
FAQ
- Is the opening range breakout built into MetaTrader 5?
- No, and unlike most missing indicators there is nothing to install. It is not a calculation over prices but a rule about a clock, so the Builder emits it as an inline state machine that reads bar times, highs, lows, opens and closes. The generated EA creates no indicator handle at all and needs no extra files on the terminal that runs it.
- What exactly does the node output?
- One of three values on the bar you point it at: +1 if that bar left the box upward, -1 if it left downward, 0 otherwise. It is a pulse rather than a state — it does not stay at +1 while price remains above the range. That is why the template reads it with comparisons against zero instead of a crossover.
- Why does the template pin M15 instead of following the chart?
- Because the day-boundary search stops after 500 bars. On M1 with a 10:00 anchor that runs out at 18:20, and measured against an uncapped reference the frozen range was wrong on 40.4% of the evaluations after the anchor. At M15, 500 bars is five days of history, so the search always reaches the real start of the day. M2 and above all measured 0.0%, so M5 is fine too — M15 is simply a comfortable margin.
- Why did my breakout day produce no trade?
- Most likely it gapped. A break requires the bar to open inside the range and close outside it, so a bar that opens beyond the level is not a break. With gaps injected into a test series, none of 13 gap bars signalled while the same series without that condition signalled on all 13 — and only 2 of those 13 days signalled at all. The other possibility is that the anchor was never found, which happens if the instrument's day has no bar at or after the time you set.
- How many trades a day should I expect?
- One at most, with first-break-only on. Measured on a synthetic series it produced exactly 1.00 signals a day with a maximum of 1. Turning that option off gave 7.18 a day with a maximum of 19 on the same series, which is a fundamentally different strategy — repeated re-entry into a box that keeps being crossed — rather than a slightly looser version of this one.
- Does the anchor use my time or the broker's?
- The broker's, plus whatever GMT offset you set. MT5 bar timestamps are server times, and the node computes the minute of day from the bar's own timestamp. The offset field is there so you can express the anchor in a session you have chosen; without it, the same setting freezes different boxes on brokers whose servers sit at different offsets.
- Can I build this without coding?
- Yes. The Opening Range Breakout template has one opening-range node anchored at 600 minutes with a two-bar range and first-break-only on, feeding two Compare nodes against zero that open a buy or a sell with 50 / 100 pip distances. The anchor, the range count, the GMT offset, the break distances, the stops, the lot and the spread limit are all EA inputs.
- How should I validate settings before going live?
- Backtest on quality tick data, then demo, and read the trade list rather than only the curve. Two checks are specific to this setup. Confirm the anchor lands where you think it does on your broker's server time — an anchor an hour off freezes a different box and the equity curve will not tell you why. And count the no-trade days: with at most one entry a day, a plausible-looking test can rest on very few trades, and a strategy that fires forty times a year needs a much longer sample than one that fires daily.
Artículos relacionados
Glossary