Account Protector Expert Advisor for MT4/MT5 – Advanced Trade & Account Protection System

12/16/2022

Account Protector is a powerful MetaTrader Expert Advisor designed to help traders protect their trading accounts by automatically managing trades, controlling risk, and enforcing profit and loss limits. It allows traders to monitor and manage positions across multiple instruments using a flexible system of conditions, filters, and actions.

Compatible with both MetaTrader 4 and MetaTrader 5 (including hedging and netting modes), Account Protector acts as a safety layer between the market and your trading capital.

What Account Protector Can Do
With Account Protector, you can automate many critical account-protection tasks, such as:

  • Close all positions once account equity reaches a predefined profit level
  • Close losing or profitable trades when floating loss or profit hits a specific threshold
  • Partially close positions when a target profit is reached
  • Delete pending orders under custom conditions
  • Disable or enable AutoTrading automatically
  • Exit the MetaTrader platform at a specific time or after certain events
  • Stop trading after reaching a daily loss or profit limit
  • Trigger actions based on equity, free margin, margin level, spread, price level, or time

This makes Account Protector ideal for risk control, capital preservation, and disciplined trading.

Key Benefits

  • Full control via a graphical on-chart panel
  • Easily movable, minimizable, and customizable interface
  • One-click adjustment of all major settings
  • Advanced trailing stop and breakeven mechanisms
  • Hidden equity-based trailing stop
  • Timer-based execution of actions
  • Optional inclusion of swaps and commissions in profit/loss calculations
  • Live spread display
  • Equity and free margin snapshots for advanced trigger logic
  • Powerful trade filtering by symbol, magic number, and order comment
  • Ability to combine multiple conditions and actions simultaneously
  • Email alerts and mobile push notifications
  • Automatic saving and restoring of settings
  • Works with or without DLLs (DLLs required only for AutoTrading control)
  • Open-source and fully customizable
  • High-DPI screen support (4K friendly)

User Interface Overview
Main Tab
The Main tab controls trailing stop, breakeven, equity trailing stop, timers, and snapshot settings. It also displays the current spread and overall EA status. Traders can enable or disable each function with simple checkboxes and numeric inputs.

Filters Tab
This tab allows you to define which trades Account Protector manages. Trades can be filtered by:

  • Magic numbers
  • Trading symbols
  • Order comments

Filters can be combined to precisely target or exclude specific trades.

Conditions Tab
The Conditions tab is the core logic engine of Account Protector. It includes a wide range of trigger conditions based on:

  • Floating profit or loss (percentage, money, or points)
  • Account equity and equity snapshots
  • Free margin and margin snapshots
  • Margin level
  • Market price of the current chart
  • Spread values
  • Daily profit and loss limits

Once any enabled condition is met, Account Protector immediately triggers the selected actions.

Actions Tab
When a condition is triggered, Account Protector can automatically execute actions such as:

  • Closing all or part of open positions
  • Deleting pending orders
  • Enabling or disabling AutoTrading
  • Sending email alerts or push notifications
  • Closing the MetaTrader platform
  • Recapturing equity and margin snapshots

This flexible action system allows traders to design precise emergency or profit-protection workflows.

How Account Protector Works
Account Protector continuously monitors your account based on the conditions you define. When at least one condition is triggered, the EA executes all selected actions instantly. This ensures fast response during volatile market conditions and protects your capital even when you are away from the screen.

An optional Emergency Button can be enabled, allowing you to instantly close all trades, delete pending orders, and disable AutoTrading with a single click.

Status & Logging
The EA displays its operational status directly on the panel, clearly indicating whether it is active, waiting for conditions, or has been triggered. Detailed logs are recorded for all actions, conditions, and errors, providing full transparency and easy troubleshooting.

Installation

  1. Copy the Account Protector folder into:
    • /MQL4/Experts/ for MetaTrader 4
    • /MQL5/Experts/ for MetaTrader 5
  2. Compile the EA in MetaEditor
  3. Attach it to any chart
  4. Enable AutoTrading (and DLL imports if AutoTrading control is required)

Conclusion
Account Protector Expert Advisor is an essential risk-management and account-safety tool for serious traders. By automating trade protection, enforcing strict risk rules, and reacting instantly to predefined conditions, it helps traders preserve capital, lock in profits, and trade with greater confidence and discipline.

Account Protector | MT4
Account Protector | MT5

Password:forexsignalpro.net

Disclaimer: Always test the robot on a demo account before using real money. Trading involves risk.