GoldRangerPro
- Experts
- Version: 1.0
- Activations: 5
GoldRangerPro
A simple overnight breakout EA for Gold (XAUUSD) on the M15 timeframe.
GoldRangerPro trades the first clean breakout of the overnight range on gold. It places one buy stop above the range and one sell stop below the range. The first order that fills cancels the other, and the EA manages the position until stop-loss or the end-of-day close.
No martingale. No grid. No averaging. One trade per day. Clear rules.
Why traders choose GoldRangerPro
-
Simple rules. The strategy is easy to understand. You can follow every decision the EA makes.
-
One trade per day. After the first entry, the EA stops for the day. No revenge trading. No compounding into losses.
-
Risk-based position size. Lots are calculated from your equity and your stop distance, not fixed. Bigger account → bigger trade. Smaller account → smaller trade.
-
Stop-loss on the real fill price. Many EAs place the stop at the pending order level. GoldRangerPro recalculates the stop from the actual fill price, so your risk matches what you configured.
-
Optional partial take-profit. You can close part of the position at a chosen profit level and let the rest run to the stop or the end-of-day exit.
-
Prop-firm safety. A built-in daily drawdown guard closes all positions if your intraday drawdown reaches a level you set. Recommended for FTMO, MFF, E8,Funding Pips and The5ers challenges.
-
Leverage cap. The EA never opens a position larger than a multiple of your equity, even if the broker allows it.
-
One trade at a time. No hedging. No opposite orders. No hidden exposure.
-
Chart visualization. Range high, range low, and the partial take-profit level are drawn on the chart for easy monitoring.
-
No news interference — the EA does not place new trades outside the configured session hours.
How the strategy works
-
Between Range Start Hour and Range End Hour , the EA records the highest high and lowest low of gold.
-
At the close of the first bar after the range end, it places a Buy Stop at the range high and a Sell Stop at the range low.
-
When one order fills, the other is cancelled immediately.
-
The stop-loss is placed based on the actual fill price (default 1% of entry).
-
If partial take-profit is enabled, part of the position is closed at a chosen R multiple.
-
The remaining position is closed at the configured Close Hour (default 20:00 broker time) or by the stop-loss, whichever comes first.
-
The EA waits for the next day.
Inputs
Below is the full list of parameters. Each one is described in plain language.
Main Settings
| Parameter | Default | Description |
|---|---|---|
| InpRangeStartHour | 0 | Hour (broker server time) when the overnight range begins. |
| InpRangeEndHour | 7 | Hour when the range is finished and trading starts. |
| InpCloseHour | 20 | Hour when any open position is force-closed. |
| InpMagicNumber | 20251106 | Unique ID for this EA instance. Change it if you run multiple copies on the same account. |
Risk Management
| Parameter | Default | Description |
|---|---|---|
| InpSLMode | SL_PCT | Stop-loss mode: percentage of entry price, or opposite range boundary. |
| InpSLPct | 1.0 | Stop-loss distance as a percentage of the entry price (used when SL_PCT ). Default 1.0 = 1%. |
| InpSizeMode | SIZE_RISK | Position sizing method: risk % of equity, or fixed lots. |
| InpRiskPct | 1.0 | Percentage of equity to risk per trade (used when SIZE_RISK ). Default 1.0 = 1%. |
| InpFixedLots | 0.10 | Fixed position size in lots (used when SIZE_FIXED ). |
| InpMaxLeverage | 10.0 | Maximum position notional divided by equity. Prevents oversized trades. Default 10× equity. |
| InpLotStepOverride | 0.0 | Custom lot step. Leave 0 to use the broker's default lot step. |
| InpGuardOn | false | Enable daily drawdown guard. Recommended for prop-firm accounts. |
| InpGuardDD | 4.0 | Daily drawdown limit as a percentage. The EA closes all positions when reached. Default 4%. |
Partial Take-Profit
| Parameter | Default | Description |
|---|---|---|
| InpPartialTPEnable | true | Enable partial take-profit. |
| InpPartialTPRR | 1.0 | Trigger partial close when price reaches this many times the stop distance. Default 1.0 = 1R. |
| InpPartialTPPct | 50.0 | Percentage of the position to close at the partial take-profit. Default 50%. |
Trading
| Parameter | Default | Description |
|---|---|---|
| InpSlippage | 30 | Maximum slippage allowed on order execution, in points. |
| InpMaxSpread | 0.0 | Reject orders when the spread is wider than this value (in points). 0 = disabled. |
Chart Visuals
| Parameter | Default | Description |
|---|---|---|
| InpShowRangeLines | true | Draw range high and range low lines on the chart. |
| InpRangeHighColor | DodgerBlue | Color of the range high line. |
| InpRangeLowColor | DodgerBlue | Color of the range low line. |
| InpRangeLineWidth | 2 | Width of the range lines. |
| InpShowPartialLine | true | Draw a dashed line at the partial take-profit level while a position is open. |
Recommended settings
Prop-firm challenge ($100,000 account):
Update the input tab as of below:
InpRiskPct = 0.20 InpSLPct = 0.8 InpGuardOn = true InpGuardDD = 2.5 InpMaxLeverage = 5.0 InpPartialTPEnable = false InpMaxSpread = 30
Personal account ($10,000+):
Update the input tab as of below:
InpRiskPct = 0.50 InpSLPct = 1.0 InpGuardOn = true InpGuardDD = 4.0 InpMaxLeverage = 10.0 InpPartialTPEnable = false InpMaxSpread = 30
Aggressive ($10,000+):
Update the input tab as of below:
InpRiskPct = 1.0 InpSLPct = 1.0 InpGuardOn = true InpGuardDD = 4.0 InpMaxLeverage = 10.0 InpPartialTPEnable = true InpPartialTPRR = 1.5 InpPartialTPPct = 50.0
You can also test different combination in Input tab as you need.
Requirements
-
MetaTrader 5 (build 4000 or newer)
-
Any gold symbol with SYMBOL_VOLUME_MIN = 0.01 (XAUUSD, GOLD, XAUUSDm, etc.)
-
M15 timeframe recommended (1m to 60m works if it divides an hour evenly)
-
Algo Trading enabled in the MT5 terminal
Recommended minimum account size: $5,000 for safe trading.
What is included
-
GoldRangerPro.ex5 — the compiled Expert Advisor
-
Free updates and bug fixes for all buyers
Risk disclaimer
Trading gold and other leveraged instruments carries substantial risk. Past performance does not guarantee future results. Backtest results are simulations, not live trading. Test on a demo account for at least 3 months before using real money. Never risk money you cannot afford to lose.
Support
For setup help, presets, or bug reports, contact us through the MQL5 message system. Replies within 24 hours on trading days.
