The first hour of a session often sets the day’s early range. The opening range breakout indicator records the high and low from 08:00 broker time for sixty minutes, draws both, and marks the first close that clears either edge by a small buffer. Each side gets at most one mark per day.
This build ships as a compiled .ex4 for MT4 and .ex5 for MT5; the screenshots below come from EURUSD H1.
| Platforms | MT4 (.ex4) + MT5 (.ex5) |
|---|---|
| Chart window | Main price chart |
| Plots | 4: ORB High, ORB Low, ORB Buy, ORB Sell |
| Alerts | popup, push notification, email, sound |
| Inputs | 12 |
Output you can see
Two range lines and two marks on price.
`ORB High` traces dodger blue at width 2.
`ORB Low` traces orange red at width 2.
`ORB Buy` prints lime at width 3.
`ORB Sell` prints red at width 3.
A comment shows the session settings.
- ORB High: line, dodger blue, width 2
- ORB Low: line, orange red, width 2
- ORB Buy: arrow, lime, width 3, arrow code 233
- ORB Sell: arrow, red, width 3, arrow code 234

What the formula does
Session
`InpSessionStartHour` `8` and `InpSessionStartMin` `0` set the open in broker time. `InpRangeMinutes` `60` sets the range length.
Range
The highest high and lowest low inside that window become the day’s lines.
Break
A close beyond the edge by `InpBreakoutBufferPts` `2` points prints a mark. `InpOneSignalPerDay` `true` allows one per side each day.
On a live chart
Blue marks the range high, orange red the low.
Lines start once the range window closes.
A lime mark is the first close above the range.
A red mark is the first close below it.
Later breaks that day are ignored.
`InpArrowOffsetPts` `10` spaces the marks.
Alert channels in this build: popup, push notification, email and sound, one message per closed bar.
First breaks report once each. `InpEnableAlerts` is the master switch; the popup and the sound playing `InpSoundFile` start on, and the other routes do not.
Every Opening Range Breakout Indicator input
Core settings
| Setting | What it does | Default |
|---|---|---|
InpSessionStartHour |
Session open hour (broker time). Session open hour, broker time, `8`. | 8 |
InpSessionStartMin |
Session open minute. Session open minute, `0`. | 0 |
InpRangeMinutes |
Opening range length (minutes). Range length in minutes, `60`. | 60 |
InpBreakoutBufferPts |
Extra points beyond range for valid breakout. Extra points past the edge, `2`. | 2 |
InpOneSignalPerDay |
Only first breakout per side per day. One mark per side per day, `true`. | on |
Display settings
| Setting | What it does | Default |
|---|---|---|
InpArrowOffsetPts |
Arrow distance from candle (points). Mark gap in points, `10`. | 10 |
Alert settings
| Setting | What it does | Default |
|---|---|---|
InpEnableAlerts |
Master alert switch. Master alert switch, `true`. | on |
InpEnablePopup |
Popup alerts. Popup, `true`. | on |
InpEnablePush |
Push notifications. Phone route, `false`. | off |
InpEnableEmail |
Email alerts. | off |
InpEnableSound |
Sound alert. Sound, ships on, `true`. | on |
InpSoundFile |
(see inputs panel) | alert.wav |

Where the defaults make sense
Opening ranges work best on M5 to M30 charts. The hourly EURUSD screenshot shows one range per day. Set the start hour to your broker’s London or New York open.
Where it stops working
Broker time zones shift the session.
Many first breaks reverse into the range.
A 2-point buffer is tight.
The sound route ships on.
Copy the compiled Opening Range Breakout Indicator file into your MQL4/Indicators folder, and the MT5 build into MQL5/Indicators, then restart the terminal and drag it onto a chart. The step-by-step guide with screenshots is at how to install MT4 and MT5 indicators.
Related on forexmt4systems.com: Range Trading Strategy.
Download the Opening Range Breakout Indicator for MT4 and MT5
The zip holds the compiled Opening Range Breakout Indicator build for MT4 and MT5, plus a short README. Compiled files only, no source. Enter your email below and the download link arrives in your inbox.
Download this indicator free
Enter your email and the file is yours. You also get the full MT4 and MT5 library.
FAQ
What does InpSessionStartHour 8 refer to?
Eight o’clock in your broker’s server time, not your local time. Check the broker’s time zone and set the hour to match the session open you want.
How long is the range with InpRangeMinutes 60?
One hour from the session open. On an hourly chart that is a single bar; on M15 it spans four bars, which gives a more detailed range.
What does InpOneSignalPerDay stop?
Repeat marks on the same side after the first break. Without it, price chopping around the range edge could print several marks in one session.
Why add InpBreakoutBufferPts 2?
It stops a close that only touches the edge from counting. The close must clear the range by two points, a small margin against noise.
Are results guaranteed?
No. Trading involves risk. Results are not guaranteed; past performance is not indicative of future results. Use the Opening Range Breakout Indicator as one input. Always backtest before trading live.
Category: this is part of our Signal and Forecast collection. Browse more Signal and Forecast for MetaTrader, or explore every MT4 indicator and MT5 indicator on the site.
External references
- Learn more about the underlying method in Range expansion index on Wikipedia.
- For wider market background, see Narrow Range Day Nr7 at StockCharts ChartSchool.
