Equity Guard - Daily Loss Limit Guardian with Panic Panel
Info
The Equity Guard - Daily Loss Limit Guardian with Panic Panel is a Expert Advisor for MetaTrader 5 that equity guard is an account-level risk manager that enforces your daily loss limit. When the daily loss reaches a configurable trigger, it closes every position and pending order and keeps the account flat until the next daily reset.
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 Equity Guard - Daily Loss Limit Guardian with Panic Panel
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
Equity Guard is an account-level risk manager that enforces your daily loss limit.
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: riskguard: professional risk management ea for metatrader - another powerful expert for MetaTrader 5 traders.
Equity Guard is an account-level risk manager that enforces your daily loss limit. When the daily loss reaches a configurable trigger, it closes every position and pending order and keeps the account flat until the next daily reset. It was designed with prop-firm daily drawdown rules in mind, but it works on any broker and any account.Also recommended: close by equity percent - similar expert with strong performance on MetaTrader 5.
Equity Guard panel has an ACTIVE state with live gauge and daily loss progress. The EA works on any symbol and any timeframe, because it monitors the whole account rather than the chart it is attached to. Attach it to one chart per account only. The daily reset time is fully configurable and is interpreted in your broker's server time.
Daily loss limit can be set as a percent of the day-start balance or equity, or as a fixed amount, adapting to any account size and currency. The lock trigger is configurable as a percent of the limit, so the account locks before the hard limit is breached. Flat enforcement ensures that any position opened by other EAs is closed immediately while locked.
The panel features manual CLOSE ALL and LOCK/UNLOCK buttons with two-click confirmation against accidental clicks. It is a modern draggable panel with live gauge, minimizable to a compact pill, and its position is remembered across restarts. State persistence, hedging and netting accounts are supported, with automatic filling-mode detection and no DLLs required.
When the lock is triggered, all positions are closed, and the account is kept flat until the next daily reset. At the configured reset time, the EA captures a day-start reference, which can be either balance or equity. It then monitors account equity in real time using a one-second timer, incoming ticks, and trade events. If the daily loss reaches the lock trigger, it flattens the account and locks. The lock releases automatically at the next daily reset or manually via the UNLOCK button, with a recovery hysteresis to prevent instant re-firing.
Input parameters include all limits, reset time, and alerts, which are fully configurable. These parameters allow for customization of the daily loss limit mode, daily loss limit, lock trigger, day-start reference, and more. Equity Guard is a risk-management utility that opens no trades and makes no profit claims, allowing you to bring your own strategy or EAs while ensuring that one bad day cannot take the whole account down with it.
You may also like: equity trailing ea mt5 - excellent alternative for expert users on MetaTrader 5.
Source Code
#property copyright "RobotFX"
#property link "https://robotfx.org"
#property version "1.20"
#property description "This code is educational. Feel free to use, modify and upgrade as you wish. Visit ROBOTFX.ORG for professional trading tools"
#include <Canvas\Canvas.mqh>
enum ENUM_LIMIT_MODE
{
LIMIT_PERCENT = 0,
LIMIT_MONEY = 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.