The system identifies a price range over a specific duration and enters positions when the market breaks through these levels. It supports multiple entry methods including market orders on candle close, resting stop orders, or limit retests. Risk management features include automated lot sizing based on account risk percentage, adjustable stop losses relative to range size, and take profit targets defined by reward-to-risk multiples. It also provides time-based exits and filters for spread and range volatility.
Timezone-aware session range calculation with daylight savings support
Multiple entry modes including market on close and limit retests
Automated lot sizing based on account balance risk percentage
Time-based trade management with maximum hold and force close settings
Customizable stop loss movement based on reward-to-risk thresholds
Read from ORB.mq5. Defaults are the author's; change them in the EA's Inputs tab.
Name
Type
Default
Description
InpShowPanel
bool
true
Show the on-chart control panel
InpTimeZone
ENUM_SESSION_TZ
TZ_UTC
Session timezone
InpStartHour
int
0
Session start hour (in that zone)
InpStartMinute
int
0
Session start minute
InpRangeMinutes
int
15
Range length (minutes)
InpSignalTF
ENUM_TIMEFRAMES
PERIOD_M1
Signal timeframe
InpNoEntryAfterMin
int
15
No entry after (min from range close, 0=off)
InpForceCloseMin
int
360
Force close all (min from range close, 0=off)
InpMaxHoldMinutes
int
90
Max hold per position (min from its fill, 0=off)
InpWinterOffset
int
2
Broker winter offset (hours ahead of UTC)
InpFollowsUSDST
bool
true
Broker uses US DST dates (false = EU)
InpEntryMode
ENUM_ENTRY_MODE
ENTRY_MARKET_ON_CLOSE
Entry mode
Show all 40 inputs
Name
Type
Default
Description
InpMaxTradesPerDay
int
1
Max trades per day
InpMaxSpreadPoints
double
0
Max spread (points, 0=off)
InpMinRangePoints
double
0
Min range size (points, 0=off)
InpMinRangePercent
double
0.14
Min range size (percent of price, 0=off)
InpMaxRangePoints
double
0
Max range size (points, 0=off)
InpRangeLookback
int
0
Rolling filter: sessions to compare against (0=off)
InpMinRangeRatio
double
1.25
Rolling filter: range must be this x the median
InpMinClosePos
double
0.50
Trade only the half the range closed in (0.50=midpoint, 0=off)
InpYdayFilter
bool
false
Skip breaks against yesterday's daily candle (off: not in the published config)
InpYdayMinBody
double
30.0
...only when that candle's body is at least this (price units)
InpTradeLongs
bool
true
Trade upside breaks
InpTradeShorts
bool
true
Trade downside breaks
InpTradeMon
bool
true
Trade Monday
InpTradeTue
bool
true
Trade Tuesday
InpTradeWed
bool
true
Trade Wednesday
InpTradeThu
bool
true
Trade Thursday
InpTradeFri
bool
false
Trade Friday (off: only losing day of the week)
InpSLMode
ENUM_SL_MODE
SL_PERCENT_OF_RANGE
SL mode
InpSLPercentOfRange
double
50.0
SL percent of range (50=midpoint, 100=far side)
InpSLFixedPoints
double
0
SL fixed distance (points)
InpStopMoveAtR
double
0.5
Move stop when trade reaches (R, 0=off)
InpStopMoveToR
double
-0.5
Move stop to (R: 0=entry, -0.5=half risk left)
InpTPMode
ENUM_TP_MODE
TP_RR
TP mode
InpRR
double
2.0
Reward:risk multiple
InpTPFixedPoints
double
0
TP fixed distance (points)
InpTPRangeMultiple
double
1.0
TP as multiple of range size
InpLotMode
ENUM_LOT_MODE
LOT_RISK_PERCENT
Lot sizing mode
InpLots
double
0.01
Fixed lot size
How to install it
1Download the sourceUse "Download source (.zip)" above, or clone anas1412/orb-mt5 from GitHub, and unzip it.
2Open the data folderIn MetaTrader choose File, then Open Data Folder, and go to MQL5/Experts.
3Copy the filesCopy the .mq5 file into Experts, and any .mqh files into the Include folder the code expects.
4Compile in MetaEditorOpen the file in MetaEditor and press Compile. Fix any missing includes the compiler reports.
5Test before you tradeRun it in the Strategy Tester, then attach it to a demo chart and allow algorithmic trading.
Third-party code. ForexR did not write, test or endorse this EA, and the summary above was generated automatically from its README and code. ForexR lists only repositories with readable source code and never hosts files. Read the code, backtest it and use a demo account first; automated trading can lose money quickly.
This MetaTrader 5 expert advisor implements an open range breakout strategy specifically designed for gold trading on the hourly timeframe. It identifies the high and low of the initial trading hour and establishes a definitive range after a user-defined consolidation period. Trades are triggered when price breaks thro
Nyao Scalper is an automated scalping robot for MetaTrader 5 that utilizes a multi-factor weighted scoring system to identify trade opportunities. It evaluates trend alignment through EMA crossovers, momentum via RSI, and price action through wick rejection and candle body analysis. The EA manages risk with adaptive AT
This MetaTrader 5 expert advisor specializes in trading Gold (XAUUSD) by targeting volatility during the New York session. It utilizes an Average True Range (ATR) indicator to identify market trends and determine entry levels for limit orders. Risk management includes fixed stop loss parameters and dynamic trailing sto
Black XAU is an automated trading robot for MetaTrader 5, specifically designed for gold. It utilizes a multi-timeframe breakout and retest strategy, identifying trading zones based on initial H4 market structure. Entries are triggered on the M5 timeframe when price retests a confirmed breakout level. The expert adviso
This MetaTrader 5 expert advisor implements a box breakout strategy designed for the foreign exchange market. The robot identifies price ranges during specific time windows and enters trades upon a breakout. It features a trend filter using fast and slow moving averages to align entries with broader market direction. R
First Candle Breakout is a MetaTrader 5 expert advisor designed to trade the breakout of the high or low of the first candle within a specified period. While traditionally used with the first 60-minute candle, the software allows users to configure any timeframe for the initial range. The robot enters a buy position wh