Prop Firm Drawdown Guard
- Утилиты
-
Ciprian Ghebanoaei
Algorithmic trader and MQL5 developer from Romania, building Expert Advisors since 2018. - Версия: 1.0
- Активации: 5
Prop Firm Drawdown Guard watches your account equity and stops the damage before a drawdown rule is broken. When a limit is reached it closes the positions, deletes the pending orders and keeps the account flat — until the next daily reset for the daily limit, or for good for the maximum loss. It never opens trades.
Built for prop-firm challenges and funded accounts, and just as useful on a personal account where you want a hard daily stop.
Limits
- Daily loss limit — in percent or in account currency. The percent can be taken from the initial balance (the usual prop-firm rule) or from the day-start value. The daily loss is measured from the balance, the equity or the higher of the two at the daily reset.
- Maximum loss — static (from the initial balance) or trailing (from the highest equity reached).
- Daily profit lock (optional) — close everything and stop for the day when a profit target is reached.
- Safety margin — act before the limit itself (default at 95% of a limit), because closing positions takes a moment and prices move.
- Warning — alert when the loss reaches a set share of a limit (default 80%).
What happens on a breach
- All positions in scope are closed and pending orders deleted.
- While locked, any new position in scope is closed straight away.
- Popup, push and e-mail notifications, plus a clear message in the Experts log.
- Locks, peak equity and the day-start values are saved, so a terminal restart does not reset them.
Scope
All positions on the account (default), only the chart symbol, or only a list of magic numbers.
On-chart panel
Status (active / close to a limit / locked), equity, today's result, daily limit left, maximum-loss floor and distance, reset hour. Corner, position, font and colours are adjustable.
How to use
- Attach it to one chart only (any symbol, any timeframe) and allow Algo Trading — it needs it to close positions.
- Set the limits to match your account rules, then the daily reset hour in broker server time.
- For a challenge, enter the account size in Initial balance. For a new challenge on the same login, set Reset saved state to true once.
- Keep the terminal running (a VPS is recommended): the guard can only act while MetaTrader is online.
Important
- The guard reacts to equity changes in your terminal. Gaps, slippage, very fast markets or a disconnected terminal can make the final loss larger than the limit — that is why the safety margin exists. Check your firm's exact rules and set the limits with room to spare.
- It cannot switch off other EAs. If another EA keeps opening trades after a lock, the guard closes them and warns you once a day; switch off Algo Trading or remove that EA, because each reopen costs the spread.
- It does not trade and does not promise any result.
Inputs
- Daily: unit (percent), limit (5), percent base (initial balance), measured from (higher of balance and equity), reset hour (0, server time).
- Maximum loss: unit (percent), limit (10), type (static), initial balance (0 = balance when first attached), reset saved state (false).
- Daily profit lock: unit (percent), value (0 = off).
- Act at % of limit (95), warn at % of limit (80).
- Scope (all), magic list, delete pending orders (true), close new positions while locked (true).
- Notifications: popup (on), push (off), e-mail (off).
- Panel: show, corner, X/Y, font size, colours, background.
