MQLXpert TradeLock
- Utilità
-
Luke John Smith
I’m a full-time MQL5 developer.
I build Expert Advisors, indicators, dashboards and trading tools for traders who want real automation — not theory.
I specialise in turning manual trading strategies into clean, stable and fully automated systems that can run reliably in real market conditions. - Versione: 1.12
- Attivazioni: 5
MQLXpert TradeLock
Account Protection and Risk Management Utility for MetaTrader 5
MQLXpert TradeLock is an automated account monitoring and risk management utility designed for retail traders and proprietary trading firm participants.
TradeLock monitors your account equity, drawdown, daily performance, trading sessions and economic news restrictions from a single interactive dashboard.
Its configurable protection rules help traders maintain discipline and manage their exposure according to their individual trading requirements.
Key Features
-
Maximum overall drawdown protection.
-
Maximum daily drawdown protection.
-
Daily profit target management.
-
Static and trailing drawdown modes.
-
Automatic position closure.
-
Automatic pending order deletion.
-
Configurable trading session restrictions.
-
High and medium-impact economic news filtering.
-
Adjustable daily reset time.
-
Persistent financial locks across terminal restarts.
-
Manual overall protection reset.
-
Account-wide monitoring and management.
-
Optional popup alerts and push notifications.
-
Interactive and customisable dashboard.
-
Monitoring-only mode.
Drawdown Protection
TradeLock provides two independently configurable drawdown protection modes:
-
Static: Calculates drawdown relative to a fixed reference balance.
-
Trailing: Calculates drawdown relative to the highest recorded equity during the applicable monitoring period.
When a configured drawdown threshold is reached, TradeLock activates the corresponding financial lock and, when enforcement is enabled, closes open positions and deletes pending orders.
Daily locks reset at the configured daily reset time. The overall lock remains active until deliberately reset by the user.
Daily Profit Target
Set a daily percentage-based account target.
Once account equity reaches the configured target, TradeLock activates the daily profit lock and closes open positions when enforcement is enabled.
The lock remains active until the next configured daily reset.
Trading Session Protection
Define your permitted trading hours using broker server time.
TradeLock detects and closes new positions opened outside the permitted session and removes pending orders during restricted hours.
Users can also choose whether existing positions should be closed when the trading session ends.
Economic News Protection
TradeLock uses the MetaTrader 5 economic calendar to identify relevant scheduled news events.
-
High and medium-impact news filtering.
-
Adjustable restriction periods before and after news events.
-
Instrument-specific currency filtering.
-
Optional closure of existing positions during news restrictions.
-
Automatic removal of affected pending orders.
-
Optional restrictions when calendar data is unavailable.
Interactive Dashboard
The on-chart dashboard provides a clear overview of your account and protection status, including:
-
Account balance and equity.
-
Daily reference balance.
-
Current daily and overall drawdown.
-
Remaining loss allowances.
-
Daily target progress.
-
Financial lock status.
-
Trading session status.
-
Relevant economic news information.
-
Next scheduled daily reset.
The dashboard can be minimised, repositioned and customised.
Input Parameters
Protection Settings
-
CloseTradesOnLock: Enable automatic trade enforcement or monitoring-only mode.
-
UsePopupAlerts: Enable terminal popup alerts.
-
UsePushNotifications: Enable mobile push notifications.
-
CloseDeviationPoints: Permitted execution deviation in points, where applicable.
Overall Drawdown Settings
-
UseOverallMaxDrawdownLock: Enable overall drawdown protection.
-
OverallStartingBalance: Set a custom starting balance. Zero automatically captures the account balance on first use.
-
OverallMaxDrawdownPercent: Maximum overall drawdown percentage.
-
OverallDrawdownMode: Select Static or Trailing.
-
OverallResetToken: Increase this value to reset overall protection when the account has no open positions or pending orders.
Daily Drawdown Settings
-
UseDailyDrawdownLock: Enable daily drawdown protection.
-
MaxAllowedDrawdownPercent: Maximum daily drawdown percentage.
-
DailyDrawdownMode: Select Static or Trailing.
-
DailyResetHour: Daily reset hour.
-
DailyResetMinute: Daily reset minute.
Daily Target Settings
-
UseProfitTargetLock: Enable daily target protection.
-
DailyProfitTargetPercent: Daily percentage-based account target.
Session Settings
-
UseSessionLock: Enable trading session restrictions.
-
StartHour: Trading session start hour.
-
StartMinute: Trading session start minute.
-
EndHour: Trading session end hour.
-
EndMinute: Trading session end minute.
-
CloseExistingOutsideSession: Close existing positions outside permitted trading hours.
News Settings
-
UseNewsFilter: Enable economic news protection.
-
NewsMinutesBefore: Restriction period before a news event.
-
NewsMinutesAfter: Restriction period after a news event.
-
FilterHighImpactNews: Include high-impact events.
-
FilterMediumImpactNews: Include medium-impact events.
-
CloseExistingDuringNews: Close existing positions during applicable news restrictions.
-
BlockWhenCalendarUnavailable: Apply news restrictions when calendar data is unavailable.
Dashboard Settings
-
ShowDashboard: Enable or disable the dashboard.
-
DashboardCorner: Dashboard alignment.
-
DashboardX: Horizontal position.
-
DashboardY: Vertical position.
-
DashboardFontSize: Dashboard text size.
-
DashboardTextColor: Text colour.
-
DashboardBgColor: Background colour.
-
DashboardBorderColor: Border colour.
How to Use
-
Attach TradeLock to a single chart.
-
Configure your account protection rules.
-
Configure your daily reset time and trading sessions.
-
Adjust your economic news settings.
-
Enable algorithmic trading for automatic enforcement.
TradeLock monitors the entire trading account. There is no need to attach it to every chart.
Important Information
TradeLock is a risk management utility and does not generate trading signals or independently open positions.
When automatic enforcement is enabled, TradeLock manages all applicable positions and pending orders across the account, including manual trades and trades opened by other Expert Advisors.
TradeLock detects and closes restricted trades after execution rather than preventing their initial submission. Execution delays, slippage, spreads and market gaps may cause configured thresholds to be exceeded.
MetaTrader 5 must remain running and connected with algorithmic trading enabled for automatic enforcement.
Users should configure the protection rules according to their individual trading requirements and test them on a demo account before live use.
Developed by MQLXpert
Code for Traders. By Traders.
