Description
Short Description: An account-wide portfolio protection EA that monitors total equity, closes basket trades on profit/loss targets, and protects account drawdowns.
Overview
The Basket-Equity Guardian EA is an account-level risk management system for MetaTrader 4 and MetaTrader 5. It acts as an overarching safety net for your entire account, monitoring combined floating P/L across all open orders and automatically liquidating trades when portfolio profit targets or maximum drawdown caps are reached.
Key Features
- Account-Wide Equity Tracking: Monitors overall floating P/L ($ and %) across all open instruments.
- Basket Profit Target Close: Flattens all positions when basket profit reaches predefined dollar or percentage targets.
- Emergency Equity Loss Cap: Immediately liquidates all positions if account equity drops below a critical threshold.
- Trailing Equity Profit: Locks in floating portfolio gains by trailing total account equity upward.
- Timer & End-of-Day Shutdown: Automatically flattens open orders before weekend market close.
How It Works
1. Tick Inspection: Calculates total floating account equity on every tick.
2. Threshold Evaluation: Compares current equity against Peak Equity, Daily Starting Equity, Profit Target, and Loss Limit.
3. Emergency Liquidation: Dispatches fast multi-threaded order close requests if any threshold is breached.
Trading/Indicator Logic
- Target Profit: If `AccountEquity >= TargetEquityUSD`, close all orders.
- Max Loss Limit: If `AccountEquity <= MinEquityUSD`, close all orders and halt trading.
- Trailing Equity: If `AccountEquity` drops `TrailingEquityStepUSD` below Peak Equity, close all orders.
Supported Markets
- All Financial Markets (Forex, Metals, Indices, Crypto)
Recommended Timeframes
- All Timeframes
Recommended Symbols
- Account-Wide Protection (All Open Symbols)
Main Settings
- `TargetProfitUSD` (500.0): Basket profit target in cash.
- `MaxLossUSD` (200.0): Basket max loss limit in cash.
- `UseTrailingEquity` (true): Enable trailing equity target.
- `CloseAtWeekend` (true): Flatten positions before weekend.
Installation
1. Copy `.ex4` or `.ex5` to `MQL4/Experts` or `MQL5/Experts`.
2. Attach to any chart and enable Algo Trading.
How To Use
1. Set desired dollar target and loss limits and keep running on your MT4/MT5 terminal or VPS.
Who Is It For
- Prop Firm & Portfolio Traders: Managing multiple EAs or manual trades simultaneously.
What’s Included
- `.EX4` / `.EX5` Executables + User Manual + Support.
Updates & Support
Includes lifetime updates.
Risk Disclaimer
Test thoroughly on demo accounts prior to live deployment.
FAQ
Q: Does this close trades on all symbols?
A: Yes, it manages the entire account equity basket.
📊 Backtested Performance Summary
This Expert Advisor has undergone quantitative historical backtesting based on tick and bar market data:
- Best Tested Symbol: EURUSD
- Best Timeframe: H4
- Testing Period: 2020.01.01 – 2026.08.28
- Net Profit: $3,632.23
- Profit Factor: 1.18
- Maximum Drawdown: 14.2%
- Recovery Factor: 1.71
- Total Trades: 278
- Out-of-Sample Result: PF: 0.94, WinRate: 32.2%
⚠️ Disclaimer: Historical backtest results are provided for informational and research purposes only and do not guarantee future live trading performance. Past performance is not indicative of future returns.





Reviews
There are no reviews yet.