The previous day high and low on Gold (XAUUSD) are where the stops sit, and price often runs them and snaps back. This indicator draws the previous day high and low (PDH, PDL), the previous week high and low (PWH, PWL), today's open and this week's open, and puts an arrow on the candle that sweeps one of those levels.
A sweep counts only on a closed candle: the wick goes beyond the level and the close comes back inside. A poke through the low that closes above it gets a green arrow, a poke through the high that closes below it gets a red one. The forming candle never gets an arrow, so nothing appears and then disappears.
A sweep is a sign that stops were taken, not an entry by itself. Price can sweep, come back and keep going, so pair it with your own structure or confirmation.

Any symbol, any timeframe below D1. Day and week are the broker server day and week, read from the D1 and W1 history, so the levels match the daily candle of your broker. If that history is not loaded yet the indicator waits and fills in when it arrives. Lines and labels are standard chart objects, the arrows are two indicator buffers, and it never trades. Push notifications need your MetaQuotes ID in the terminal options.
Run it on XAUUSD, XAGUSD, EURUSD, GBPUSD, US30 or NAS100 and compare how often the London or New York session sweeps the PDH or PDL on M5 and M15. From an EA you can read it with iCustom: buffers 0 to 3 are PDH, PDL, PWH and PWL for every bar, buffer 4 the sweep of a low and buffer 5 the sweep of a high. It is a natural trigger next to Smart Money Concepts structure: wait for the sweep, then for the change of character. XP_Prev and the sweep check inside OnCalculate are short and easy to reuse.
Open source. Use it as it is, adapt it, build your own version on top of it. New versions and new tools are announced first on my MQL5 channel: https://www.mql5.com/en/channels/xander. Questions, suggestions and your own backtests are welcome in the Xander Lab group: https://www.mql5.com/en/messages/02eec85e4364dd01. More tools on my profile: https://www.mql5.com/en/users/09151993a. Provided as is, use at your own risk.
Related: Liquidity Sweep Equal Highs Lows, Smart Money Concepts BOS CHoCH, Forex Session Boxes, Opening Range Breakout Box.
v1.0 (2026-11-20): initial release.
Daily Loss and Profit Lock
Daily loss limit EA for MT5 on prop firm and funded accounts, Gold (XAUUSD), forex and indices: closes every position at the daily loss or profit limit, deletes pending orders and locks trading until the next day. Open source code.
Premium Discount OTE Zones
Premium and discount zones for MT5 on Gold (XAUUSD), forex and indices: dealing range from confirmed swings, equilibrium 50 percent, 25 and 75 percent lines and the OTE band of the last leg. Open source code.
News Straddle EA Economic Calendar
News trading EA for Gold (XAUUSD) and forex: places a Buy Stop and a Sell Stop seconds before each release of the MT5 economic calendar, one cancels the other, stop loss, take profit and trailing in points. Open source code.
MACD Signals
Indicator edition for new platform.