MQLXpert PDHL Pro
- Experts
-
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: 2.11
- Attivazioni: 5
Previous Day High & Low Trading System | MetaTrader 5
MQLXpert PDHL Pro is a fully automated Expert Advisor designed to trade two significant daily market levels: the Previous Day High (PDH) and Previous Day Low (PDL).
The strategy focuses on price movements around these key liquidity levels, allowing traders to utilise either breakout continuation or reversal trading approaches.
Developed with configurable risk management, automated trade execution and an interactive control panel, PDHL Pro provides a systematic approach to trading daily price levels.
Key Features
-
Fully automated trade execution.
-
Automatic Previous Day High and Low detection.
-
Two selectable trading strategies.
-
Breakout and Reversal trading modes.
-
Fixed lot or percentage-based position sizing.
-
Configurable stop loss and take profit.
-
Automatic daily position closure.
-
Optional restriction on entries after the scheduled closing time.
-
Independent daily signal management.
-
Daily signal retention following terminal restarts.
-
Broker margin and volume validation.
-
Automatic stop-distance validation.
-
Magic number-based trade management.
-
Professional interactive control panel.
-
Pause and Resume functionality.
-
Customisable chart visualisation.
-
No martingale or grid recovery system.
Trading Strategy
PDHL Pro automatically identifies the previous trading day's high and low using daily price data.
The Expert Advisor monitors price movements around these levels and executes trades according to the selected trading mode.
Breakout Mode
Designed to capture continuation movements beyond previous daily price levels.
-
BUY when price crosses above the Previous Day High.
-
SELL when price crosses below the Previous Day Low.
Reversal Mode
Designed to trade potential reversals at previous daily price levels.
-
SELL when price crosses above the Previous Day High.
-
BUY when price crosses below the Previous Day Low.
Each daily level provides a maximum of one entry attempt per trading day.
Risk Management
PDHL Pro provides two selectable position-sizing methods:
-
Fixed Lots: Executes trades using a predefined lot size.
-
Risk Percentage: Automatically calculates position size based on account balance, stop-loss distance and broker contract specifications.
Percentage-based position sizing includes minimum lot protection to prevent opening trades where the broker's minimum permitted volume would exceed the configured risk.
Every trade includes a predefined stop loss and take profit.
The EA also performs margin, volume and stop-distance checks before submitting trade requests.
Actual realised risk may vary due to slippage, commissions and market execution conditions.
Interactive Control Panel
The integrated MQLXpert control panel displays:
-
Current trading mode.
-
Previous Day High.
-
Previous Day Low.
-
PDH signal availability.
-
PDL signal availability.
-
Scheduled closing time.
-
Number of open positions.
-
Current position-sizing method.
-
Trading status.
-
Execution messages.
The Pause/Resume button allows traders to temporarily disable new entries without interrupting existing position management.
Historical Backtesting
PDHL Pro has been historically tested on XAUUSD using MetaTrader 5 Strategy Tester.
Historical test summary:
-
Testing period: January 2023 to March 2026.
-
Initial deposit: $100,000.
-
Position size: 0.50 fixed lots.
-
Net profit: $23,015.00.
-
Total return: 23.02%.
-
Relative balance drawdown: 3.94%.
-
Relative equity drawdown: 4.17%.
-
Profit factor: 1.26.
-
Total trades: 804.
-
Win rate: 55.22%.
-
History quality: 100%.
These results represent historical Strategy Tester performance, not live trading results.
Input Parameters
Risk Management Settings
-
LotMode: Select Fixed Lots or Risk Percentage.
-
Lots: Fixed position size.
-
RiskPercent: Percentage of account balance risked per trade.
-
sl_points: Stop-loss distance in points.
-
tp_points: Take-profit distance in points.
Strategy Settings
-
IsBreakout: Enable Breakout mode or disable it to use Reversal mode.
-
CloseTimeHour: Scheduled position closure hour.
-
CloseTimeMin: Scheduled position closure minute.
-
BlockEntriesAfterClose: Prevent new entries after the scheduled closing time.
Execution and Restart Settings
-
MagicNumber: Unique identifier used for position management.
-
PreserveStateOnRestart: Retain daily signal status following terminal restarts during normal trading.
Control Panel
-
ShowPanel: Enable or disable the interactive control panel.
-
PanelX: Horizontal panel position.
-
PanelY: Vertical panel position.
-
ShowDailyLevels: Display previous daily high and low levels.
-
PDHColor: Previous Day High line colour.
-
PDLColor: Previous Day Low line colour.
Recommended Setup
-
Platform: MetaTrader 5.
-
Instrument: XAUUSD (Gold).
-
Chart timeframe: M15.
-
Trading mode: Breakout.
-
Position sizing: Adjustable according to account size and risk tolerance.
-
Account type: Hedging or netting.
-
VPS: Recommended for uninterrupted operation.
How to Use
-
Attach PDHL Pro to an XAUUSD M15 chart.
-
Select your preferred trading mode.
-
Configure your position-sizing and risk management settings.
-
Adjust the scheduled closing time according to your broker's server time.
-
Enable Algo Trading.
-
Allow the Expert Advisor to automatically monitor and trade the previous daily levels.
Important Information
Trading hours are based on broker server time.
Stop-loss and take-profit distances are measured in broker points. Contract specifications and price precision may differ between brokers.
When BlockEntriesAfterClose is disabled, new signals may still be processed after the scheduled closing time, followed by automatic position closure.
Users should perform their own backtesting and demo testing before using the Expert Advisor on a live account.
Historical performance does not guarantee future results. Trading involves risk and may result in financial losses.
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.
