Kustom & komunitas BreakoutSessionNot MT5 Built-in Tersedia di Builder

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
The opening range, frozen — it never moves again+1 — a bar opened inside the box and closed above it-1 — the same downward. A gap clear of the box counts as neitherSignal — three values, and only for the bar that broke (no buffer: this node has none)

Ilustratif — data sintetis, bukan kutipan langsung.

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. 1 Find the first bar at or after the anchor time, today
  2. 2 Freeze the high and low of that bar and the next ones, up to the range count
  3. 3 Report +1 if a later bar left the box upward, -1 downward, 0 otherwise
Tampilkan rumus & detail perhitungan

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:

TimeframeBars per dayFrozen range wrong
M1144040.4%
M27200.0%
M52880.0%
M15960.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.

Sinyal

Sinyal yang dapat di-backtest dari ORB — dan kondisi pasar yang cocok untuk masing-masing.

Break Above the Range

Siap di Builder
Kondisi
The signal is greater than zero on the closed bar
Kondisi terbaik
Trending
Penggunaan umum
The template's long entry — one per day, on the bar that left the box

Break Below the Range

Siap di Builder
Kondisi
The signal is less than zero on the closed bar
Kondisi terbaik
Trending
Penggunaan umum
The mirror image, and the reason the output is signed rather than boolean

Range Held All Day

Siap di Builder
Kondisi
The signal stays at zero from the anchor to the close
Kondisi terbaik
Ranging
Penggunaan umum
The no-trade day, which is most of what this setup produces on quiet instruments

Second Break After a Failure

Logika lanjutan
Kondisi
The box is broken, price returns inside, then breaks the other way
Kondisi terbaik
Either regime
Penggunaan umum
Requires first-break-only off, which measures at 7.18 signals a day — a different strategy, not a refinement

Implementasi MT5

Apa yang benar-benar dihitung dan digambar MetaTrader 5 — acuan bagi setiap aturan di halaman ini.

Catatan platform

Bekerja paling baik / gunakan dengan hati-hati

Tidak ada indikator yang merupakan keunggulan universal. Inilah di mana ORB membantu — dan di mana ia menyesatkan.

Bekerja paling baik

  • 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

Gunakan dengan hati-hati

  • 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

Buat strategi ORB

Hubungkan sinyal ke aturan masuk dan keluar, lalu ekspor EA MT5 yang dapat dikompilasi — tanpa kode.

  1. One opening-range node: anchor at 600 minutes, two range bars, first break only
  2. Signal greater than zero → Open Buy · SL 50 / TP 100
  3. Signal less than zero → Open Sell, same distances mirrored
  4. Shift 1, so the break is judged on a closed bar
  5. The timeframe is pinned to M15 rather than following the chart

Gabungkan ORB dengan indikator lain

Satu indikator jarang berdiri sendiri. Kombinasi ini menutupi titik buta ORB.

ORB + ATR

  1. ATR at 14
  2. Stop loss in ATR mode
  3. Signal greater than zero
Mengapa
The template's 50-pip stop is a guess that travels badly between instruments and between quiet and violent weeks. Sizing it from measured volatility instead makes the same box behave the same way everywhere. It also gives you the honest version of a filter people reach for here — requiring the range to be a sensible fraction of recent volatility, rather than trading whatever box the anchor happened to draw
Kondisi terbaik
Either regime

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.

Buka Builder →

ORB + Donchian Channel

  1. Donchian upper at 20
  2. Signal greater than zero
  3. Buy
Mengapa
Two breakout setups that disagree about what a level is. Donchian's line follows the last N bars and steps whenever the window rolls; this box is nailed to a clock and never moves once frozen. Putting them side by side answers whether a break matters because it cleared a recent extreme or because it left today's opening range — and on days when both agree the break is the same event seen two ways, which is a stronger read than either alone
Kondisi terbaik
Trending

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.

Buka Builder →

ORB + ADX

  1. ADX above 25
  2. Signal greater than zero
  3. Buy
Mengapa
The failure mode of a time-anchored box is the day that leaves it and immediately comes back, and no amount of tuning the anchor fixes that — the box was fine, the day was not directional. A trend-strength reading taken at the moment of the break is the cheapest available answer, and because this setup fires at most once a day, filtering it costs at most one trade rather than thinning a stream of signals
Kondisi terbaik
Trending

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.

Buka Builder →

Parameter

Nilai awal untuk divalidasi pada pasangan dan timeframe Anda sendiri — bukan pengaturan yang dijamin.

Parameter Default Rentang uji yang disarankan Fungsinya
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.

Preset awal

Template 600 / 2 bars / M15 A 30-minute opening range from 10:00, one trade a day
Wider box 600 / 4 bars / M15 A full hour of range; fewer breaks and later ones
Different session 480 / 2 bars / M15 Anchored at 08:00 instead — worth checking against the instrument's actual open

Contoh pasar

Di mana ORB bekerja, di mana ia gagal, dan bagaimana filter mengubah hasilnya.

Berhasil

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.

Gagal

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.

Difilter

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.

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.

Glossary

Istilah kunci