Prop Guard: Account Risk Manager for Proprietary Trading Firms
Info
The Prop Guard: Account Risk Manager for Proprietary Trading Firms is a Expert Advisor for MetaTrader 5 that prop guard monitors the entire trading account, not just a single chart. Attach a single instance to any chart, and it will oversee all positions on the account, regardless of the Expert Advisor (EA) or magic number that opened them.
Usage
This tool is typically used for automated trading on major forex pairs and gold.
Platform
This Expert Advisor works exclusively on MetaTrader 5 (both build 600+ and newer versions).
Setup
Place the downloaded file in MQL5/Experts folder via File ? Open Data Folder in MetaTrader 5.
How to Install and Use Prop Guard: Account Risk Manager for Proprietary Trading Firms
1. Installation: Open the "File" menu, select "Open Data Folder," navigate to MQL/Experts, paste your file, and restart the terminal.
2. Activation: Drag the EA from the Navigator onto a chart, ensure "Allow live trading" is checked in the Common tab, and verify the AutoTrading button is green.
3. Optimization: Right-click your chart, choose "Expert List," click "Properties" to adjust inputs, and save your preferred setup as a set file for future use.
4. Maintenance: Regularly check the "Experts" tab in the terminal window to monitor trade logs and potential execution errors.
Frequently Asked Questions
Q: Why is my EA not opening trades? A: Check the "AutoTrading" button, ensure "Allow live trading" is enabled, and verify your broker allows automated trading on your account type.
Q: Can I run multiple EAs on one chart? A: No, each chart can only host one active EA; however, you can open multiple charts for different currency pairs to run several EAs.
Q: What does the "smiley face" icon mean? A: A smiley face in the top-right corner of the chart indicates the EA is successfully running; a frowny face means it is disabled.
What this tool does
Prop Guard monitors the entire trading account, not just a single chart.
Typical Use Case
This Expert Advisor excels in automated trading and technical analysis on MetaTrader 5.
Compatible Platform & Setup
This Expert Advisor works on MetaTrader 5. Place the file in the MQL5/Experts folder and restart the terminal.
Description & Settings
Related: Prop Guard Lite: Daily and Max Loss Protection for Prop Firm Accounts - another powerful expert for MetaTrader 5 traders.
Prop Guard monitors the entire trading account, not just a single chart. Attach a single instance to any chart, and it will oversee all positions on the account, regardless of the Expert Advisor (EA) or magic number that opened them. It automatically closes all trades when a proprietary firm-style limit is reached.Also recommended: Account Guard: EA Account Locking for MT5 - similar expert with strong performance on MetaTrader 5.
Features enforced:
- Daily loss limit based on equity, including floating profit, with a reset at a user-defined server time.
- Maximum loss limit, calculated either from the initial balance or by trailing the equity peak.
- Maximum lot size per position.
- Optional trading window.
- Optional Friday trade closure.
- Optional blackout period around high-impact news events sourced from the MT5 economic calendar.
Upon a breach, the system flattens the account, cancels all pending orders, and continues to close any new trades until the next daily reset. This prevents an EA from trading the account into a second breach on the same day.
All actions are logged in the Experts log, saved to a CSV file in the MQL5\Files directory (named after the account login), and optionally sent as a push notification.
Symbol and timeframe are irrelevant; the guard operates at the account level. It runs on a timer as well as on ticks, ensuring continuous monitoring even during quiet market periods.
Configurable Inputs:
- InpInitialBalance: The initial account size as defined by the firm's rules.
- InpDailyLossPct and InpMaxLossPct: The guard's internal limits in percentage. Set these slightly below the firm's official limits (e.g., 4% and 8% for an account with 5% and 10% rules) to ensure you stop before the firm does.
- InpMaxLossMode: Defines whether the maximum loss is static from the initial balance or trailing from the equity peak.
- InpResetHour and InpResetMinute: Sets the daily reset time based on server time.
- InpMaxLotsPerPos: Closes any position exceeding this lot size.
- InpCloseOnBreach and InpBlockAfterBreach: Configures whether to flatten the account on a breach and maintain a flat state until the next reset.
- InpUseWindow with start and end hours, and InpFridayClose with its hour: Both operate based on server time.
- InpUseNewsFilter, InpNewsCurrencies, InpNewsMinutesBefore and After: Manages the blackout period around news events.
- InpPushAlerts: Enables push notifications for every action taken.
- InpMagicToIgnore: Allows specific magic numbers to be excluded from the guard's monitoring.
Tested on an FTMO trial account in 2026.
You may also like: Prop Firm Guard: Daily Loss and Max Drawdown Protection - excellent alternative for expert users on MetaTrader 5.
Source Code
#property copyright "RobotFX"
#property link "https://robotfx.org"
#property version "1.00"
#property description "This code is educational. Feel free to use, modify and upgrade as you wish. Visit ROBOTFX.ORG for professional trading tools"
#include <Trade\Trade.mqh>
enum ENUM_MAXLOSS_MODE
{
MAXLOSS_STATIC=0,
MAXLOSS_TRAILING=1
};
.......
⚠ Limitations & Risk Warning
- This tool is provided for educational and testing purposes only.
- Past performance does not guarantee future results.
- Trading involves substantial risk of loss. Use on a demo account first.
- Results may vary depending on market conditions, broker, and settings.
- We recommend thorough backtesting and forward testing before using with real funds.