Trading strategy Logic and function tested
GDI Bulls Alligator EA
Bulls Power crossing zero in an awake Alligator, inside a dedicated trading window.
- Version2.00
- Last updated2026-12-05
- SymbolGold (XAUUSD) only
- TimeframeThe chart's timeframe
Download GDI_Bulls_Alligator_EA.ex5 ↓ Settings file (.set) ↓ Get a GDI Key (7-day free trial) →
What it is
A trend strategy timed by Bulls Power. When the Alligator is awake and Bulls Power crosses zero in the trade's favour, it enters; the Stochastic cross closes the trade.
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
- Entry only inside the strategy's own trading window.
- Trend filter: Alligator lines fanned out in order.
- Trigger: Bulls Power crossing zero in the trade's favour.
- Exit: Stochastic %K crossing back through %D against the position, or the ATR stop or target.
Who it suits
Traders who want a window-limited trend entry with a momentum-fade exit.
Who it does not suit
Its own window is narrow by design; outside it, nothing happens.
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 | The chart's timeframe |
| 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_Bulls_Alligator_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: 25ff9c81bdc71f1efb3714b59bbe9f4ff919e7eb3408b95d0f800ccd578eee33.
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 (43 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. |
Strategy - Bulls Alligator
| Input | Default | What it does and how to use it |
|---|---|---|
InpEntryWindowStartHour | 8 | Entry window of the strategy: start hour (server time). Hours follow the broker's server time. |
InpEntryWindowEndHour | 18 | Entry window of the strategy: end hour (server time). Hours follow the broker's server time. |
InpBullsPeriod | 13 | Bulls Power period. Counted in bars. Shorter reacts faster and gives more false signals; longer is slower and steadier. |
InpAlligatorJaw | 13 | Alligator Jaw period. |
InpAlligatorJawShift | 8 | Alligator Jaw shift. |
InpAlligatorTeeth | 8 | Alligator Teeth period. |
InpAlligatorTeethShift | 5 | Alligator Teeth shift. |
InpAlligatorLips | 5 | Alligator Lips period. |
InpAlligatorLipsShift | 3 | Alligator Lips shift. |
InpStochK | 5 | Stochastic %K period. |
InpStochD | 3 | Stochastic %D period. |
InpStochSlowing | 3 | Stochastic slowing. |
Risk
| Input | Default | What it does and how to use it |
|---|---|---|
InpLots | 0.01 | Lot size of an order. Start with 0.01. On a standard gold contract, 0.01 lots gain or lose about 1 USD for each 1.00 USD move. |
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. |
InpSLAtrMultiple | 1.8 | Stop loss distance in ATR multiples. A larger multiple gives the trade more room and a larger loss when the stop is hit. |
InpTPAtrMultiple | 2.8 | Take profit distance in ATR multiples. A larger multiple asks for a longer move before the profit is taken. |
InpMagicNumber | 771029 | 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. |
Filters
| Input | Default | What it does and how to use it |
|---|---|---|
InpMaxSpreadPoints | 350 | 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. |
InpSessionStartHour | 7 | 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. |
InpUseNewsFilter | true | Pause new orders around calendar news. Uses the MetaTrader economic calendar, which is not available inside the Strategy Tester. |
InpNewsMinutesBefore | 20 | 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 | 20 | Minutes after a news event during which nothing new is opened. Uses the MetaTrader economic calendar, which is not available inside the Strategy Tester. |
InpNewsMinImportance | HIGH | Lowest news importance that counts. Uses the MetaTrader economic calendar, which is not available inside the Strategy Tester. |
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 Alligator DeMarker EA
Buys pull-backs inside an Alligator trend, timed by DeMarker and a Stochastic cross.
Read the manual →GDI Volatility Power EA
An ATR volatility filter plus Bulls Power crossing zero, inside a window, closed on a pin bar.
Read the manual →GDI Alligator Momentum Cross EA
An awake Alligator, confirmed twice by the Accelerator Oscillator and Momentum, closed on a moving-average cross.
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.