Expert Advisors • Indicators • Scripts • Libraries

MQL.RobotFX.org is the biggest collection of MetaTrader expert advisors (MT5 & MT4), indicators, scripts and libraries that can be used to improve trading results, minimize risks or simply automate trading tasks

Metatrader 5 Expert Advisor | ORB Risk Managed - Opening Range Breakout with Account Protection | Free Down…

Explore the latest free tools from the MQL5 community. Here's a new indicator, expert advisor, or script for MetaTrader.

Idea
The EA marks the high and low of the first minutes after the session open (the "opening range"). It then places a Buy Stop above and a Sell Stop below the range. When one order is filled, the other is deleted (OCO). Only one trade is taken per day, and all positions are closed before the session end.

Image for ORB Risk Managed - Opening Range Breakout with Account Protection

Recommended symbol and timeframe
Built and tested on a US100 / Nasdaq 100 index CFD. Works on any chart timeframe, since the range is always calculated from M1 data. Default times assume a GMT+3 server (US session open 16:30 server time). Adjust the time inputs to your broker's server time.

Watch in-depth trading tutorials and EA reviews on the RobotFX YouTube channel. Subscribe for free tips.

Main inputs

  • Range start, range length, last entry time, close-all time (server time)
  • Trade direction: both, long only, short only
  • Risk per trade (% of balance), take profit as R multiple, stop distance as a fraction of the range
  • ATR filter: skip days with an unusually small or large range
  • Daily loss limit (%), maximum total drawdown (%), initial balance

Account protection

  • Position size calculated from risk and stop distance. If even the minimum lot exceeds the allowed risk, the trade is skipped.
  • Daily loss limit: closes all positions and stops trading for the day.
  • Maximum drawdown limit: closes all positions and stops the EA.
  • Positions are never carried into the next day.

Important
This is an educational template showing breakout logic and risk management structure. It is not a profit-guaranteed system. Always test in the Strategy Tester and on a demo account before any live use.


Build better strategies with RobotFX professional tools – check them out.

77967

Best MetaTrader Indicators + Profitable Expert Advisors