PropBlaster Guard for MT5 – User Guide
PropBlaster Guard is a risk-management Expert Advisor that keeps one MT5 account inside your prop-firm and personal trading rules. You set the rules once in the EA inputs. When a rule is broken, the Guard steps in straight away:
- New positions that break a rule are closed immediately. This also applies to trades opened by hand, from the mobile app or by another EA.
- New pending orders placed while trading is blocked are deleted. If the server rejects the deletion (for example because the order has not been accepted yet), the Guard retries once per second, up to 15 times.
- When the daily loss limit or max. drawdown is reached, it can close all positions and delete all pending orders (
InpCloseOnLimit). - It shows the current status in a small panel on the chart and can send alerts and push notifications.
The Guard never opens trades on your account. Positions and orders that already exist when you attach it are not closed after the fact. Only the close-all at the loss limit or drawdown limit affects them.
File: mt5/PropBlaster_Guard.mq5 (one .ex5; no DLLs, no files, no internet access).
PropBlaster Daily Loss Guard (free edition)
PropBlaster_Guard_Lite.ex5 is the same engine with a reduced input set: General (all inputs), Daily loss (InpLossLimit in % of the day-start balance, equity based; InpCloseOnLimit; InpDayResetHour) and Trade limits (InpMaxTradesDay, InpRequireSL, InpSLGraceSec). All other rules below are fixed to "off". The panel shows "PropBlaster Daily Loss Guard". Source: mt5/PropBlaster_Guard_Lite.mq5 – compile it next to PropBlaster_Guard.mq5.
Installation
- Copy
PropBlaster_Guard.ex5toMQL5\Experts(on the MQL5 Market this happens automatically). - Open one chart (any symbol; the Guard watches the whole account) and attach the EA.
- Turn on Algo Trading in the toolbar and allow "Algo Trading" in the EA's Common tab. Without this the Guard can show the status, but it cannot close or delete anything.
- Set your rules in the Inputs tab and click OK.
Use only one Guard per account. If you run several, each one closes the same positions.
Inputs
General
| Input | Default | Meaning |
|---|---|---|
| Guard enabled | true | Master switch. When off, the panel shows GUARD OFF and the Guard does nothing. |
| Magic number filter | 0 | 0 = every trade on the account counts and is managed. Any other value means only positions, orders and deals with this magic number are counted and managed. |
| Show status panel | true | Shows the panel in the top-left corner of the chart. |
| Panel position X / Y | 10 / 25 | Panel offset in pixels. |
| Alert pop-ups | true | Shows an MT5 alert when the Guard intervenes or locks trading. |
| Push notifications | false | Sends a notification to your phone. Set up your MetaQuotes ID under Tools > Options > Notifications first. |
| Commitment mode | false | Full version: looser settings only apply from the next trading day (see Commitment mode). |
Daily loss
| Input | Default | Meaning |
|---|---|---|
| Daily loss limit | 4.0 | 0 = off. Set it a little below your prop firm's limit so you have a buffer. |
| Unit | Percent | Percent of day-start balance, Amount in account currency, or R. |
| 1R = % of day-start balance | 1.0 | Size of 1R. Used when the unit is R, and to show the R values in the panel. |
| Loss basis | Equity | Equity: closed P/L plus open P/L (how most prop firms count it). Closed trades only: only realised P/L. |
| Close all at the limit | true | When the limit is reached, closes all positions and deletes all pending orders (once per day). |
| Trading day starts at server hour | 0 | The server hour (0–23) when the daily counters reset. Use it if your prop firm resets the day at a different time. |
| Max. overall drawdown % | 0 | 0 = off. Measured from the highest balance seen since the Guard first ran on this account. |
The day-start balance is the current balance minus today's closed P/L. Today's loss includes commission, swap and fees. Once the daily loss limit is hit, the account stays LOCKED until the next trading day, even if equity recovers (most prop firms treat a breach the same way). This also survives an EA or terminal restart.
Trade limits
| Input | Default | Meaning |
|---|---|---|
| Max. trades per day | 0 | 0 = off. Every opened position counts as one trade. When the maximum is reached, any further position is closed. |
| Max. open positions | 0 | 0 = off. A position that goes over the maximum is closed. |
| Max. losing trades in a row | 0 | 0 = off. Counted per trading day. A winning trade resets the count. |
| Pause after a loss (min) | 0 | 0 = off. No new trades for this many minutes after a losing trade closes. |
Risk per trade
| Input | Default | Meaning |
|---|---|---|
| Stop loss is mandatory | false | A position that still has no SL after the grace period is closed. |
| Seconds allowed to set the SL | 15 | Grace period (minimum 3 s). Gives you time to add the SL after a one-click trade. |
| Max. risk per trade % | 0 | 0 = off. Checked after the grace period: if the loss at the SL is above this % of the balance, the position is closed. |
Sessions & news
| Input | Default | Meaning |
|---|---|---|
| Trading session 1 / 2 | empty | HH:MM-HH:MM, for example 08:00-11:30. Empty = off. A session can run past midnight (22:00-02:00). If at least one session is set, trading outside all sessions is blocked. |
| Time base | Server time | Choose whether sessions and news blackouts use broker server time or your local PC time. |
| News blackouts | empty | YYYY.MM.DD HH:MM-HH:MM, several entries separated by ;. Example: 2026.10.10 14:25-14:45;2026.10.11 20:00-20:15. A blackout window cannot run past midnight. |
| Pending orders after the session | keep | keep: a pending order you placed inside a session may still trigger after the session has ended; delete: such orders are deleted when the session ends. Pending orders placed outside a session are always deleted. You can delete any order yourself at any time. |
| Keep pending orders for (min) | 0 | Only with keep: delete them this many minutes after the session ended. 0 = keep until you delete them. |
If an input is invalid (for example a wrong session format, or an hour outside 0–23), the EA does not start. The Experts tab then shows which input is wrong.
Commitment mode (full version)
InpCommitMode = true protects you from yourself: settings that make the Guard stricter apply at once, settings that make it looser are saved but only apply from the next trading day (the day starts at InpDayResetHour).
Looser means for example: a higher loss limit, more trades per day, a shorter cooldown, a longer stop-loss grace period, removing a trading session, switching the stop-loss rule, the close-on-limit, the Guard (InpEnabled) or the commitment mode itself off, or moving the day reset hour. The panel then shows "Commitment: looser settings apply from the next trading day" in orange and an alert is raised.
How it works: the settings in force are stored per trading day in terminal global variables PBG_CM_<login>_<magic>_…. The daily loss limit is stored as an amount in account currency, so changing the unit (%, money, R) does not loosen it either. Sessions you remove stay enforced for the rest of the day; sessions you add or narrow apply at once.
Limits: this is a speed bump, not a wall. You remain the owner of the account – removing the EA from the chart, turning off Algo Trading, deleting the PBG_CM_… variables (F3) or changing the magic filter ends the protection. News blackouts and the pending-order settings always apply at once.
Panel
PropBlaster Guard all trades
OPEN
All rules OK - trading allowed
Loss today: 35.20 / 400.00 USD (0.35R / 4.00R)
Drawdown: no limit
Trades today: 2 / 3
Open positions: 1 / 2
Losses in a row: 1 / 3
Session: open until 11:30 (server)
Last: 09:42 Closed EURUSD #123456: Outside trading session
| State | Colour | Meaning |
|---|---|---|
| OPEN | green | All rules are OK and you can trade. |
| NO NEW TRADES | orange | Temporary block: cooldown after a loss, outside the trading session, news blackout, or max. open positions reached. Ends by itself. |
| LOCKED | red | Blocked until the next trading day (daily loss limit, max. trades, losing streak) or permanently (max. drawdown). |
| GUARD OFF | grey | Disabled in the inputs. |
The line under the state gives the reason. Last shows the Guard's most recent action. Lines turn orange near a limit and red when a limit is reached. The panel updates once per second, and the Guard reacts to new trades immediately.
FAQ
Does it replace my stop loss? No. The Guard is not a stop loss and does not manage open trades (no break-even, no trailing). It enforces your rules: it blocks or closes trades that break them, and with Close all at the limit it flattens the account when the loss limit is reached. Always use a stop loss on every trade. Gaps, slippage and the time a close takes mean the daily loss can end up slightly above the limit, so leave a buffer.
Does it work with the PropBlaster Trade Copier? Yes. On the master account, use the Guard with the same rules as the copier's built-in guard, or use one of the two. The Guard closes a rule-breaking position on the master within a fraction of a second, and the slaves then close it as well. Because the copier may already have mirrored the trade, a slave can briefly open and close it again. For strict per-account limits, run one Guard on each slave account too.
Does it work with other EAs? Yes. With Magic number filter = 0, the Guard watches everything on the account. Set a magic number to protect only one EA's trades.
Hedging or netting accounts? Both. On netting accounts a position is closed with an opposite deal. Adding volume to an existing netting position does not count as a new position, but it does count as a trade for Max. trades per day.
What if Algo Trading is switched off? The panel still shows the status, but the Guard cannot close or delete anything. It retries for 15 seconds and then alerts you to act yourself.
What happens on weekends or when the market is closed? The Guard uses the broker server time, which keeps running even without quotes. If a close fails because the market is closed, it retries up to 15 times and then raises an alert.
How do I reset the drawdown peak?
Press F3 (Global Variables) and delete PBG_PEAK_<account number>. The Guard starts again from the current balance. The daily-loss lock is stored as PBG_LLATCH_<account>_<magic> and expires by itself at the next day reset.
Is there an emergency unlock? No. This is intentional: the Guard is there to stop impulsive decisions. To change a rule, edit the inputs. The daily-loss lock still stays in place until the next trading day.
Why does it open trades in the Strategy Tester? Only in the tester, a demo routine opens one minimum-volume position with SL and TP every 4 hours of test time, so you can see the Guard working. This never happens on a demo or live account.