Trading strategy Logic and function tested
GDI Reversal Scalper EA
An M1 exhaustion scalper: a poke past the Bollinger Band in a quiet market, with RSI turning and a rejection candle.
- Version2.00
- Last updated2026-12-05
- SymbolGold (XAUUSD) only
- TimeframeM1
Download GDI_Reversal_Scalper_EA.ex5 ↓ Settings file (.set) ↓ Get a GDI Key (7-day free trial) →
What it is
It does not trade trend reversals. It looks for small loss-of-momentum reversals that appear when the market goes quiet and price pokes just past a Bollinger Band before snapping back.
The three operating modes
| Mode | What the EA does |
|---|---|
| Alert only (default) | Never opens a position. Each entry signal raises an alert (once per bar and direction) in the Experts tab, as a pop-up and, if you switch it on, as a phone notification. Positions opened earlier by the EA keep their server stop and the EA may still close them. |
| Auto trading standard | At most one position or pending order of this EA at a time, and never more than one entry in the same trading session. The strategy's own stop, target and trade management apply. |
| Auto trading light grid | The first entry follows the standard rules. The EA may then add layers at a fixed distance, with the same lot and in the same direction, up to the maximum number of layers, under one common stop, one basket target and a maximum basket loss. |
The selector is the first input in the window (InpOperatingMode). There is no martingale in any mode (the lot is never increased after a loss) and no hedging (the EA never opens against an open gold position or order on the account). Where the strategy text allows several trades a day or several open positions, the operating mode is the stricter rule and wins.
The strategy: how it decides
- Setup: price beyond the Bollinger Band while the ADX is low (no strong trend) and the band width is narrow compared with the ATR.
- Confirmation: RSI(7) turning from 25 or 75, and a rejection candle with a wick larger than the body.
- Small stops and targets (stop 1.0 ATR, target 0.5 ATR) with a minimum, and the symbol's minimum lot by default.
- Controls: cooldown of 3 bars, 15 trades a day, break-even and trailing, spread cap 35 points, news filter.
Who it suits
Scalpers who want small, frequent trades in quiet conditions.
Who it does not suit
Trending markets: a low-ADX filter keeps it idle there, but a quiet market can still break out.
What happens behind the scenes
- On start the EA checks that the chart is gold (XAUUSD with any broker suffix, or GOLD); on any other symbol it stops with a message and does not trade.
- It verifies the GDI Key with sync.golddailyinsights.com when it starts and again periodically. Without a valid key it sends no order and no signal alert. A lapsed key never closes positions that are already open.
- The strategy evaluates its signal and its own filters. Every order, market or pending, then passes through one common gate, which checks in turn: gold and chart symbol, licence, operating mode, magic number, real-account confirmation, one order at a time, one entry per session, grid pause, no opposite gold position, and the lot ceiling and broker lot step.
- If the gate refuses, nothing is sent and the reason is written in the Experts tab.
- The session already used is kept in memory, in a terminal global variable named GDIS_account_magic and in the deal history.
- In light grid mode the common stop, basket target, basket loss limit and new layers are managed on every tick, so the terminal must stay open and connected. The common stop is also on the server.
Trading sessions and the one-entry rule
Sessions follow your broker's server time. The defaults suit brokers on GMT+2 or GMT+3 and can be changed with InpSessLondonHour and InpSessNewYorkHour.
| Session | Server time (default) |
|---|---|
| Asia | 00:00 to 10:00 |
| London | 10:00 to 15:00 |
| New York | 15:00 to 24:00 |
In both automatic modes there is at most one new entry per session, even if the first trade has already closed. The EA checks its memory and the account's deal history, so restarting the terminal does not reset the count. If the history cannot be read, it does not open.
The light grid in detail
- Layer distance:
InpLgStepPoints, 800 points by default. For these inputs 100 points are always 1.00 USD of gold price, whatever the number of digits of your broker. - Layers:
InpLgMaxLevels, 3 by default including the first order (2 to 5). Every layer has exactly the lot of the first order and the same direction. - Common stop: placed on the server
InpLgStopPointsbeyond the last possible layer, measured from the first order. Every layer carries it. - Basket target:
InpLgTargetPointsfrom the volume-weighted average price. It moves as layers are added and is also set on the server. - Maximum basket loss:
InpLgMaxLossPctof the balance (2 per cent). When the floating result reaches it, all layers are closed. - Timing and trend: at least
InpLgMinMinutesbetween layers, and no new layer while ADX onInpLgTrendTfis at or aboveInpLgTrendAdxwith the opposite directional line on top. If the reading is not available, no layer is added. - Pause: after a basket is stopped out, no new entry for
InpLgPauseHourshours. - While the grid is active, the strategy's own partial closes and stop moves are not applied. A strategy exit signal closes the whole basket.
- A hedging account is required. On a netting account the EA behaves as in standard mode.
Worked example of the distances (not a forecast)
A buy of 0.01 lots at 4,000.00 with the defaults: layers can be added at 3,992.00 and 3,984.00, and the common stop sits at 3,976.00. With a 100-ounce contract, the three layers stopped there would lose about 24 + 16 + 8 = 48 USD, before spread, swap and slippage. If the 2 per cent basket limit is smaller than that on your balance, the basket is closed earlier. With only the first order open, the target is 4,006.00; with two layers the average is 3,996.00 and the target 4,002.00.
A light grid increases the amount at risk while price moves against you. Gaps and slippage can make a loss larger than the figures above.
Requirements
| Requirement | Detail |
|---|---|
| Platform | MetaTrader 5 (.ex5 file; MetaTrader 4 is not supported). |
| Symbol | XAUUSD with any broker suffix, or GOLD. |
| Timeframe | M1 |
| Account type | Hedging account for the light grid. Alert only and standard also run on netting accounts. |
| GDI Key | Required. The file itself is free to download. |
| Terminal settings | Tools > Options > Expert Advisors: tick 'Allow WebRequest for listed URL' and add https://sync.golddailyinsights.com. For the automatic modes, allow Algo Trading. |
| Computer | The terminal must stay open and connected while the EA works; a VPS is the usual choice. |
Download and licence
You receive the compiled file only: GDI_Reversal_Scalper_EA.ex5, with a settings file holding every input at its default and an empty key. The EA works only with a valid GDI Key typed into InpGdiKey.
Compiled with MetaEditor: 0 errors, 0 warnings. SHA-256 of the .ex5 file: 82b4688f0b5ca19195a02c30bc6f9fae69b275f1cdda2b50f5f4bddcc20ac91c.
How the key works: GDI Key and licence check.
Installation and first run
- Copy the
.ex5file intoMQL5/Expertsin your MetaTrader 5 data folder (File > Open Data Folder) and refresh the Navigator. - In Tools > Options > Expert Advisors, tick 'Allow WebRequest for listed URL' and add
https://sync.golddailyinsights.com. - Open an XAUUSD chart and drag the EA onto it. On the Inputs tab press Load and choose the
.setfile. - Paste your GDI Key into
InpGdiKey. LeaveInpOperatingModeon Alert only for the first sessions. - Check the Experts tab: the licence is confirmed and the operating mode is shown.
- When you choose an automatic mode, start with the smallest lot, preferably on a demo account, and tick the Common tab option 'Allow Algo Trading'. A real account also needs
InpModeAllowRealset to true.
Running your own backtest
Open the Strategy Tester (Ctrl+R), choose the EA, an XAUUSD symbol and a period, load the settings file and select the operating mode you want to study. The key is not checked in the tester. The economic calendar and push notifications do not work inside the tester, so news filters behave differently there. Backtests are in progress and will be published on each EA's page. Backtesting is the user's own responsibility: whoever pays for the key may use and test every product.
Inputs: the complete manual (55 inputs)
Listed in the order of the MetaTrader inputs window. Distances marked 'points' are broker points unless the text says otherwise.
Operating mode
| Input | Default | What it does and how to use it |
|---|---|---|
InpOperatingMode | 1) ALERT ONLY: opens no order, only sends alerts | Operating mode. Choose this first. Alert only is the safe start. Options: 1) ALERT ONLY: opens no order, only sends alerts; 2) AUTO TRADING STANDARD: one order, one entry per session; 3) AUTO TRADING LIGHT GRID: capped layers, same lot. |
InpModeAllowReal | false | I confirm this is a real account I want to trade. Leave false until you really intend to trade a real account. |
InpModeMaxLot | 0.10 | Lot ceiling for any single order. A safety ceiling: a larger lot is reduced to this value. |
InpModeAlertPopup | true | Alert only mode: pop-up alert. Affects messages only. |
InpModeAlertPush | false | Alert only mode: push notification to the phone. Affects messages only. |
Trading sessions (broker server time)
| Input | Default | What it does and how to use it |
|---|---|---|
InpSessLondonHour | 10 | London session starts (server hour); Asia runs from 00:00. Adjust to your broker's server clock. |
InpSessNewYorkHour | 15 | New York session starts (server hour), runs to 24:00. Adjust to your broker's server clock. |
Light grid (used only in mode 3). 100 points = 1.00 USD
| Input | Default | What it does and how to use it |
|---|---|---|
InpLgStepPoints | 800 | Fixed distance between layers (points). Only read in the light grid mode. |
InpLgMaxLevels | 3 | Maximum layers, first order included (2 to 5). Only read in the light grid mode. |
InpLgTargetPoints | 600 | Basket target from the average price (points). Only read in the light grid mode. |
InpLgStopPoints | 800 | Common stop: this far beyond the last layer (points). Only read in the light grid mode. |
InpLgMaxLossPct | 2.0 | Basket maximum loss, % of balance (closes all layers). Only read in the light grid mode. |
InpLgMinMinutes | 15 | Minimum minutes between layers. Only read in the light grid mode. |
InpLgTrendBlock | true | No new layer against a strong trend. Only read in the light grid mode. |
InpLgTrendTf | H1 | Strong-trend filter: timeframe. Only read in the light grid mode. |
InpLgTrendAdxPer | 14 | Strong-trend filter: ADX period. Only read in the light grid mode. |
InpLgTrendAdx | 25.0 | Strong-trend filter: ADX at or above this is strong. Only read in the light grid mode. |
InpLgPauseHours | 24 | Pause after a basket is stopped out (hours). Only read in the light grid mode. |
GDI Key
| Input | Default | What it does and how to use it |
|---|---|---|
InpGdiKey | empty: paste your key | GDI Key. Paste your personal key here; the EA sends no order and no alert without a valid key. |
Lot size
| Input | Default | What it does and how to use it |
|---|---|---|
InpUseMinLot | true | Use the symbol's minimum lot automatically. Start with 0.01. On a standard gold contract, 0.01 lots gain or lose about 1 USD for each 1.00 USD move. |
InpFixedLot | 0.01 | Fixed lot (used only if InpUseMinLot = false). Start with 0.01. On a standard gold contract, 0.01 lots gain or lose about 1 USD for each 1.00 USD move. |
Indicators
| Input | Default | What it does and how to use it |
|---|---|---|
InpRSIPeriod | 7 | RSI period. Counted in bars. Shorter reacts faster and gives more false signals; longer is slower and steadier. |
InpRSIOverbought | 75.0 | RSI overbought level. Moving the level further from the middle gives fewer signals. |
InpRSIOversold | 25.0 | RSI oversold level. Moving the level further from the middle gives fewer signals. |
InpBBPeriod | 20 | Bollinger Bands period. Counted in bars. Shorter reacts faster and gives more false signals; longer is slower and steadier. |
InpBBDeviation | 2.0 | Bollinger Bands deviation. |
InpADXPeriod | 9 | ADX period. Counted in bars. Shorter reacts faster and gives more false signals; longer is slower and steadier. |
InpADXMaxTrend | 30.0 | Above this ADX reading a strong trend is under way -> no reversal trades. |
InpATRPeriod | 14 | ATR period used for stop and target. Counted in bars. Shorter reacts faster and gives more false signals; longer is slower and steadier. |
Target and stop (ATR based, in points)
| Input | Default | What it does and how to use it |
|---|---|---|
InpATR_SL_Mult | 1.0 | ATR multiplier for the stop loss. A larger multiple gives the trade more room and a larger loss when the stop is hit. |
InpATR_TP_Mult | 0.5 | ATR multiplier for the take profit. A larger multiple asks for a longer move before the profit is taken. |
InpMinSL_Points | 80 | Minimum stop loss floor (points). In broker points. |
InpMinTP_Points | 50 | Minimum take profit floor (points). In broker points. |
InpMaxSL_Points | 400 | Maximum stop loss ceiling (safety cap). In broker points. |
Spread filter
| Input | Default | What it does and how to use it |
|---|---|---|
InpMaxSpreadPoints | 35 | Largest spread, in broker points, at which a new order is allowed. Raise it if your broker's gold spread is normally wider; lower it to be stricter. |
Session filter
| Input | Default | What it does and how to use it |
|---|---|---|
InpUseSessionFilter | true | Apply the strategy's trading hours. Hours follow the broker's server time. |
InpSessionStartHour | 3 | Strategy trading hours: start (server time). Hours follow the broker's server time. |
InpSessionEndHour | 21 | Strategy trading hours: end (server time). Hours follow the broker's server time. |
News filter (native MT5 economic calendar)
| Input | Default | What it does and how to use it |
|---|---|---|
InpUseNewsFilter | true | Pause new orders around calendar news. Uses the MetaTrader economic calendar, which is not available inside the Strategy Tester. |
InpNewsBlockHigh | true | Block on high-impact events. Uses the MetaTrader economic calendar, which is not available inside the Strategy Tester. |
InpNewsBlockMedium | true | Block on medium-impact events. Uses the MetaTrader economic calendar, which is not available inside the Strategy Tester. |
InpNewsMinutesBefore | 15 | Minutes before a news event during which nothing new is opened. Uses the MetaTrader economic calendar, which is not available inside the Strategy Tester. |
InpNewsMinutesAfter | 15 | Minutes after a news event during which nothing new is opened. Uses the MetaTrader economic calendar, which is not available inside the Strategy Tester. |
Reversal / consolidation filters
| Input | Default | What it does and how to use it |
|---|---|---|
InpCooldownBars | 3 | Minimum bars between trades. Counted in bars. Shorter reacts faster and gives more false signals; longer is slower and steadier. |
InpMaxTradesPerDay | 15 | Maximum trades per day. |
InpUseConsolidationFilter | true | Require a "tired", non-stretched band. true switches it on, false switches it off. |
InpBBWidthMaxATRMult | 2.2 | Maximum band width vs ATR. |
Open position management
| Input | Default | What it does and how to use it |
|---|---|---|
InpUseBreakeven | true | Move stop loss to break-even. Moves the stop to the entry area once the trade is in profit. Ignored while the light grid is active. |
InpBreakevenPoints | 40 | Profit (points) needed to trigger break-even. Moves the stop to the entry area once the trade is in profit. Ignored while the light grid is active. |
InpBreakevenLockPoints | 5 | Points locked in beyond entry price. Moves the stop to the entry area once the trade is in profit. Ignored while the light grid is active. |
InpUseTrailing | true | Use the trailing stop. Trailing locks in part of a move but can close a trade early. Ignored while the light grid is active. |
InpTrailingStartPoints | 60 | Profit (points) needed to start trailing. Trailing locks in part of a move but can close a trade early. Ignored while the light grid is active. |
InpTrailingStepPoints | 20 | Trailing distance (points). Trailing locks in part of a move but can close a trade early. Ignored while the light grid is active. |
General
| Input | Default | What it does and how to use it |
|---|---|---|
InpMagicNumber | 20260825 | Magic number that identifies this EA's orders. Keep it unique for each copy of an EA on the same account; do not change it while the EA has open positions. |
InpTradeComment | GDIRevScalper | Order comment. |
Messages and troubleshooting
| Message in the Experts tab | What it means |
|---|---|
| licence: ... | The key is missing, expired, in use on another IP, or the server address is not allowed in the terminal options. |
| this is a real account and 'I confirm this is a real account' is not ticked | Set InpModeAllowReal to true only if you really want to trade that account. |
| one order at a time | The EA already has a position or pending order. |
| one entry per session: already used | Wait for the next session. |
| light grid pause after a stopped basket | The pause set in InpLgPauseHours is running. |
| a message about an opposite gold position or order | Something on the account is open in the other direction; the EA will not hedge it. |
| the lot is below the broker minimum | Raise InpModeMaxLot or the lot input to at least your broker's minimum. |
Risks
- Gold moves fast; spreads widen around news and at the daily rollover, and stops can be filled worse than requested.
- A signal that worked in one market condition can fail in another.
- The light grid adds exposure against the move by design, within the limits above.
- If the terminal, the computer or the connection stops, only what is on the server (stop and target) stays in force.
- Settings are your responsibility. Check the lot and the loss limits against your balance before any automatic mode.
Frequently asked questions
- Which symbol does it trade?
- Gold only: XAUUSD with any broker suffix, or GOLD. On any other symbol it does not trade.
- Does it open orders as soon as I attach it?
- No. The default mode is Alert only. Orders are sent only after you choose one of the two automatic modes, and on a real account only after you also tick the real-account confirmation.
- Does it use martingale or hedging?
- No. The lot is never increased after a loss and the EA never opens against an open gold position or order on the account.
- Why did it not enter on a second signal?
- In the automatic modes there is at most one entry per trading session and one order at a time.
- Do I need a GDI Key?
- Yes. The file is free to download and works only with a valid GDI Key. In the MetaTrader Strategy Tester the key is not checked.
- Is the source code available?
- No. You receive the compiled .ex5 file and a settings file.
- Are there backtest results?
- Backtests are in progress and will be published on each EA's page. Backtesting is the user's own responsibility: whoever pays for the key may use and test every product.
- Is profit guaranteed?
- No. Trading carries a high level of risk and an EA can lose money.
Trading carries risk. An EA can lose money, and nothing here is advice. Risk disclosure
Related EAs
GDI Exhaustion Reversion EA
Fades a stretched move: price far from its average, confirmed by RSI, Bollinger Bands and a hammer or shooting-star candle.
Read the manual →GDI EMA RSI Scalper EA
An M1 gold scalper: EMA 14 and 50 trend, a pull-back to the average and an RSI trigger, in a London-New York window.
Read the manual →GDI Breakout Scalper EA
An M1 scalper for gold: a Donchian channel breakout with a volatility expansion filter and H1 trend context.
Read the manual →Next steps
GDI Key and plans Getting started Ask a question All GDI EAs
Version 2.00, last updated 2026-12-05.