Protectron — Product Reference Page
This page covers the full technical detail, settings guide, and configuration examples for the Protectron utility listed on the MQL5 Marketplace.
How It Works
When Protectron starts, it determines the initial deposit baseline using either Auto mode (current account balance) or Manual mode (a user-specified value). This baseline is used for all profit and loss threshold calculations.
Protectron then monitors account equity — balance plus floating profit and loss — on every tick. When equity reaches the configured profit target or drops to the configured loss limit, the following actions occur in sequence:
- All open positions are closed immediately
- Pending orders are deleted if that option is enabled
- An alert notification is sent if that option is enabled
- Protection status is activated, preventing re-triggering
After triggering, Protectron enters protection active mode and stops further actions. The user retains full control to restart or adjust settings at any time.
Profit Target Settings
The profit target defines the upper equity threshold at which all positions are closed. Five calculation modes are available:
- Off — no upper threshold, profit target disabled
- Equity — close when account equity reaches a fixed level. Example: set 15000 to close when equity reaches $15,000
- Amount — close when profit from initial deposit reaches a dollar amount. Example: set 1000 to close when profit reaches $1,000
- Percent of Deposit — close when profit reaches a percentage of initial deposit. Example: set 10 to close at 10% gain
- Percent of Balance — close when profit reaches a percentage of current balance. Example: set 5 to close when balance is up 5%
Profit target examples based on a $10,000 initial deposit:
- Amount mode, value 1000 — triggers at $11,000 equity
- Percent of Deposit mode, value 15 — triggers at $11,500 equity
- Equity mode, value 12500 — triggers at $12,500 equity
Loss Limit Settings
The loss limit defines the lower equity threshold at which all positions are closed. The same five calculation modes are available:
- Off — no lower threshold, loss limit disabled
- Equity — close when account equity drops to a fixed level. Example: set 9000 to close when equity drops to $9,000
- Amount — close when loss from initial deposit reaches a dollar amount. Example: set 500 to close when loss reaches $500
- Percent of Deposit — close when loss reaches a percentage of initial deposit. Example: set 5 to close at 5% loss
- Percent of Balance — close when loss reaches a percentage of current balance
Initial Deposit Settings
The initial deposit is the baseline value used for all amount and percentage calculations. Two detection modes are available:
- Auto — uses the current account balance at the time Protectron starts. Suitable for most users.
- Manual — uses a user-specified value. Use this mode when the account has existing open positions at startup or when a precise baseline is required. Example: set 10000 to use $10,000 as the baseline regardless of current balance.
Additional Settings
- Delete Pending Orders — when enabled, all pending orders are removed at the same time positions are closed
- Alert on Trigger — sends a MetaTrader alert notification when either threshold is reached
- Disable Algo Trading on Trigger — optionally disables the algo trading button in MetaTrader after protection activates, preventing any EA from opening new trades
Notes
- Protectron hedges all open positions on the account, including those opened manually or by other Expert Advisors. It does not distinguish between trade sources.
- Protection triggers once per session. After activation, Protectron stops monitoring until manually restarted.
- For prop firm use, set the loss limit to match the firm's maximum daily drawdown rule and the upper threshold to match the profit target. Protectron will enforce both automatically.
- Identical functionality is available on both MetaTrader 4 and MetaTrader 5.


