Ninja EA Portfolio Guard MT5
- Utilities
-
Atsushi Katayama
I develop and test MetaTrader 5 Expert Advisors with a focus on backtesting, forward testing, and risk management.
My products do not rely on martingale, grid, or averaging strategies. - Version: 1.3
- Activations: 10
NINJA EA PORTFOLIO GUARD MT5
NINJA EA Portfolio Guard MT5 is an account-wide monitoring and configurable risk-control utility for MetaTrader 5. One instance on one chart can review manual trading and multiple Expert Advisors by Magic Number. It does not predict market direction, generate signals or open new trades.
Critical account-wide scope
CLOSE ALL, DELETE PENDING and automatic protection affect the entire MT5 account, not only the chart symbol. Manual trades, every Magic Number, every EA and every symbol can be affected. Use only one active instance per MT5 account and complete the first tests on a demo account.
Main dashboard
- Balance, equity, floating profit or loss, free margin and margin level
- Current day result including floating P/L, plus weekly and monthly realized results
- Equity drawdown from a persistent peak and closed-balance drawdown
- Account-wide positions, total lots and pending orders
- NORMAL, WATCH, DANGER and MAX USE status
Magic Number analytics
For each Magic Number the table shows 7-day, 14-day and 30-day realized P/L, 30-day profit factor, win rate, maximum losing streak, current positions, lots and floating P/L. Magic Number 0 can be shown separately as Manual. Leave Tracked Magic Numbers blank or enter AUTO for discovery. Magic aliases accepts entries such as 0=Manual;123456=Ninja Trinity.
Configurable limits
- Daily equity loss as a percentage of the adjusted day baseline (default 4%)
- Daily loss in account currency
- Current account-wide floating loss
- Drawdown from persistent peak equity (default 10%)
- Maximum open positions and maximum total lots
- WATCH threshold before a limit is reached (default 80%)
Zero disables an individual limit. Detection delay, connection delay, slippage, gaps, market closure, rejected requests and broker restrictions can cause the final loss to exceed a configured value.
ALERT ONLY and CLOSE ALL
ALERT ONLY is the safe default. It monitors enabled limits and can send popup, sound and push notifications without sending an automatic trade request. Optional CLOSE ALL attempts to close every account position after a breach and can delete all pending orders and save LOCK ON.
The utility cannot switch off other EAs. LOCK ON re-checks remaining or newly detected exposure after it appears. It cannot block an order before the order reaches the broker.
Manual controls
- CLOSE ALL: attempts to close every open account position
- DELETE PENDING: attempts to delete every pending order
- RESET GUARD: sets current equity as the new day baseline and persistent peak, and clears LOCK ON
A Yes/No confirmation is enabled by default. Hold the left mouse button on the blue header or MOVE area and drag to reposition the panel.
Notifications and daily baseline
The same active breach signature is not sent repeatedly. A new alert can occur after recovery and a new breach, or when the set of breached limits changes. For push messages, configure the MetaQuotes ID under Tools > Options > Notifications.
Today incl. float is calculated as current equity minus the saved daily baseline minus detected external cash flow after that baseline. Deposits, withdrawals, credits, bonuses and corrections are excluded from trading P/L. The baseline rolls at the MT5 server-day change.
Safe first test
- Use a demo account with no important trades or other active EAs and keep Automatic action at ALERT ONLY.
- Set a small temporary floating-loss limit and open the smallest manual test position.
- Confirm one popup and one sound, and confirm that ALERT ONLY does not close the position.
- Test CLOSE ALL and DELETE PENDING separately.
- Only then test automatic CLOSE ALL and LOCK ON. Restore ALERT ONLY and disable the temporary limit after testing.
Algo Trading is not required for display-only monitoring. It is required when the utility must send close or delete requests.
Compatibility and important notes
MetaTrader 5 only. Hedging, netting and exchange account modes are detected. In netting accounts, activity from multiple EAs may be combined into one net position, so Magic Number attribution can differ from hedging accounts or the terminal report. No DLL, WebRequest or external data service is used.
This product does not guarantee profit, prevention of every loss or execution exactly at a configured limit. Test with the intended broker, account mode and settings on a demo account before live use.
