Prop Firm Guard
- Utilità
-
Cristian Bodisteanu
Sviluppatore MQL5 – Expert Advisor, indicatori e gestione del rischio per MetaTrader 5
Sviluppo e testo Expert Advisor, indicatori e script in MQL5 per MetaTrader 5.
Cosa ho realizzato per la mia ricerca di trading: - Versione: 1.0
- Attivazioni: 5
Most prop-firm accounts are not lost because of a bad strategy, but because of one bad day. Prop Firm Guard watches your account equity every second and enforces the rules of your challenge for you.
What it does
- Daily loss limit: in percent of the account size or in money. Measured from the balance at the start of the day, or from the higher of balance/equity (as some firms do). Floating losses are included.
- Maximum drawdown: static (from the initial account size) or trailing (from the highest equity reached).
- Profit target lock (optional): when the target is reached, all positions are closed and the account is locked, so you do not give the profit back.
- Safety buffer: acts before the real limit (for example at 90% of it), to leave room for slippage and spread.
- Early warning: alert, push notification and/or email when a set share of a limit is used (default 70%).
- Lock: when a limit is reached, all positions are closed and pending orders deleted. While the lock is active, any new position (manual or from another EA) is closed immediately. The daily lock is released automatically at the daily reset time; the drawdown and target locks stay until you clear them.
- Restart-safe: the start-of-day balance, equity peak and lock state are stored in terminal global variables, so a restart of the terminal or VPS does not reset them.
- Clear panel on the chart: account size, daily loss used, drawdown used, profit, reset time and status.
Works with
- Manual trading and any other Expert Advisor on the same account.
- All symbols, or only the chart symbol; optional magic number filter.
- Hedging and netting accounts.
Inputs
- Initial account size: the size your firm uses for the percent limits (0 = the balance when the guard is first attached).
- Daily loss limit / unit / basis, daily reset hour and minute (server time; set it to the reset time of your firm).
- Maximum drawdown / unit / mode (static or trailing).
- Profit target (optional).
- Act earlier buffer (% of each limit) and warning level.
- Positions to close (all symbols or chart symbol), magic filter, delete pending orders, keep the account flat while locked, max slippage.
- Notifications: pop-up alert, push, email.
- Panel corner and position.
- Clear a permanent lock on start.
How to use
Attach the guard to any one chart of the account (one chart is enough) and keep the terminal or VPS running. Allow Algo Trading so it can close positions. For push notifications, enter your MetaQuotes ID in Tools > Options > Notifications.
Important
The guard reduces risk but cannot prevent gaps, slippage or broker-side problems, and it does not trade for profit. Always check the exact rules of your prop firm and set the inputs accordingly. In the Strategy Tester the guard opens small demo trades only so you can see it working; it never opens trades on a live chart.
