Prop Firm Guard - Protect Your Funded Account
Info
The Prop Firm Guard - Protect Your Funded Account is a Expert Advisor for MetaTrader 5 that most funded accounts are not lost to a bad strategy but to one bad day. Prop Firm Guard monitors account equity constantly and acts before the firm's limit is reached, not after.
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 Firm Guard - Protect Your Funded Account
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
Most funded accounts are not lost to a bad strategy but to one bad day.
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 Firm Daily Profit Lock - another powerful expert for MetaTrader 5 traders.
Most funded accounts are not lost to a bad strategy but to one bad day. Prop Firm Guard monitors account equity constantly and acts before the firm's limit is reached, not after. It does not open trades, allowing it to run alongside any Expert Advisor or manual trading.Also recommended: Prop Firm Equity Guard: Protect Your Challenge - similar expert with strong performance on MetaTrader 5.
What it Does
Daily Loss Guard:
When equity falls to the daily limit minus a safety buffer, it closes all positions, cancels pending orders, and keeps the account flat until the firm's next trading day.
Maximum Loss Guard:
This can be static (initial balance minus the limit) or trailing (highest balance minus the limit; the trailing level stops at the initial balance). When this limit is hit, the account remains flat until you clear the lock.
Profit Target Lock (Optional):
Closes all open trades and stops trading once the profit target is reached.
While any lock is active, trades opened subsequently by other Expert Advisors or manually will also be closed.
The firm's trading day reset is based on UTC hours; the broker's server offset is detected automatically.
Locks are persistent and survive terminal restarts, as they are stored in terminal global variables.
Optional filters include: restricting actions to a single magic number and/or trades on this chart's symbol only.
Terminal alerts and push notifications to the MetaTrader mobile app are provided.
Inputs
Initial Account Balance:
Set to 0 to automatically read the initial deposit from the account history.
Daily Loss Limit, %:
Set to 0 to disable. This limit is measured from the initial balance (common for most firms) or from the balance at the start of the day.
Maximum Loss Limit, %:
Set to 0 to disable. Supports static or trailing loss limits.
Buffer, %:
The guard will intervene this percentage before a limit is reached, providing a safety margin for slippage. A value of 0.5% is a reasonable starting point.
Profit Lock, %:
Set to 0 to disable.
Firm's Daily Reset, UTC Hour:
Specify the hour (in UTC) when your trading firm begins a new trading day.
Magic Number / This Symbol Only:
Use -1 to include all trades, including manual ones.
Alerts, Push, Panel:
Control notifications and the status display on the chart.
Clear Saved Locks:
Set this to true once after an account reset, and then change it back to false.
How to Use
Attach this tool to only ONE chart on your account (any symbol, any timeframe). Ensure Algo Trading is enabled and enter the loss limits precisely as specified by your trading firm. Verify how your firm calculates the daily limit: some use the initial balance, while others use the balance or equity at the start of the day. The status line on the chart will display the current guard levels and the remaining room to each limit.
While this tool mitigates the impact of a bad trading day, it cannot prevent slippage beyond the defined buffer, especially during price gaps (e.g., over weekends or around major news events). Always maintain sensible risk management for each individual trade.
You may also like: Prop Firm Equity Guard: Daily Loss and Max Drawdown Protector - 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_DAILY_BASE
{
BASE_INITIAL=0,
BASE_DAY=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.