AccountGuard is a small single-header account lock for MT5 Expert Advisors. Restrict your EA to specific account numbers, with an optional demo allowance, an expiry date and a Strategy Tester bypass so you can still backtest.
The licence is compiled into the .ex5 with #define lines, so the end user cannot unlock it from the Inputs tab.

How to use
#define AG_ALLOWED_LOGINS "12345678, Broker-Real8:5012345678"
#define AG_ALLOW_DEMO true // any demo account can try it
#define AG_EXPIRY D'2026.12.31 23:59' // 0 = never
#include "AccountGuard.mqh"
int OnInit() { AG_Init(); ... }
void OnTick()
{
ManageOpenPositions(); // exits keep working
if(!AG_Allowed()) return; // no NEW trades when locked
...
}Settings (#define, before the #include)
Functions
Inputs
Safety
Example EA
AccountGuard_Demo.mq5 shows "AccountGuard: allowed" or "AccountGuard: LOCKED" with the reason on the chart. On a live or demo chart it never trades. In the Strategy Tester only (InpTesterDemo), it opens one minimum-lot example trade per day through the AG_Allowed() gate.
Honest limits
PropGuard Lite - daily and max loss guard for prop firm accounts
Risk tool for prop firm accounts: closes all positions and blocks new trades when the daily loss or max loss limit is reached. Never opens trades on a live chart.
Line Master – Fast and Slow Trend Lines with Trend Change Signals
Line Master is a trend-following indicator for MetaTrader 5 that displays fast and slow dynamic price lines to help traders identify market direction and potential trend changes. Blue represents a bullish trend, while red represents a bearish trend. Visual markers highlight changes in the indicator's trend state. The indicator includes adjustable Fast Length and Slow Length parameters, allowing traders to customize its sensitivity. It can be used on forex, gold (XAUUSD), indices, and other MT5-supported markets. For better results, combine its signals with price action, support and resistance levels, and proper risk management. Signals are not guaranteed and should be confirmed before entering a trade.
Live Test Bench: automated checks of an EA on a demo account
Automated checks of an Expert Advisor on a live demo chart (restart, second copy, server history, chart button) with a PASS/FAIL report.
TesterReport: read a saved Strategy Tester report into deals and trades
Reads a Strategy Tester report saved as HTML into its deals, closed trades, net profit and balance drawdowns, for comparing, combining or exporting backtests.