Skip to content
Forex Indicator System Thailand
Back to marketplace
XAUUSDM5PatternEAMedium

Engulfing Zone EA (gold, M5)

Price-action EA for XAUUSD on M5 that builds zones from engulfing candles and enters when price retests the zone

Download this EA for free

Download right away. Nothing to fill in.

Version
1.00
Published
11/21/2026
File size
45 KB

Open source, MIT License, by NadirAliOfficial (AurexTrader). See licences

Version history

  1. 1.00Current11/21/2026 · 45 KB

    First release on this site.

How to use

It works only on XAUUSD on an M5 chart. The EA checks that the symbol name contains XAUUSD, XAU or GOLD and that the chart is M5; otherwise it does not start. Drag it onto the chart and enable Algo Trading.

Set InpManualLotSize if you do not want the automatic lot from balance. Adjust InpMaxSpreadPoints to your broker's normal spread; gold spreads can widen a lot around news.

Parameters

NameDefaultDescription
InpManualLotSize0Manual lot size. 0 means automatic mode (sized from the account balance).
InpLotPer10000.04Lots per 1,000 units of balance in automatic mode.
InpMaxLotSize2Maximum lot size the EA will open.
InpMinLotSize0.01Minimum lot size the EA will open.
InpSLBufferPoints50Buffer in points placed beyond the zone edge for the stop-loss.
InpSwingLookback3Number of candles on each side used to confirm a swing high/low.
InpTrendSwingCount4Number of swing points used to judge the trend (minimum 3).
InpZoneExitCandles3Minimum number of candles that must close outside the zone before a return counts as a retest.
InpInvalidateZonetrueInvalidate a zone when price closes through it to the opposite side.
InpMagicNumber202507Magic number that separates this EA's orders from other orders.
InpMaxSlippage30Maximum accepted slippage in points.
InpMaxSpreadPoints50Maximum spread in points at which an order may be opened. If the spread is wider the signal is skipped.
InpShowZonestrueDraw zone rectangles on the chart.
InpBullZoneColorclrDodgerBlueColour of bullish (demand) zones.
InpBearZoneColorclrOrangeRedColour of bearish (supply) zones.

Defaults are the values shipped with the EA, not a recommendation. Results depend on the market and on each account. Past results do not guarantee future results. Trading carries a high risk of loss.

How to install

  1. Download the .ex5 file.
  2. In MT5, choose File > Open Data Folder.
  3. Copy the file into the MQL5\Experts folder.
  4. Right-click Expert Advisors in the Navigator window and choose Refresh (or restart MT5).
  5. Drag it onto a chart, adjust the Inputs, turn on Allow Algo Trading, then click OK.

Description

This EA uses no indicators, only price. First it judges the trend from swing points (an uptrend is higher highs and higher lows, a downtrend the reverse). When an engulfing candle forms at a swing point in the trend direction it creates a zone from that candle's high-low range, but it does not trade that first candle.

The EA waits for price to leave the zone (close outside for at least InpZoneExitCandles candles) and come back to retest it. If a new engulfing candle in the same direction forms inside the zone during the retest, it opens an order at the open of the next candle. Each zone is traded once.

Every order has a stop-loss beyond the zone edge plus a buffer and a take-profit at the same distance as the stop-loss (1:1). By default the lot is sized from the balance (0.04 lot per 1,000), capped by InpMaxLotSize, and no order is opened when the spread exceeds the set limit.

Banners from the Exness partner programme

Exness banner: gold spreads*

FXIDTH is an independent IB partner of Exness. This channel is not owned or operated by Exness.*Spreads may fluctuate and widen due to factors including market volatility, news events, market open/close, and others.*Processing times may vary depending on the chosen payment method.

FVG (Fair Value Gap zones) on an MT5 chart
IndicatorPattern

FVG (Fair Value Gap zones)

An indicator that draws boxes on the chart over the price gap across three candles (Fair Value Gap), coloured by direction

Main chart

Version 1.03Free download