Regime Guardian AI is an MQL5 Expert Advisor for MetaTrader 5, version 1.01. It is an M1 regime scalper with higher-timeframe-direction transition trades and an online-learning AI layer.
It is designed for BTCUSD and XAUUSD. Distances are measured in ATR, so it can be attached to other symbols, but those two are the ones it is written for. It was built from the Regime Sentinel AI v1.01 engine, with its own magic number, AI model file, and CSV export so it can run as a separate advisor. Position size is a fixed lot.
Nothing on this page is a performance claim. No Expert Advisor can guarantee profit. Test on a demo account before using live funds.
Who it is for
- Traders who want an M1 regime scalper with higher-timeframe-direction transition trades and an online-learning AI layer.
- Intended for BTCUSD and XAUUSD (gold).
- It is a separate advisor from Regime Sentinel AI, with its own magic number, AI model file, and CSV export.
- You should test on a demo account before using live funds. No Expert Advisor can guarantee profit.
How it decides
A regime filter uses ADX and the efficiency ratio, with hysteresis so the regime does not flip on small moves. A higher-timeframe EMA slope (M5 by default) is used as a veto and as a point in the trend score.
In a TREND regime, entries use a seven-point score rather than a single all-or-nothing chain. A setup is armed on the signal-bar close; the entry can then fire intrabar on a breakout of that candle, with live tick-velocity confirmation. A trend-entry filter can also require a short-window efficiency ratio and can block a strong counter-impulse candle. After any losing trade, trend entries can pause for a cooldown.
When the regime is in transition, the EA can take a narrower class of trades only in the higher-timeframe direction, if the M1 EMAs, the signal candle, and RSI and extension checks you set are met. In a RANGE regime, it looks for a Bollinger-band touch with an RSI filter, and can block range trades against a strong HTF slope.
The AI layer, on by default, learns from this EA’s own closed trades. After a warm-up period it uses a logistic model per regime, with a risk-based win label, a UCB bandit for stop, take-profit and trail profiles, a learned hour gate, a rolling guard, and a small exploration share. Optional lot scaling from model confidence is off by default. A trade log can be exported as CSV.
Exits use ATR stops and targets, a profit lock (ATR by default, or USD), a trail that can tighten when momentum fades, an optional stale-trade exit (off by default), a reversal exit, and a basket lock across the open trades from this EA.
Risk controls
- Spread and volatility filters, and a minimum take-profit size relative to spread.
- A chase guard that skips the entry if price has already run too far past the trigger.
- A daily loss cap (default 3%), a consecutive-loss pause, a maximum of two open trades, and a minimum time between entries.
- The required trend score can increase by one after a losing trade on the same day.
- Optional weekend trading (on by default) and an optional session window (off by default).
Recommended use
| Platform | MetaTrader 5 |
|---|---|
| Version | 1.01 |
| Symbols | BTCUSD and XAUUSD (gold). Distances are ATR-based, so other symbols can be used, but these are the intended markets. |
| Timeframe | M1 |
| Account type | Raw-spread or ECN (low-spread) account recommended |
| First use | Attach the EA on a demo account and confirm your inputs before any live use |
Key settings
| InpMagic | 8880005 |
|---|---|
| InpLots | 0.01 |
| InpMaxPositions | 2 |
| InpUseTransTrades | true (HTF-direction transition trades) |
| InpUseAI / InpAIMinProb | true / 0.58 after a 25-trade warm-up |
| InpUseStopLoss | true |
| InpTrendSL_ATR / InpTrendTP_ATR | 1.20 / 2.00 |
| InpUseDailyLossCap / InpDailyLossPercent | true / 3.0% |
Requirements
- A MetaTrader 5 terminal and a broker account you control.
- Each copy is compiled for and locked to the buyer's MT5 account number.
- A raw-spread or ECN (low-spread) account is recommended.
- You remain responsible for inputs, risk limits, and supervision while the EA is running.
Trading leveraged products is high risk. This is not financial advice. Past performance is not indicative of future results. Read the risk disclaimer.