Skip to content

Free MT5 indicator

Opening Range Breakout

Draws the high, low and midpoint of a session's opening range and plots an arrow on the first candle that closes outside it.

Breakoutv1.0MetaTrader 5 (MQL5) Compiles with 0 errors Non-repainting signals Alerts

What it does

FXP Opening Range Breakout measures the high and low of the first minutes of a session, draws them as lines across the trading window, and marks the first candle that closes above or below that range with an arrow. By default it uses the first 30 minutes of the London session (08:00 London time) and watches for breakouts until 12:00.

You can switch the session to New York, Tokyo, UTC or plain server time, and change the range length and cut-off time.

How it works

  1. Each candle's time is converted to the chosen time zone (with your server GMT offset and daylight-saving rule when needed).
  2. Candles whose open time falls between the session open and open + range length build the range: the highest high and lowest low of those candles.
  3. After the range is complete and before the cut-off time, each closed candle is tested. A close above range high + buffer is a bullish breakout (blue arrow below the candle); a close below range low - buffer is a bearish breakout (red arrow above it).
  4. In "first breakout only" mode, the day is finished after one arrow. In "each side" mode, one arrow per direction is allowed, so a failed break followed by a break the other way is shown.
  5. Only closed candles are processed, so arrows never appear and disappear on the live candle.

How to use it

Copy the .ex5 file into MQL5/Indicators and attach it to an M1 to M15 chart. The chart timeframe must not be longer than the range (for a 30-minute range, use M30 or lower).

The opening range captures the first burst of session activity. A close outside it shows that one side won the opening auction. Typical plans place the stop on the opposite side of the range or at the midpoint and judge the target against the range height; the risk-reward calculator helps you check whether a trade is worth taking. Filtering breakouts by the higher-timeframe trend, or skipping days with major scheduled news, are common refinements.

Settings

InputDefaultWhat it changes
Time zone for the times belowLondonZone used to read the session times.
Session open (HH:MM)08:00Start of the range.
Opening range length (minutes)30Range duration.
Stop looking for breakouts at (HH:MM)12:00End of the breakout window.
Breakouts to markFirst onlyFirst breakout, or first on each side.
Extra distance beyond the range (pips)0.0Buffer that the close must clear.
Server GMT offset in winter2Broker server offset.
Server daylight-saving ruleUSSummer shift of the server clock.
Days of history to analyse20Number of past days.
Range high / low / midpoint colorsblue / red / greyLine colors.
Alert on breakoutfalseOne alert per bar.

Limitations

  • Many breakouts fail and return into the range, especially on quiet days. A buffer reduces, but does not remove, false breaks.
  • The range is built from candle open times, so a candle that starts inside the window counts fully even if part of it is outside.
  • A wrong server offset moves the range to the wrong candles.
  • Spreads often widen at session opens, which affects real entries. Trading involves substantial risk of loss.

Key inputs

Key inputs of Opening Range Breakout
InputDefaultDescription
Time zone for the times belowLondon (UK daylight saving)Server time, UTC, London, New York or Tokyo.
Session open (HH:MM)08:00Time at which the opening range starts.
Opening range length (minutes)30Duration of the opening range.
Stop looking for breakouts at (HH:MM)12:00No arrows after this time; the range lines end here.
Breakouts to markFirst breakout of the day onlyOnly the first breakout, or the first on each side.
Extra distance beyond the range (pips)0.0Requires the close to clear the range by this many pips.
Server GMT offset in winter (hours)2Broker server offset, used for non-server time zones.

Educational tools, not advice. Indicators and Expert Advisors describe price; they do not predict it, and past behaviour does not guarantee future results. Test everything on a demo account first and never risk money you cannot afford to lose. See our disclaimer.

Keep exploring

Related mt5 indicators