Time-Based Range Breakout Expert Advisor · Multi-Symbol · Prop Firm Ready
Golden Range Breakout EA is an Expert Advisor for MetaTrader 5 that trades breakouts from a user-defined time range. You specify a start and end time — such as the Asian session — and the EA silently tracks the high and low that forms during that window. The instant the range closes, it places a Buy Stop at the range high and a Sell Stop at the range low. Whichever level price breaks first, the EA captures that move and manages the trade through to completion.
The EA is highly configurable: three Take Profit modes, four Stop Loss types, two trailing stop styles, advanced drawdown protection, a news filter, and a prop firm randomizer. It works on XAUUSD (Gold) and is equally effective on forex pairs, indices, or any liquid instrument available on your broker.
Prop Firm Ready
Supports FTMO-style trailing drawdown, randomised entry delays, and per-firm preset configurations. See the Prop Firm Settings section for FTMO, MyForexFunds, and The5ers presets.
The EA follows a simple, repeatable daily process:
The range is visualised on the chart as a coloured box — blue while forming, green once active, and dimmed grey for historical ranges.
Custom Time Range
Define any start and end time for the range window. Default is 03:00–06:00 server time (Asian session). Fully adjustable to any session on any broker's server time.
Three Take Profit Modes
Range Multiple: TP is set at N × the range size from entry (e.g. 2× range). Fixed Points: a fixed distance in points from entry. Close on Time: all positions are closed at a scheduled hour regardless of profit.
Four Stop Loss Types
Range End: SL is placed at the opposite end of the range. ATR: SL distance is ATR × a multiplier (adapts to volatility). Fixed Points: a set point distance. % of Price: a percentage of the entry price.
Trailing Stop (ATR & Points)
ATR trail: SL dynamically follows price at ATR × multiplier, with optional break-even before the trail begins. Points trail: SL moves in fixed point increments once a trigger profit is reached.
Range Size Filter
Skips days where the range is smaller than RangeMinPct or larger than RangeMaxPct of the entry price, filtering out abnormally tight or unusually wide ranges that produce poor setups.
Advanced Drawdown Protection
Three measurement types per limit: Equity (unrealised losses count), Balance (closed losses only), Trailing (peak-to-trough, the FTMO model). Three halt actions: stop for 24h, stop until restart, or prohibit new orders but keep existing trades.
Prop Firm Randomizer
Introduces a random delay between range close and order placement (e.g. 1–10 seconds). Helps avoid pattern detection on platforms that flag EAs by consistent order timing.
News Filter
Fetches the weekly economic calendar automatically. Pauses trading around scheduled events filtered by impact level (High/Medium/Low) and currency. Refreshes hourly.
| Parameter | Default | Description |
|---|---|---|
| LicenseKey | "" | Your LazyAlgos license key. Required to activate the EA. |
| LotMode | LOT_AUTO | LOT_AUTO = risk-% based sizing. LOT_FIXED = manual fixed lot. |
| RiskPercent | 1.0 | Risk per trade as % of account balance. Used when LotMode = LOT_AUTO. |
| FixedLotSize | 0.01 | Fixed lot size. Used when LotMode = LOT_FIXED. |
| RangeStartHour / Minute | 3 / 0 | Start time of the range window (broker server time). |
| RangeEndHour / Minute | 6 / 0 | End time of the range window. Orders are placed at this time. |
| DeleteOrdersHour / Minute | 18 / 0 | Time to cancel any unfilled pending orders. |
| ClosePositions | true | Whether to force-close open positions at the scheduled close time. |
| ClosePositionsHour / Minute | 20 / 0 | Time to close open positions (if ClosePositions = true). |
| TpMode | TP_MULTIPLE | TP_MULTIPLE, TP_POINTS, or TP_TIMING (close on time). |
| TpMultiple | 2.0 | TP = range size × this value. Used with TP_MULTIPLE. |
| TpPoints | 200 | TP fixed distance in points. Used with TP_POINTS. |
| SlType | SL_RANGE | SL_RANGE, SL_ATR, SL_POINTS, or SL_PRICE_PCT. |
| SlPoints | 100 | SL fixed distance in points. Used with SL_POINTS. |
| SlPricePct | 0.20 | SL as % of entry price. Used with SL_PRICE_PCT. |
| AtrPeriod | 15 | ATR indicator period (Daily timeframe). Used with ATR SL/Trail. |
| AtrMultiplierSL | 1.5 | ATR × this value = SL distance. Used with SL_ATR. |
| TrailType | TRAIL_NONE | TRAIL_NONE, TRAIL_ATR, or TRAIL_POINTS. |
| TrailPoints | 50 | Trail distance in points. Used with TRAIL_POINTS. |
| TrailTriggerPoints | 30 | Minimum profit in points before trail activates. |
| AtrMultiplierTrail | 2.0 | ATR × this value = trail SL distance. Used with TRAIL_ATR. |
| AtrTriggerMultiplier | 1.0 | Trail activates when profit ≥ ATR × this value. |
| AtrBreakEvenFirst | true | Move SL to break-even before ATR trail begins. |
| UseRangeFilter | true | Enable range size filter. |
| RangeMinPct | 0.15 | Skip range if size < this % of price. |
| RangeMaxPct | 0.85 | Skip range if size > this % of price. |
| AllowBuy / AllowSell | true / true | Enable or disable long / short trades independently. |
| MaxTradesPerDay | 1 | Maximum trades per day (1 or 2). |
| MagicNumber | 111222 | Unique identifier for this EA instance. |
| MaxSlippagePoints | 10 | Maximum allowed slippage in points for order execution. |
| UseDailyDrawdown | true | Enable daily drawdown limit. |
| DailyDrawdownPct | 4.0 | Daily drawdown limit as % (e.g. 4 for FTMO). |
| DailyDDType | DD_EQUITY | DD_EQUITY, DD_BALANCE, or DD_TRAILING. |
| DailyHaltAction | CloseStopTradingFor24h | Action on daily limit breach. |
| UseTotalDrawdown | true | Enable total drawdown limit. |
| TotalDrawdownPct | 8.0 | Total drawdown limit as % (e.g. 8 for FTMO). |
| TotalDDType | DD_TRAILING | DD_EQUITY, DD_BALANCE, or DD_TRAILING. |
| TotalHaltAction | CloseStopTradingUntilRestart | Action on total limit breach. |
| UseRandomizer | false | Enable random entry delay. |
| RandomDelayMinSec | 1 | Minimum random delay in seconds. |
| RandomDelayMaxSec | 10 | Maximum random delay in seconds. |
| UseNewsFilter | true | Enable economic news filter. |
| NewsFilterCurrencies | "USD;EUR" | Semicolon-separated list of currencies to monitor. |
| NewsMinsBeforeEvent | 30 | Minutes to pause trading before news event. |
| NewsMinsAfterEvent | 15 | Minutes to resume trading after news event. |
| TradeMonday–TradeFriday | true | Enable or disable trading on each day of the week. |
| ShowPanel | true | Show or hide the on-chart dashboard panel. |
| ShowRangeBox | true | Draw the range boundary box on the chart. |
| DebugMode | false | Enable verbose journal logging for troubleshooting. |
Golden Range Breakout EA supports three drawdown measurement modes and three halt actions, making it compatible with the major prop firm rule structures. Below are recommended settings for each firm. Always verify against your firm's current rules before trading.
FTMO
Daily: 4% Equity · Total: 8% Trailing (peak-to-trough)| DailyDDType | DD_EQUITY |
| DailyDrawdownPct | 4.0 |
| DailyHaltAction | CloseStopTradingFor24h |
| TotalDDType | DD_TRAILING |
| TotalDrawdownPct | 8.0 |
| TotalHaltAction | CloseStopTradingUntilRestart |
| UseRandomizer | true |
MyForexFunds
Daily: 5% Equity · Total: 12% Equity| DailyDDType | DD_EQUITY |
| DailyDrawdownPct | 5.0 |
| DailyHaltAction | CloseStopTradingFor24h |
| TotalDDType | DD_EQUITY |
| TotalDrawdownPct | 12.0 |
| TotalHaltAction | CloseStopTradingUntilRestart |
The5ers
Daily: 4% Balance · Total: 6% Balance| DailyDDType | DD_BALANCE |
| DailyDrawdownPct | 4.0 |
| DailyHaltAction | CloseStopTradingFor24h |
| TotalDDType | DD_BALANCE |
| TotalDrawdownPct | 6.0 |
| TotalHaltAction | CloseStopTradingUntilRestart |
MQL5/Experts/.https://nfs.faireconomy.media.⚠️ VPS Required
The EA must be running at all times to track the range and place orders at the correct time. A 24/7 VPS is required for live trading. We recommend IC Markets' partnered VPS providers or DatabaseMart for low-latency hosting.
Choosing the right time range is the most important configuration decision. The goal is to define a period of consolidation before a significant directional move.
Asian Session (03:00–06:00) — Default for XAUUSD
Gold typically consolidates during the Asian session before the London open drives a directional move. This is the recommended default range for XAUUSD. Use broker server time — subtract or add hours based on your broker's UTC offset.
Full Asian / Early London (00:00–07:00)
A wider range window that captures more consolidation. Tends to produce fewer but higher-quality signals. Suitable when you want to filter out smaller intraday ranges.
London Pre-Market (07:00–09:00) — Forex Pairs
For EUR/USD, GBP/USD, and other London-driven pairs, a tight pre-market range followed by a clean London open breakout can produce excellent R:R trades.
Range Size Filter
If the range is too small (e.g. below 0.15% of price), the risk/reward of the breakout is poor. If too large (e.g. above 0.85%), you risk entering a move that is already overextended. The default filter values work well for XAUUSD but may need adjustment for forex or indices.
Trading foreign exchange and CFDs carries a high level of risk and may not be suitable for all investors. Past performance, including backtested results, is not indicative of future results.
Golden Range Breakout EA is a tool. It does not guarantee profits. Breakout strategies can produce false breakouts and losses during ranging or choppy market conditions. Only trade with capital you can afford to lose entirely.
LazyAlgos and the developer of this EA are not financial advisors. Nothing on this platform constitutes financial advice.
Ready to get started with Golden Range Breakout EA?
Purchase a license and be trading in minutes.