MQLXpert Gold MSE
- Uzmanlar
-
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. - Sürüm: 1.10
- Etkinleştirmeler: 5
Gold Market Structure Execution | Automated Expert Advisor for MetaTrader 5
Gold MSE is a fully automated, rule-driven trading system developed specifically for Gold (XAUUSD), built around institutional trading concepts, market structure and Fair Value Gaps (FVGs).
Rather than relying on conventional indicator crossover signals, Gold MSE combines structural analysis, directional bias, price displacement and entry qualification within a state-driven execution engine.
Every trading opportunity must satisfy a defined set of conditions before execution is permitted.
Key Features
-
Fully automated Buy and Sell execution.
-
Automatic Break of Structure (BoS) detection.
-
Dynamic bullish and bearish directional bias.
-
Automatic Fair Value Gap identification.
-
Stateful FVG tracking and mitigation detection.
-
Structured entry confirmation.
-
Adaptive structure-based stop loss.
-
Configurable risk-to-reward targets.
-
Controlled re-entry functionality.
-
Automatic position closure on structural shifts.
-
Optional breakeven management.
-
Percentage-based position sizing.
-
Interactive trading dashboard.
-
Pause and resume new entries directly from the chart.
-
Automatic chart visualisation and cleanup.
-
Popup alerts and mobile push notifications.
-
No martingale or grid-based recovery system.
Market Structure Execution Engine
Gold MSE continuously analyses market structure to establish directional bias and identify qualifying trading opportunities.
Fair Value Gaps are monitored in alignment with the prevailing structural bias, while internal state management ensures that setups are tracked throughout their lifecycle.
Trades are only executed when the required structural and price-action conditions have been satisfied.
When market structure changes direction, the system manages existing positions and resets outdated setup information accordingly.
Intelligent Trade Management
Gold MSE incorporates several mechanisms designed to manage positions throughout their lifecycle.
-
Structural Stop Loss: Stop loss placement adapts to the individual setup and relevant price extremes.
-
Configurable Take Profit: Profit targets are calculated using a selectable risk-to-reward multiple.
-
Controlled Re-Entry: Additional entry attempts are permitted when the underlying setup remains valid, subject to the configured limit.
-
Profit Locking: Prevents unnecessary re-entries following a profitable completion of the selected setup.
-
Structural Shift Exit: Automatically closes relevant positions when directional bias reverses.
-
Breakeven Management: Optionally moves the stop loss to the entry price once a configurable reward threshold has been reached.
Risk Management
Gold MSE uses percentage-based position sizing, with each trade calculated according to the account balance and its individual stop-loss distance.
The system uses MetaTrader 5's native profit calculation functionality to estimate monetary risk in the account's deposit currency.
Additional execution controls include:
-
Automatic lot size calculation.
-
Broker volume restrictions.
-
Minimum lot risk protection.
-
Configurable risk tolerance.
-
Free margin verification.
-
Broker stop-distance validation.
-
Configurable slippage tolerance.
-
Planned monetary risk logging.
The default risk setting is 0.25% per trade. Actual losses may differ from the calculated risk due to slippage, gaps and execution costs.
Interactive Trading Dashboard
The integrated dashboard provides real-time visibility of the Expert Advisor's operational status.
The dashboard displays:
-
Current structural bias.
-
Number of tracked Fair Value Gaps.
-
Selected gap status.
-
Entry attempts.
-
Open positions.
-
Risk and reward settings.
-
Breakeven status.
-
Current execution status.
The integrated Pause and Resume button allows users to suspend new entries while maintaining management of existing positions.
Automatic Chart Visualisation
Gold MSE provides clear visual representations of its structural analysis directly on the chart.
-
Bullish and bearish Break of Structure markings.
-
Automatic Fair Value Gap zones.
-
Trade entry and exit visualisation.
-
Configurable structure and FVG colours.
-
Automatic removal of outdated FVG zones following structural changes.
This allows users to monitor the system's behaviour without requiring additional indicators.
Historical Strategy Testing
Gold MSE has been tested across multiple years of historical XAUUSD market data.
The accompanying marketplace screenshots demonstrate the following historical test configuration and results:
-
Instrument: XAUUSD.
-
Timeframe: M15.
-
Testing period: 2023–2026.
-
Initial deposit: $100,000.
-
Risk setting: 0.25% per trade.
-
History quality: 100%.
-
Total trades: 997.
-
Net profit: $41,955.50.
-
Total return: 41.96%.
-
Profit factor: 1.22.
-
Recovery factor: 3.87.
-
Sharpe ratio: 3.69.
-
Relative balance drawdown: 7.61%.
-
Relative equity drawdown: 7.72%.
These results were obtained using the MetaTrader 5 Strategy Tester and do not represent live trading performance.
Input Parameters
Risk Management Settings
-
RiskPercent: Percentage of account balance allocated to each trade.
-
SkipTradeIfMinLotExceedsRisk: Skip entries when the broker's minimum lot size exceeds the permitted risk tolerance.
-
RiskTolerancePercent: Permitted tolerance above the calculated monetary risk.
-
SL_GapPoints: Stop-loss buffer for gap-based placement.
-
SL_ExtremePoints: Stop-loss buffer for price-extreme-based placement.
-
TP_R_Multiple: Take-profit risk-to-reward multiplier.
-
SlippagePoints: Permitted execution deviation in points.
Breakeven Settings
-
UseBreakeven: Enable or disable automatic breakeven management.
-
BreakevenR: Reward threshold required to activate breakeven.
-
MaxEntriesPerGap: Maximum permitted entry attempts per selected gap.
Break of Structure Settings
-
Depth: Market structure detection sensitivity.
-
UseCloseBreak: Select close-based or wick-based structural break detection.
-
BoSColor: Colour of Break of Structure markings.
-
BoSLabelOffsetPoints: Vertical positioning of structural labels.
Fair Value Gap Settings
-
FvgMinPoints: Minimum qualifying FVG size.
-
FvgMaxPoints: Maximum qualifying FVG size.
-
FvgMaxLength: Visual extension length of FVG zones.
-
FvgBullColor: Bullish FVG colour.
-
FvgBearColor: Bearish FVG colour.
Alerts & Notifications
-
EnablePopupAlerts: Enable terminal popup alerts.
-
EnablePushNotifications: Enable mobile push notifications.
-
AlertOnBiasFlip: Receive notifications when structural bias changes.
-
AlertOnBoS: Receive Break of Structure notifications.
-
AlertOnFVG: Receive Fair Value Gap notifications.
Magic Number
-
Magic: Unique identifier used to distinguish and manage the Expert Advisor's positions.
Control Panel
-
ShowPanel: Enable or disable the trading dashboard.
-
PanelX: Horizontal dashboard position.
-
PanelY: Vertical dashboard position.
-
PreserveStateOnRestart: Enable saved execution-state recovery following terminal restarts.
Trading Recommendations
-
Recommended instrument: XAUUSD (Gold).
-
Recommended timeframe: M15.
-
Default risk setting: 0.25% per trade.
-
Broker conditions: Competitive spreads and reliable execution.
-
Operation: Keep MetaTrader 5 running continuously or use a suitable VPS.
-
Account balance: Must be sufficient to accommodate the broker's minimum trading volume and the selected risk settings.
Default settings are included within the Expert Advisor.
Users should backtest their selected configuration using their own broker's trading conditions and evaluate the system on a demo account before trading live.
Communication and Support
For product enquiries, configuration assistance or technical support, please contact me directly through MQL5 private messaging.
Developed by MQLXpert
Code for Traders. By Traders.
Risk Warning: Trading financial instruments involves financial risk. Historical backtesting results do not represent live trading performance. Past performance does not guarantee future results.
