Back to Golden Range Breakout EA
DocumentationV1.30Updated May 2025

Golden Range Breakout EA

Time-Based Range Breakout Expert Advisor · Multi-Symbol · Prop Firm Ready

Overview

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.

How It Works

The EA follows a simple, repeatable daily process:

  1. Range Formation — from RangeStartHour to RangeEndHour, the EA tracks the highest high and lowest low of every tick.
  2. Order Placement — at RangeEndHour, a Buy Stop is placed at the range high and a Sell Stop at the range low. If a randomizer delay is set, placement is offset by a random number of seconds.
  3. Breakout Entry — price breaks above or below the range, triggering one of the pending orders. The other is cancelled immediately.
  4. Trade Management — Stop Loss, Take Profit, and trailing stop are applied automatically based on your settings.
  5. Daily Reset — at DeleteOrdersHour, any unfilled pending orders are cancelled. At ClosePositionsHour (if enabled), any open positions are closed.

The range is visualised on the chart as a coloured box — blue while forming, green once active, and dimmed grey for historical ranges.

Key Features

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.

Input Parameters

ParameterDefaultDescription
LicenseKey""Your LazyAlgos license key. Required to activate the EA.
LotModeLOT_AUTOLOT_AUTO = risk-% based sizing. LOT_FIXED = manual fixed lot.
RiskPercent1.0Risk per trade as % of account balance. Used when LotMode = LOT_AUTO.
FixedLotSize0.01Fixed lot size. Used when LotMode = LOT_FIXED.
RangeStartHour / Minute3 / 0Start time of the range window (broker server time).
RangeEndHour / Minute6 / 0End time of the range window. Orders are placed at this time.
DeleteOrdersHour / Minute18 / 0Time to cancel any unfilled pending orders.
ClosePositionstrueWhether to force-close open positions at the scheduled close time.
ClosePositionsHour / Minute20 / 0Time to close open positions (if ClosePositions = true).
TpModeTP_MULTIPLETP_MULTIPLE, TP_POINTS, or TP_TIMING (close on time).
TpMultiple2.0TP = range size × this value. Used with TP_MULTIPLE.
TpPoints200TP fixed distance in points. Used with TP_POINTS.
SlTypeSL_RANGESL_RANGE, SL_ATR, SL_POINTS, or SL_PRICE_PCT.
SlPoints100SL fixed distance in points. Used with SL_POINTS.
SlPricePct0.20SL as % of entry price. Used with SL_PRICE_PCT.
AtrPeriod15ATR indicator period (Daily timeframe). Used with ATR SL/Trail.
AtrMultiplierSL1.5ATR × this value = SL distance. Used with SL_ATR.
TrailTypeTRAIL_NONETRAIL_NONE, TRAIL_ATR, or TRAIL_POINTS.
TrailPoints50Trail distance in points. Used with TRAIL_POINTS.
TrailTriggerPoints30Minimum profit in points before trail activates.
AtrMultiplierTrail2.0ATR × this value = trail SL distance. Used with TRAIL_ATR.
AtrTriggerMultiplier1.0Trail activates when profit ≥ ATR × this value.
AtrBreakEvenFirsttrueMove SL to break-even before ATR trail begins.
UseRangeFiltertrueEnable range size filter.
RangeMinPct0.15Skip range if size < this % of price.
RangeMaxPct0.85Skip range if size > this % of price.
AllowBuy / AllowSelltrue / trueEnable or disable long / short trades independently.
MaxTradesPerDay1Maximum trades per day (1 or 2).
MagicNumber111222Unique identifier for this EA instance.
MaxSlippagePoints10Maximum allowed slippage in points for order execution.
UseDailyDrawdowntrueEnable daily drawdown limit.
DailyDrawdownPct4.0Daily drawdown limit as % (e.g. 4 for FTMO).
DailyDDTypeDD_EQUITYDD_EQUITY, DD_BALANCE, or DD_TRAILING.
DailyHaltActionCloseStopTradingFor24hAction on daily limit breach.
UseTotalDrawdowntrueEnable total drawdown limit.
TotalDrawdownPct8.0Total drawdown limit as % (e.g. 8 for FTMO).
TotalDDTypeDD_TRAILINGDD_EQUITY, DD_BALANCE, or DD_TRAILING.
TotalHaltActionCloseStopTradingUntilRestartAction on total limit breach.
UseRandomizerfalseEnable random entry delay.
RandomDelayMinSec1Minimum random delay in seconds.
RandomDelayMaxSec10Maximum random delay in seconds.
UseNewsFiltertrueEnable economic news filter.
NewsFilterCurrencies"USD;EUR"Semicolon-separated list of currencies to monitor.
NewsMinsBeforeEvent30Minutes to pause trading before news event.
NewsMinsAfterEvent15Minutes to resume trading after news event.
TradeMonday–TradeFridaytrueEnable or disable trading on each day of the week.
ShowPaneltrueShow or hide the on-chart dashboard panel.
ShowRangeBoxtrueDraw the range boundary box on the chart.
DebugModefalseEnable verbose journal logging for troubleshooting.

Prop Firm Settings

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)
DailyDDTypeDD_EQUITY
DailyDrawdownPct4.0
DailyHaltActionCloseStopTradingFor24h
TotalDDTypeDD_TRAILING
TotalDrawdownPct8.0
TotalHaltActionCloseStopTradingUntilRestart
UseRandomizertrue

MyForexFunds

Daily: 5% Equity · Total: 12% Equity
DailyDDTypeDD_EQUITY
DailyDrawdownPct5.0
DailyHaltActionCloseStopTradingFor24h
TotalDDTypeDD_EQUITY
TotalDrawdownPct12.0
TotalHaltActionCloseStopTradingUntilRestart

The5ers

Daily: 4% Balance · Total: 6% Balance
DailyDDTypeDD_BALANCE
DailyDrawdownPct4.0
DailyHaltActionCloseStopTradingFor24h
TotalDDTypeDD_BALANCE
TotalDrawdownPct6.0
TotalHaltActionCloseStopTradingUntilRestart

Installation & Setup

  1. Download Golden Range Breakout EA.ex5 from the Downloads page in your dashboard.
  2. Copy the file to your MT5 Experts folder: MQL5/Experts/.
  3. If using the news filter, open MT5 → Tools → Options → Expert Advisors → Allow WebRequest for listed URLs → add https://nfs.faireconomy.media.
  4. Restart MT5, open your chart on M1 timeframe, and attach Golden Range Breakout EA from the Navigator.
  5. Enter your LicenseKey in the inputs. The key will bind to your MT5 account number on first run.
  6. Configure your range time (server time), risk settings, TP/SL mode, and drawdown limits.
  7. Enable AutoTrading (the green play button in MT5 toolbar).

⚠️ 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.

Range Strategy Guide

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.

Risk Disclaimer

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.