Max Lot Limiter with Auto Close
- Utilities
- Version: 1.20
- Activations: 5
Automated Risk Management for MetaTrader 5
Max Lot Limiter with Auto Close is an automated risk management Expert Advisor designed for MetaTrader 5.
The EA continuously monitors the combined trading volume of open positions across all symbols on your trading account.
When the configured maximum total lot limit is exceeded, the EA automatically initiates an emergency closing procedure and attempts to close ALL open positions on the account, regardless of whether they are profitable or losing.
The goal is to help traders prevent uncontrolled position sizing and reduce the risk of excessive trading exposure.
Main Features
-
Account-wide monitoring of open position volume across all trading symbols.
-
Customizable maximum total lot limit.
-
Default maximum volume: 0.70 lots.
-
Automatic emergency closing when the configured limit is exceeded.
-
Attempts to close ALL open positions, not just the excess volume.
-
Optional inclusion of pending orders in the total volume calculation.
-
Optional deletion of pending orders when the limit is exceeded.
-
Event-driven monitoring with additional tick and timer checks.
-
Automatic retry attempts if closing requests fail.
-
Works independently of the chart symbol.
Input Parameters
-
MaxTotalLots: Maximum permitted total lot volume. Default: 0.70.
-
IncludePendingOrdersInLimit: Include pending orders in the total volume calculation.
-
DeletePendingOrdersOnLimitBreach: Delete pending orders when the limit is exceeded.
-
CheckIntervalSeconds: Additional monitoring interval.
-
RetryIntervalSeconds: Interval between retry attempts.
How to Install and Use
-
Open MetaTrader 5.
-
Open the Toolbox window and select the Market tab.
-
Go to Purchases and download Max Lot Limiter with Auto Close.
-
Open the Navigator window by pressing Ctrl+N.
-
Find the EA under Expert Advisors → Market.
-
Drag the EA onto any chart.
-
Enable Algo Trading and allow algorithmic trading in the EA settings under the Common tab.
-
Open the Inputs tab and set your desired maximum total lot volume, for example 0.70.
-
Confirm the settings and keep MetaTrader 5 running and connected to your trading server.
No programming knowledge, source code editing or manual compilation is required.
The EA monitors positions across the entire trading account, not just the symbol of the chart it is attached to.
Important Risk Information
This EA does not prevent orders from being submitted. It detects when the configured limit is exceeded and attempts to close all open positions.
Closing execution cannot be guaranteed to be instantaneous or successful. Execution depends on broker conditions, market liquidity, trading permissions and terminal connectivity.
The EA must remain active in a running and connected MetaTrader 5 terminal.
Always test the EA on a demo account before using it on a live account.
