Lock30x XAUUSD
- Experts
-
Jarrod Emery
I'm an independent Expert Advisor developer with a practical background in trade, systems, and technical problem solving. Before moving into automated trading development, Jarrod worked as a builder for 17 years, where he developed a strong focus on structure, precision, reliability, and - Versione: 2.68
- Aggiornato: 24 giugno 2026
- Attivazioni: 10
LOCK30X XAU AI EA is an automated MetaTrader 5 Expert Advisor developed specifically for trading XAUUSD on the M5 timeframe.
The EA combines short-term gold price-action setups with adaptive position sizing, pending-order entries, trade-management controls, market-health monitoring and a local AI-style scoring engine.
LOCK30X is designed for traders who want an active XAUUSD system with visible chart diagnostics and a clear explanation of why the EA is trading, waiting or blocking a setup.
Recommended Trading Setup
Trading platform: MetaTrader 5
Recommended symbol: XAUUSD
Recommended timeframe: M5
Recommended setfile: LOCK30x XAU M5 More Trades v2.67 AI
Broker symbol names may vary and can include:
-
XAUUSD
-
XAUUSD.a
-
XAUUSDm
-
GOLD
-
GOLD.a
Attach the EA to the broker’s correct gold symbol and use the M5 timeframe.
How LOCK30X XAU TradesLOCK30X analyses completed M5 candles and searches for short-term gold trading opportunities.
The core trading engine checks:
-
Candle direction
-
Candle range
-
Current spread
-
Broker stop-distance requirements
-
Existing buy and sell exposure
-
Available margin
-
Drawdown level
-
Enabled trading direction
-
Trading-hour controls
-
Recent-market safety filters
-
Order timing and expiry settings
When a completed candle satisfies the required conditions, the EA can place a pending order near the recent candle range.
The main core entry types are:
-
BUY LIMIT after a qualifying bullish candle
-
SELL STOP after a qualifying bearish candle
The pending order is given a stop loss and an expiry time. If price does not activate the order within the selected expiry period, the EA removes the pending order and waits for another setup.
The EA uses completed candles rather than reacting to every small tick movement. This helps prevent repeated decisions during the same unfinished candle.
Core BUY and SELL Trading
The supplied More Trades setfile enables both normal BUY and SELL setups.
These core trades are the primary trading system and do not require the AI score to reach the AI threshold.
This is important:
The live AI score does not block the normal core BUY and SELL trades.
The AI threshold is used for the additional AI-assisted Hybrid Boost section.
The core trading engine can therefore continue finding standard setups even when the dashboard shows an AI status of WAIT.
Local AI Market-Quality ScoreLOCK30X includes an internal local AI-style scoring engine that evaluates the quality of current market conditions.
The AI calculation is performed locally inside MetaTrader 5. It does not require:
-
An external API
-
A cloud connection
-
A separate AI subscription
-
An outside website
-
An additional software service
The AI system is a weighted market-quality scoring model. It does not claim to predict the future or learn from an online database.
The score is calculated using factors such as:
-
Current candle range compared with recent average range
-
Candle body strength
-
Closing position inside the candle
-
Current daily profit cushion
-
Current market spread
-
Account equity drawdown
-
Recent losing-trade streak
These factors are combined into a live score between 0 and 100.
Understanding the AI Score
The dashboard may display:
AI Score: 54 / 68 – WAIT
or:
AI Score: 72 / 68 – PASS
The first number is the current calculated market-quality score.
The second number is the minimum score required by the selected setfile.
With the supplied More Trades setfile, the minimum AI score is:
68
When the score is below 68, the dashboard displays:
WAIT
When the score reaches or exceeds 68, the dashboard displays:
PASS
The score does not slowly count from 0 to 68. It is recalculated from current market conditions and may move directly between different values, for example:
41 → 63 → 48 → 71 → 57
This movement is normal because candle strength, spread, drawdown and other conditions are continuously changing.
A PASS result means the AI quality condition has been satisfied. It does not mean an order must immediately open.
The other Hybrid Boost conditions must also be satisfied.
AI-Assisted Hybrid BoostLOCK30X contains a second trading section called the Hybrid Profit Boost.
This section is separate from the normal core entry engine.
The Hybrid Boost is designed to permit an additional momentum-based opportunity only when the account already has a positive daily profit cushion.
Before a Hybrid Boost trade can be placed, the EA checks:
-
Daily profit has reached the unlock level
-
The AI score has passed the required threshold
-
Candle momentum is strong enough
-
Candle range is large enough
-
The candle closes strongly in the intended direction
-
Spread is acceptable
-
Drawdown is acceptable
-
No conflicting managed exposure exists
-
Margin requirements are satisfied
-
The correct broker-server trading hour is active
-
The recent-market guard permits the trade
The AI score therefore works as an additional quality gate for this Boost section.
Hybrid Boost Behaviour in the Supplied Setfile
The supplied More Trades v2.67 AI setfile uses the following configuration:
-
Hybrid Boost enabled
-
AI scoring enabled
-
Minimum AI score set to 68
-
AI Boost BUY entries disabled
-
AI Boost SELL entries enabled
-
AI SELL Boost active from 16:00 to 17:00 broker server time
-
Boost trades allowed only while the EA is flat
-
Momentum confirmation enabled
-
Daily profit unlock level set to 0.50%
-
Boost safety level set to 0.20%
This means the additional AI-assisted trade is currently configured as a SELL-side momentum Boost.
The core BUY and SELL system remains separate and can still operate according to its own entry conditions.
If the daily profit cushion falls back to the configured Boost safety level, the EA can remove pending Boost orders and close positions managed by the Boost system.
Recent-Market Regime GuardThe EA includes a configurable recent-market guard.
This feature can block selected days or periods that performed poorly during recent testing without disabling the complete trading system.
In the supplied More Trades setfile, the recent guard begins from:
1 March 2026
From this date, the core system is configured to block new setups on:
-
Thursday
-
Friday
Monday, Tuesday and Wednesday remain enabled for core entries.
The AI Boost section also includes a restriction that blocks Boost activity after the selected late-session cutoff.
These settings can be changed by the user, but changing them may produce results that differ significantly from the supplied configuration.
Position Sizing and Automatic Lot ScalingLOCK30X includes both fixed and automatic lot-sizing options.
The supplied More Trades setfile uses automatic lot scaling.
The system calculates a starting lot size relative to the account’s reference equity and capital reference balance.
The supplied profile uses:
-
Base lot input: 3.00 lots
-
Capital reference balance: 200,000
-
Automatic equity-based scaling enabled
-
Lot-step interval: 250
-
Lot increase per step: 0.01
-
Maximum lot cap: 10.00
The 3.00 lot input is the reference size for a 200,000 account. It does not mean every account will automatically trade 3.00 lots.
For example, an account smaller than the reference balance will receive a proportionally smaller detected base lot, subject to the broker’s minimum lot and lot-step requirements.
The final live lot can also be reduced by:
-
Margin availability
-
Drawdown brakes
-
Recovery-mode controls
-
Maximum lot caps
-
Broker volume restrictions
The calculated live lot is displayed on the chart dashboard.
Users should always check the displayed lot size before allowing live trading.
This is an active More Trades profile and should not be treated as a universal risk setting for every account size.
Adaptive Drawdown ControlsLOCK30X contains adaptive controls designed to reduce exposure as drawdown increases.
The supplied setfile enables:
-
Equity-based scaling
-
Level 1 drawdown brake
-
Level 2 drawdown brake
-
Reduced-lot recovery mode
-
Maximum lot protection
-
Margin usage limits
At the first drawdown level, the EA can reduce its calculated lot multiplier.
At the second drawdown level, it can reduce the lot size further.
Recovery mode also uses reduced exposure rather than increasing lot size after losses.
LOCK30X is not designed as a martingale lot-doubling system.
Daily Loss ProtectionThe EA includes an account-level daily loss protection system.
Depending on the selected inputs, this guard can:
-
Monitor current daily equity performance
-
Stop new trading after the selected loss level
-
Delete managed pending orders
-
Close managed positions
-
Apply an emergency account-wide close
-
Reset at a configurable daily reset time
The supplied setfile has this protection enabled.
Users should confirm that the configured reset time is suitable for their broker, location and intended account conditions.
The protection system reduces risk but cannot guarantee that slippage, price gaps or fast market conditions will never exceed the selected level.
Trade ManagementOnce a position has been activated, the EA manages it using its configured protection logic.
Available trade-management controls include:
-
Initial stop loss
-
Trailing-stop activation level
-
Active trailing distance
-
Pending-order expiry
-
Optional maximum holding-time exit
-
Optional force-close hour
-
Broker stop-distance protection
-
Margin protection
The supplied More Trades setfile uses:
-
Initial stop-loss protection
-
Trailing-stop management
-
Shorter pending-order expiry
-
Maximum-hold exit disabled
-
Force-close hour disabled
The optional maximum-hold and force-close features can be enabled manually, but doing so changes the supplied strategy behaviour.
Spread, Margin and Broker ProtectionGold trading conditions can change quickly, especially during major news events, market openings and low-liquidity periods.
LOCK30X checks broker and account conditions before submitting an order.
These checks include:
-
Current bid and ask prices
-
Minimum broker stop distance
-
Required order margin
-
Available free margin
-
Maximum allowed margin usage
-
Broker volume minimum
-
Broker volume maximum
-
Broker lot-step size
-
Entry and stop-distance buffers
-
Market tick health
If a requested lot would require too much margin, the EA can reduce the lot to a safer available size.
If no valid lot can be calculated, the order is not placed.
Market-Health MonitoringThe EA contains market-feed and runtime diagnostics.
The health system can monitor:
-
Age of the most recent market tick
-
Symbol availability
-
Trading permission
-
Price-feed status
-
Broker order restrictions
-
Runtime errors
-
Pending-order deletion attempts
If the market feed is unhealthy or required trading information is unavailable, the EA can wait instead of sending an order under uncertain conditions.
Chart DashboardLOCK30X includes a detailed chart dashboard showing the current condition of the EA.
The panel can display:
-
EA active status
-
Account balance
-
Account equity
-
Total profit
-
Floating profit or loss
-
Open positions
-
Pending orders
-
Current drawdown
-
Current trading direction
-
Current engine status
-
Reason the EA is waiting
-
Broker server day and hour
-
Daily protection status
-
AI score
-
AI WAIT or PASS status
-
Current spread
-
Current calculated lot
-
Maximum lot cap
-
Stop-loss and trailing settings
-
Drawdown brake status
-
Recovery-mode status
-
Bars or time before the next evaluation
The dashboard is intended to make the EA easier to understand.
For example, the panel may show that the EA is waiting because:
-
The candle range is too small
-
The setup direction is disabled
-
A recent-regime day is blocked
-
The spread is too high
-
The EA already has exposure
-
The decision timer is active
-
The AI score is below 68
-
The Boost profit cushion is locked
-
The required trading hour has not started
The EA can display trade information directly on the chart.
Available chart visuals include:
-
Pending-order markers
-
Closed-trade labels
-
Trade result text
-
Staggered labels to reduce overlap
-
Trade flash notifications
-
LOCK30X chart branding
-
Current operating-status badge
These display features can be disabled in the EA inputs if a cleaner chart is preferred.
Main Features-
Developed for XAUUSD
-
Designed for the M5 timeframe
-
Automated BUY and SELL core trading
-
BUY LIMIT and SELL STOP pending entries
-
Local AI-style market-quality score
-
Live AI WAIT and PASS display
-
AI-assisted Hybrid Boost section
-
Candle range and momentum analysis
-
Completed-candle decision logic
-
Automatic lot scaling
-
Equity-based lot adjustment
-
Drawdown lot-reduction controls
-
Reduced-risk recovery mode
-
Maximum lot caps
-
Margin usage protection
-
Account-level daily loss protection
-
Pending-order expiry
-
Stop-loss protection
-
Trailing-stop management
-
Optional maximum holding-time exit
-
Optional force-close hour
-
Optional no-hedge mode
-
Recent-market regime guard
-
Broker stop-distance protection
-
Market tick-health monitoring
-
Chart statistics dashboard
-
Trade markers and flash notifications
-
Debug and trade-event logging options
-
Market validation safe mode
RECOMMENDED SETFILE
Download the Setfile Here
Setfile name:
LOCK30X_XAU_M5_2026_SMOOTHER_SCALING_v2.68_AI_DAILY_GUARD.set
The supplied setfile is configured for:
-
XAUUSD
-
M5 timeframe
-
Core BUY setups enabled
-
Core SELL setups enabled
-
Core hour filters disabled
-
Automatic lot scaling
-
Equity-based scaling
-
Drawdown brakes
-
Daily loss protection
-
AI scoring enabled
-
Minimum AI score of 68
-
SELL-side AI Boost enabled
-
BUY-side AI Boost disabled
-
AI SELL Boost from 16:00 to 17:00 server time
-
Recent-market weekday guard
-
Pending-order expiry
-
Trailing-stop management
-
Margin and maximum-lot protection
The setfile is supplied as a tested starting configuration. It is not guaranteed to produce identical results with every broker or account.
OPTIONAL MORE TRADES SETFILE
An additional setfile is also available for users who prefer a higher trading frequency:
LOCK30x_XAU_M5_MORE_TRADES_v2.68_AI_DAILY_GUARD.set
This profile allows the EA to search for and take more trading opportunities. Although it may perform strongly during favourable market conditions, the increased trading frequency can also produce larger losing periods, deeper drawdowns and greater overall account risk.
For this reason, the SMOOTHER SCALING setfile remains the recommended configuration for users seeking more controlled and consistent long-term performance. Always backtest the More Trades profile using your own broker, account balance and trading conditions before considering live use.
How to Install the EA
MQL5 Market products are installed through MetaTrader 5.
-
Open MetaTrader 5.
-
Sign in to the MQL5 account used to purchase or rent the product.
-
Open the Navigator or Market section.
-
Locate LOCK30X XAU AI EA.
-
Click Install.
-
Open an XAUUSD chart.
-
Change the timeframe to M5.
-
Drag LOCK30X XAU AI EA onto the chart.
-
Open the Inputs tab.
-
Load the recommended setfile.
-
Click OK.
-
Enable Algo Trading.
When correctly installed, the LOCK30X dashboard will appear on the chart.
How to Load the Setfile-
Download the .set file from the link above.
-
Save it somewhere easy to locate.
-
Open an XAUUSD M5 chart.
-
Attach LOCK30X XAU AI EA to the chart.
-
Select the Inputs tab.
-
Click Load.
-
Locate the downloaded .set file.
-
Select the file.
-
Click Open.
-
Confirm that the input values have changed.
-
Click OK.
-
Enable Algo Trading.
The EA should then display its dashboard and begin monitoring the market.
The EA may remain in a waiting state until a valid completed M5 candle satisfies all required conditions.
How to Backtest LOCK30X-
Open the MetaTrader 5 Strategy Tester.
-
Select LOCK30X XAU AI EA.
-
Select the broker’s XAUUSD symbol.
-
Select the M5 timeframe.
-
Choose Every tick based on real ticks, when available.
-
Open the Inputs tab.
-
Click Load.
-
Select the supplied setfile.
-
Enter the intended deposit.
-
Select the intended leverage.
-
Select the required date range.
-
Start the backtest.
For more realistic testing, match the intended account conditions as closely as possible.
These include:
-
Starting balance
-
Leverage
-
Spread
-
Commission
-
Swap
-
Execution delay
-
Symbol contract size
-
Minimum lot
-
Lot-step size
Test both long-term and recent market periods separately.
Important Broker DifferencesXAUUSD trading conditions can vary significantly between brokers.
Differences may include:
-
Symbol name
-
Price digits
-
Tick size
-
Tick value
-
Contract size
-
Minimum lot
-
Maximum lot
-
Lot step
-
Spread
-
Commission
-
Swap
-
Stop-level restrictions
-
Execution speed
-
Slippage
-
Server time
-
Historical tick quality
Because of these differences, the same setfile may produce different trades and results on different brokers.
Broker server time is especially important because the AI Boost trading window uses broker server hours.
Important Usage NotesBefore allowing live trading, confirm that:
-
The correct gold symbol is selected
-
The chart is set to M5
-
The recommended setfile has been loaded
-
Algo Trading is enabled
-
The market is open
-
The broker allows automated trading
-
The displayed lot size is suitable
-
Sufficient free margin is available
-
The broker server time is understood
-
The EA dashboard shows a healthy status
Keep MetaTrader 5 running and connected while the EA is trading.
A suitable VPS can be used for continuous operation.
Avoid manually changing or closing managed trades unless you understand how the EA will respond.
Use a different Magic Number when running separate configurations that should not manage the same orders.
Performance NoticeAny screenshots, reports or backtests displayed on the product page represent historical testing unless clearly stated otherwise.
Backtesting cannot perfectly reproduce future live execution.
Results may change because of:
-
Different broker data
-
Spread expansion
-
Commission
-
Swap
-
Slippage
-
Gold-market volatility
-
News events
-
Liquidity changes
-
Execution speed
-
VPS latency
-
Different contract specifications
-
Future market conditions
Past performance does not guarantee future results.
Broker Validation Backtests
To further validate the robustness of LOCK30X XAU AI EA, the recommended setfile was tested across multiple broker environments using historical data from January 2020 through June 2026.
The following broker-specific backtests were completed:
-
BlackBull Markets — January 2020 to June 2026
-
IC Markets — January 2020 to June 2026
-
FTMO — January 2020 to June 2026
These tests were performed to evaluate strategy consistency across different broker conditions, including variations in spreads, execution environments, symbol specifications, server times, and historical tick data.
As with all algorithmic trading systems, results may vary between brokers due to differences in pricing feeds, liquidity, commission structures, spread behaviour, execution speed, and contract specifications. For this reason, traders are encouraged to perform their own broker-specific testing before live deployment.
The inclusion of multiple broker backtests provides an additional layer of validation by demonstrating how the strategy responds under differing market data environments over a long-term historical period spanning more than six years.
Risk WarningTrading Forex, CFDs and Gold involves substantial risk.
LOCK30X XAU AI EA is a trading tool and does not guarantee profit or prevent losses.
The AI score is an internal market-quality filter. A high score or PASS status does not guarantee that a trade will be profitable.
Users are responsible for selecting suitable account settings, lot sizes and risk levels.
Always perform your own backtesting and demo forward testing before considering live trading.
Never trade with money that you cannot afford to lose.


Good Robot