LOCK30x XAUUSD v2.82: A Separately Owned Trend Complement and Safer Stop Handling
21 August 2026, 23:52
0
11
LOCK30x XAUUSD v2.82 updates the MetaTrader 5 Expert Advisor developed for Gold on M5. It preserves the complete v2.81 V7 More Trades core and adds a separately owned 48-hour/72-hour trend-complement layer.
The design objective was to support the original system during changing Gold regimes without allowing the new layer to rewrite the core’s sizing, recovery, drawdown or profit-boost decisions.
Preserving the Original Core
The v2.81 core remains intact in v2.82. Its built-in defaults, established trade identity and original risk behaviour were retained. The trend complement is additive rather than a replacement.
Every complement trade has independent ownership and accounting. Complement realised profit, floating exposure, margin use, daily-loss state and position count are separated from the original LOCK30x core. This prevents an additional strategy from silently changing the capital reference used by the system it is intended to support.
Trend-Complement Method
The new layer evaluates completed H1 trend information and completed 48-hour/72-hour ranges. It can place independently identified pending orders when its own regime and range conditions are satisfied.
Complement orders have their own position limits, daily-loss protection, margin cap, break-even handling, trailing-stop management, pending-order expiry and spread protection. Accounting is reconstructed after restart so routine terminal or EA reinitialisation does not erase the complement’s current-day risk state.
The complement uses separate position ownership and does not depend on external APIs, DLL calls or cloud signals.
Broker-Safe Stop Modification
The first v2.82 Market draft exposed an execution edge case during MQL5 automatic validation. On the validator’s XAUUSD D1 netting test, two sell-position stop modifications were rejected as Invalid stops.
The final build hardened stop handling in both the original core and the complement. Stop prices are rounded in the safe direction to the symbol’s actual tick size. The EA respects the larger of the broker’s minimum stop distance and freeze distance and adds a small execution cushion before submitting the request.
After clamping the price, the EA checks again that the new stop genuinely improves the position. OrderCheck is used before OrderSend so an invalid request can be rejected locally rather than repeatedly sent to the trade server.
The repaired EX5 completed clean reproduction checks on XAUUSD D1 netting and EURUSD H1 netting. It then passed MQL5 automatic validation and was published as v2.82.
Testing and Installation
Install or update LOCK30x through Market > Purchased in MetaTrader 5. Attach one instance to the broker’s XAUUSD or Gold-equivalent M5 chart and enable algorithmic trading.
Begin with built-in defaults. An old v2.81 SET file is not required and may overwrite the v2.82 stock profile. Before live use, test with the intended broker and verify symbol suffix, contract size, minimum volume, volume step, spread, commission, swap, leverage, stop level, freeze level and account position mode.
Historical Validation Context
The final build was tested on XAUUSD M5 using both a recent 2026 window and a longer historical regression. These simulations compared the preserved core with the added complement under the same test conditions. They were engineering evidence, not promises of future profit.
The accepted v2.82 candidate improved the fresh-2026 result in the frozen research environment while retaining all original-core trades and adding separately attributed complement trades. The longer regression showed that the additional return came with higher full-history drawdown. That trade-off is documented rather than hidden.
Risk Notice
LOCK30x is automated trading software and does not guarantee profit. Gold trading involves leverage, rapid price movement, gaps, slippage, spread expansion and possible order rejection. Backtests are simulations and can change materially with data quality, broker specifications, costs, server time, leverage and execution.
Use the Strategy Tester and a demo account before live use. Select exposure appropriate for the account and monitor the EA after any broker, symbol, terminal, version or input change.


