Join our fan page
- Views:
- 111
- Rating:
- Published:
-
Need a robot or indicator based on this code? Order it on Freelance Go to Freelance
Brief Description
An institutional-grade Expert Advisor that trades classical chart patterns (Cup & Handle, Flags, Bottoms) validated by real-time Order Book (DOM) volume absorption and protected by a multi-source macroeconomic news filter.
What ideas is the code based on?
Most algorithmic trading systems rely on lagging indicators. Hon-APS is based on the idea that structural price action combined with quantitative volume flow provides the highest probability entries.
The system operates on three core pillars:
- Dynamic Pattern Recognition: The EA actively scans the chart for structural formations (Head & Shoulders, Double/Rounding Bottoms, Triangles, Flags).
- Order Flow & DOM Validation: Once a pattern breakout occurs, the EA reads the Level 2 Order Book ( MarketBookGet ) to calculate bid/ask imbalances and true volume absorption. If the broker does not support DOM, it uses tick volume estimation as a smart fallback.
- Advanced Risk Control: Trades are sized using a modified Kelly Criterion. The system dynamically monitors correlated exposure and enforces hard daily and weekly drawdown limits to protect capital.
How can the indications be interpreted?
The EA operates fully autonomously, but its logic is transparently displayed via a professional on-chart dashboard.
- KAMA Trend: Indicates the current overarching market direction (Bullish/Bearish/Neutral) to filter trades against the trend.
- Volume Imbalance/Absorption: Breaks out are only taken if aggressive limit orders at support/resistance are absorbed by the dominant trend.
- News Filter Status: Shows when trading is temporarily halted due to an incoming high-impact macroeconomic event.
Suitable Symbols and Timeframes
- Recommended Symbols: Major Forex Pairs (EURUSD, GBPUSD) and Indices (US30, NAS100). The EA includes adaptive spread control for Crypto and Indices.
- Recommended Timeframe: H1 (1-Hour) or H4 (4-Hour) charts are best suited for structural pattern formations.
Description of #include Files Used
The EA utilizes two custom include files to compartmentalize complex logic:
- Hon-APS-Dashboard.mqh : Responsible for rendering a modern, interactive GUI on the chart. It calculates and draws real-time account metrics, active risk, market trends, and DOM visualizations without cluttering the main trading logic.
- Hon-NewsTrader.mqh : A robust macroeconomic event handler. It actively checks the internal MQL5 Economic Calendar AND scrapes external web sources (Forex Factory JSON / Forexprostools HTML) to automatically pause the EA before high-impact news releases.
Description of Main External Variables (Inputs)
- BaseRiskPercent / UseKellyCriterion : Determines the position sizing model for each trade.
- MaxDailyLoss / MaxWeeklyLoss : Hard equity stops to prevent catastrophic drawdowns (ideal for prop firm trading).
- Pattern Toggles ( TradeCupHandle , TradeFlags , etc.): Allows the user to toggle which specific chart structures they want the EA to scan for.
- RequireVolumeConfirmation : When set to true, the EA will only enter a pattern breakout if it is accompanied by an institutional volume multiplier.
- Adaptive Moving Average ( UseKAMAFilter ): KAMA periods and slope thresholds used to ensure trades are only placed in the direction of the macro trend.
- UsePartialProfits & Trailing Stops ( InitialTrailingATR ): Engages an ATR-based progressive trailing stop and takes partial profits at structured Risk-to-Reward levels (1R, 2R).
ATR Based Stop Loss Manager
A comprehensive stop-loss and trade management module offering multiple stop-loss methods (Fixed Pips, ATR-based, Swing High/Low, and Percentage) and trailing stop options (Fixed, ATR, Step, and Breakeven). It includes automatic broker stop-level adjustment, risk-reward–based take profit calculation, and visual stop-loss lines on the chart. The code follows a clean, structured architecture with a dedicated `CStopLossManager` class, standardized enums and structures, and fully documented English comments for clarity and maintainability.
KSQ CommandCenter Remote Google Sheets Trade Manager
KSQ Command Centre is a production-ready, two-way bridge between MetaTrader 5 and Google Sheets. It was originally designed to help fund managers and quantitative traders remotely monitor and manage large, funded accounts (e.g., Darwinex Zero, Prop Firms, PAM, MAM) directly from a mobile browser, without needing to log in to a VPS. This Expert Advisor not only exports data—it actively listens for commands typed into your Google Sheet and executes them in MT5 in near real-time.
Accelerator Oscillator (AC)
The Acceleration/Deceleration Indicator (AC) measures acceleration and deceleration of the current driving force.
MACD Signals
Indicator edition for new platform.
