Prop Firm Risk Manager: Daily Loss and Trailing Drawdown Protection
Info
The Prop Firm Risk Manager: Daily Loss and Trailing Drawdown Protection is a Expert Advisor for MetaTrader 5 that prop firm risk manager is an account protection tool designed for prop firm challenges and funded accounts. This tool does not open trades.
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 Risk Manager: Daily Loss and Trailing Drawdown Protection
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 Firm Risk Manager is an account protection tool designed for prop firm challenges and funded accounts.
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 Equity Guard: Daily and Maximum Drawdown Protection - another powerful expert for MetaTrader 5 traders.
Prop Firm Risk Manager is an account protection tool designed for prop firm challenges and funded accounts.Also recommended: Prop Firm Guardian: Manage Daily Loss, Max Loss, and Profit Target - similar expert with strong performance on MetaTrader 5.
This tool does not open trades. Instead, it monitors the entire account, including manual trades and trades managed by other EAs, to ensure that firm limits are not breached.How it Works
Daily Loss Limit
- The current day's loss is calculated from the day's starting balance or equity. When the loss approaches the limit minus a safety buffer, all open positions are closed, pending orders are canceled, and trading is disabled until the next day.
Maximum Drawdown
- This can be a static drawdown calculated from the starting balance, or a trailing drawdown calculated from the highest equity reached. The trailing drawdown can be set to lock at the starting balance, as is common practice for many firms. When the equity reaches the drawdown floor plus the buffer, all trades are closed, and the account remains locked.
Profit Target (Optional)
- This feature closes all trades once the equity reaches the starting balance plus the target amount, preventing a passed challenge from being lost.
Exposure Limits (Optional)
- Set limits for the maximum total lots and the maximum number of open positions. The most recently opened positions are closed first.
Friday Close (Optional)
- This feature closes all trades at a specified server time to mitigate risks associated with weekend market gaps.
Panel and Alerts
- Displays real-time information such as equity, today's Profit/Loss, remaining daily loss allowance, drawdown floor, and remaining drawdown allowance. It also provides push notifications to your phone.
Restart Safe
- The equity peak and the lock status are saved in Global Variables for each account. This ensures that protection settings are maintained even if the MetaTrader terminal or VPS restarts.
Inputs
StartBalance
- The initial balance of the trading challenge.
DailyLossUSD, DailyFromEquity, DayResetHour, DailyBufferUSD
- Settings for the daily loss rule. Configure whether your firm measures daily loss from the balance or equity at the start of the day.
DDMode, MaxDDUSD, LockAtStart, MaxDDBufferUSD
- Settings for the overall drawdown rule (static or trailing).
TargetUSD
- The profit target amount. Set to 0 to disable.
MaxOpenLots, MaxOpenPositions
- Settings for exposure limits. Set to 0 to disable.
FridayCloseOn, FridayCloseHHMM
- Settings for weekend protection, specified in server time.
Push, ShowPanel
- Options to enable push notifications and the display panel.
ResetLock
- Set this to true once when starting a new challenge to clear any previously saved lock status.
Usage
- Attach this EA to any chart (any symbol, any timeframe). Ensure Algo Trading is enabled in MetaTrader so the EA can manage positions.
- Set the risk limits slightly tighter than the actual limits set by your prop firm.
- This tool operates alongside any other EAs or manual trading activities on the same account.
You may also like: Prop Risk Guard: Comprehensive Account Protection - excellent alternative for expert users on MetaTrader 5.
Source Code
#property copyright "RobotFX"
#property version "1.00"
#include <Trade/Trade.mqh>
enum ENUM_DD_MODE { DD_STATIC = 0, DD_TRAILING = 1 };
input group "Account"
input double StartBalance = 50000;
input group "Daily loss"
input double DailyLossUSD = 2000;
input bool DailyFromEquity = false;
input int DayResetHour = 0;
.......
⚠ 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.