Apex Liquidity Trader
- Эксперты
-
Noel Anjao Alube
Dedicated to developing smart, data-driven trading solutions with a strong focus on performance, risk management, and innovation. Committed to transforming trading ideas into automated strategies. - Версия: 2.3
- Активации: 5
Apex Liquidity Trader is an institutional-grade Expert Advisor for MetaTrader 5, built around Smart Money Concepts and ICT methodology. It replaces simplistic indicator-based entries with a multi-layer confluence engine that only triggers trades when market structure, liquidity, session timing, and price location all align simultaneously.
CORE DETECTION ENGINE
The EA scans price action for the full suite of institutional market structure events. It identifies Break of Structure on both sides, detecting when price closes beyond a prior swing high or low in the direction of the higher timeframe trend. It tracks Change of Character events, which occur when structure breaks against the prevailing bias, signaling a potential shift in market direction. Market Structure Shifts are confirmed versions of CHOCH, requiring accompanying volume expansion to validate the move.
Order blocks are detected as the last opposing candle before a significant impulse move, rated by body-to-range ratio into three strength tiers. Fair Value Gaps are identified from three-candle imbalances and tracked for mitigation. Both are marked as mitigated when price returns into them, and entries only trigger after that mitigation is confirmed.
Liquidity levels are mapped from all detected swing highs and lows. Equal highs and equal lows are identified within a configurable pip tolerance and receive higher weight as resting liquidity targets. Liquidity sweeps are confirmed when price wicks beyond a swing level and closes back inside, indicating institutional accumulation or distribution. The EA also monitors London open grabs of the Asian session range and New York open grabs of the London session range as high-probability liquidity events.
Previous day high and low are detected from the D1 timeframe and plotted as reference levels for intraday bias and potential reaction zones.
CONFLUENCE SCORING SYSTEM
No trade is placed without passing a weighted scoring threshold, defaulting to a minimum of 75 out of 100. The seven scored components are HTF bias alignment across weekly, daily, and H4 timeframes worth 20 points, a confirmed liquidity sweep worth 20 points, MSS or CHOCH confirmation worth 15 points, FVG mitigation worth 15 points, order block mitigation worth 15 points, session alignment worth 10 points, and volume confirmation worth 5 points. Every component is checked independently and the score is normalized to a 0 to 100 scale before the threshold gate is applied.
PREMIUM AND DISCOUNT FRAMEWORK
The EA calculates three dealing ranges in parallel: the prior weekly range, the prior daily range, and the current session range. Each range is divided into premium above 75 percent, equilibrium at 50 percent, and discount below 25 percent. Buy trades are only permitted when price sits in discount on at least two of the three ranges. Sell trades are only permitted when price sits in premium on at least two of the three ranges. This prevents counter-trend entries at extended price levels.
HIGHER TIMEFRAME BIAS
Bias is read independently from the weekly, daily, and H4 charts using swing structure analysis, comparing sequential swing highs and lows. The H4 bias acts as the primary directional filter for trade direction. If the setup direction conflicts with H4 bias, the trade is skipped.
MARKET STATE DETECTION
Five market states are recognized: trending, ranging, expansion, accumulation, and distribution. Detection is based on ADX strength and DI line separation combined with ATR ratios between the current timeframe and H4. Each state carries its own risk multiplier, reducing position size during unfavorable conditions such as ranging, accumulation, or distribution phases and increasing it modestly during trending or expansion conditions.
SESSION MANAGEMENT
The EA operates across Tokyo, London, and New York sessions, each independently toggleable. The London and New York overlap is also separately configurable. Session high and low are tracked in real time and reset at the start of each session window. London open and New York open liquidity grabs are detected and fed into the confluence score.
RISK MANAGEMENT
Position sizing is risk-based, calculating lot size from a percentage of account balance or equity against the measured stop loss distance in price. Risk percentage scales dynamically with setup quality: high-scoring setups above 90 apply a configurable multiplier, mid-range setups between 75 and 89 use base risk, and lower-quality setups apply a reduced multiplier. Margin usage is capped as a percentage of free margin and a hard cap on total account exposure prevents over-leveraging across open positions.
Partial take profit closes a configurable percentage of the position at a 1-to-1 reward ratio. Breakeven moves the stop loss to entry plus a small offset after a configurable number of pips in profit. ATR-based trailing stop activates after a set profit threshold and trails price by a multiple of the current ATR, updating only when price moves by a minimum step to prevent unnecessary modifications.
VALIDATION AND MARKET COMPATIBILITY
The EA is built for full MQL5 Market automatic validation compliance. Stop levels are validated against broker stop level and freeze level on every trade, with a minimum distance buffer applied above the broker requirement. Volume is normalized to broker minimum, maximum, step, and limit constraints before every order. Margin is checked before placing and position size is capped to available free margin. A cooldown system blocks retry attempts after invalid stop or volume errors to prevent rejection loops. A validation trade mechanism automatically places a minimum-lot trade during backtesting if no trades have been recorded, satisfying the Market validator's trade activity requirement.
CHART DISPLAY
On live charts the EA draws order block rectangles, FVG rectangles, and previous day high and low lines directly on the chart. A dashboard in the upper left corner shows current market state, active session, HTF and H4 bias, premium or discount location, BOS, CHOCH, and MSS status, and counts of detected structures. All drawings are removed cleanly on EA removal.
ALERTS AND LOGGING
MT5 native alerts are sent on trade opens and BOS events with a configurable cooldown to prevent alert flooding. Telegram integration is available for remote notifications. All trades, skipped setups with reasons, and errors are logged to a CSV file in the common terminal folder for post-session review.
