Hunter, Liquidity Library and Fvg Detection Library
This is a powerful addition to your MetaTrader 5 toolkit designed to optimize market analysis and performance. This Expert Advisor serves as automated trading software. It is utilized to monitor financial markets and execute trades based on predefined algorithmic rules, enabling precise position management without the need for constant manual oversight.
How to Setup and Use Hunter, Liquidity Library and Fvg Detection Library
1. Installation: Open the "File" menu, select "Open Data Folder," navigate to MQL/Experts, paste your file, and restart the terminal.
2. Activation: Drag the EA from the Navigator onto a chart, ensure "Allow live trading" is checked in the Common tab, and verify the AutoTrading button is green.
3. Optimization: Right-click your chart, choose "Expert List," click "Properties" to adjust inputs, and save your preferred setup as a set file for future use.
4. Maintenance: Regularly check the "Experts" tab in the terminal window to monitor trade logs and potential execution errors.
Frequently Asked Questions
Q: Why is my EA not opening trades? A: Check the "AutoTrading" button, ensure "Allow live trading" is enabled, and verify your broker allows automated trading on your account type.
Q: Can I run multiple EAs on one chart? A: No, each chart can only host one active EA; however, you can open multiple charts for different currency pairs to run several EAs.
Q: What does the "smiley face" icon mean? A: A smiley face in the top-right corner of the chart indicates the EA is successfully running; a frowny face means it is disabled.
Description & Settings
**Hunter EA v2** **Core Strategy:** * **Dual Trading Modes:** 1. **Standard FVG Mode:** Enters a trade when any candle touches an active Fair Value Gap AND the FVG's direction (bullish/bearish) aligns with the established daily bias from the Liquidity Library. 2. **Encroachment Mode (Recommended):** A more conservative approach that waits for price to touch the FVG's midpoint (encroachment point) AND close with a directional bias that matches the daily bias. This provides higher confirmation before entry. * **Bias Confluence:** All trades require alignment between the market's structural bias (from LiquidityLibrary) and the immediate price action signal (from FVGLibrary). A bullish daily bias only triggers buys from bullish FVGs or bullish encroachments, and vice versa for bearish. * **Risk Management:** Includes an optional stop loss (in account currency, e.g., $2) alongside the fixed profit target. This creates a defined risk-reward profile for each trade. **Key Features:** * **Flexible FVG Detection:** Configurable timeframe and minimum gap size for FVG detection, allowing adaptation to different instruments and volatility profiles. * **Smart Trade Tracking:** Prevents re-entering the same FVG setup and logs the relationship between each trade and its triggering FVG ID. * **Enhanced Logging:** Provides detailed real-time console output for FVG formation, encroachment events, bias updates, and trade execution logic. * **Visual Object Toggle:** Option to draw FVG zones (boxes) and encroachment points on the chart for visual strategy confirmation and backtesting. (needs to be fixed) * **Callback-Driven Architecture:** Efficiently responds to events from the FVG library (formation, encroachment, reset) without constant polling. **LiquidityLibrary.mqh** A comprehensive institutional liquidity detection and tracking library built on ICT Smart Money Concepts. This modular component identifies, categorizes, and monitors key market levels where stop losses accumulate—known as liquidity pools—providing essential targets for price movement (Draw on Liquidity) across multiple timeframes and sessions. **Core Capabilities:** * **Multi-Type Liquidity Detection:** Identifies swing highs/lows, equal highs/lows, session extremes, and historical levels (Previous Day/Week High/Low). * **Session Management:** Tracks all major trading sessions (Sydney, Tokyo, London, New York) plus specialized "Silver Bullet" windows for high-probability targeting. * **Daily Bias Engine:** Calculates market bias based on the relationship between the current price and key historical levels (PDH/PDL), determining the primary "Draw on Liquidity" target. * **Sweep Detection:** Monitors when liquidity levels are breached ("swept"), signaling potential shifts in market structure and invalidating those levels as future targets. * **Failure to Displace Logic:** Identifies when price attempts but fails to break through a key level, indicating potential bias reversal. **Key Features:** * **Visual Plotting:** Automatically draws color-coded horizontal lines on the chart for each liquidity type (red for highs, green for lows, orange/aqua for PDH/PDL). * **Priority System:** Ranks liquidity targets for each Silver Bullet session, ensuring the EA focuses on the most relevant institutional levels. * **Event Callback System:** Notifies the main EA in real-time when liquidity events occur (creation, sweep, failure). * **Dynamic Array Management:** Efficiently handles an unlimited number of liquidity levels with automatic memory allocation. * **Statistical Reporting:** Provides detailed logs and counts of active vs. swept liquidity levels for strategy analysis. **FVGLibrary.mqh** A sophisticated Fair Value Gap (FVG) detection and analysis library built on ICT Smart Money Concepts. This modular component automatically identifies, tracks, and manages institutional price inefficiencies—areas where price moved too quickly, leaving "unfilled" zones that markets tend to revisit. **Core Capabilities:** * **Automatic FVG Detection:** Scans each new candle to identify three-candle patterns that create gaps between the high of the oldest candle and the low of the newest candle (bullish FVG) or the low of the oldest and high of the newest (bearish FVG). Filters by a user-defined minimum gap size. * **Encroachment Point Calculation:** For each FVG, calculates a precise midpoint (50% level) known as the Encroachment (ENC) point. This level acts as a trigger zone for potential trade entries. * **Directional Bias Determination:** Monitors price action as it touches the ENC point. Determines a directional bias ("BULLISH" or "BEARISH") based on whether the candle closes above or below the ENC point, providing a clear signal for trade direction. * **Inverse FVG & Reset Logic:** Identifies when a candle "shoots through" an FVG (opening on one side and closing on the other), which invalidates the FVG and marks it as "RESET," preventing false signals. * **High Accuracy Mode:** Optional mode that performs encroachment checks on a lower timeframe (e.g., 1-minute) for more precise entry timing. **Key Features:** * **Event Callback System:** Notifies the main EA in real-time about key FVG events (formation, encroachment, reset) for efficient, event-driven trading logic. * **Visual Plotting:** Can automatically plot colored dots on the chart: green for bullish FVGs, red for bearish, orange/blue for encroachment with bias. * **Trade Association:** Links executed trade tickets to specific FVG IDs, enabling detailed performance analysis per setup. * **Dynamic Array Management:** Efficiently handles an expanding list of FVGs with automatic memory allocation. * **Statistical Reporting:** Tracks the total number of FVGs, active vs. filled rates, and provides performance insights.
You May Also Like