FVG + Structure + Liquidity Confirmation Strategy Template## 1. Strategy Concept - Core Goal: During the active periods in London/New York, capture high-quality entries formed by "structural continuation or reversal + FVG cover + liquidity sweep". -Basic assumption: After the price breaks through the liquidity area, it often returns to the untraded area (Fair Value Gap, FVG) to fill it, and then continues along the structural direction. - Trading framework: first determine the direction through market structure → wait for liquidity sweep (external liquidity) → use FVG as entry trigger → combine time filtering and risk template execution. ## 2. Signal component | Component | Identification dimension | Decision logic | Indicator/function occupancy | | --- | --- | --- | --- | | Market structure | HH/HL, LH/LL | The last two pairs of swing points; if HH+HL → long, LL+LH → short, the rest oscillate | DetectSwings, UpdateStructureBias | | FVG (Fair Value Gap) | 3K Price difference | Long: Low[1] > High[2] and Low[1] > High[0]; short position reverses, recording the upper and lower edges of the gap | ScanFVG, TrackActiveFVGs | | Liquidity sweep | External liquidity | The current swing breaks through the previous high/previous low and falls back quickly, the Tick volume is amplified or the physical long shadow line is confirmed | DetectLiquiditySweep | Time filtering | Trading session | London 08:00–11:30, New York 13:30–16:30 (server time configurable) | IsWithinSession | | Risk and execution | Lot size/Stop loss | The other end of the gap or structural point is used as SL, and the lot size is calculated based on the account risk percentage | CalculatePositionSize | ## 3. Run process (K-by-K conditions) 1. Update structure: Scan whether the new Bar forms a swing high/low, and refresh the structure direction buffer. 2. Detect Scan Order: If the price breaks through the latest external structural point (previous high/previous low) and then quickly retraces, it is marked as a liquidity event. 3. Record FVG: After the order scan is triggered, search for the FVG that appears and register it as a valid candidate (with timestamp and structural direction). 4. Time filter: Only continue evaluation if the current time falls within the tradable period window. 5. Entry Confirmation: A signal is generated when the price falls back to the inside of the effective FVG (50% line or gap edge can be used) and the direction of the structure is consistent. 6. Risk/Position: Calculate the lot size based on the preset risk percentage and SL distance, and output it to the panel or global variables. 7. Signal Output: Mark the entry/stop loss/target price on the chart and write it to the buffer for call by EA or statistical module. ## 4. MT4 implementation plan ### 4.1 Data structure - struct SwingPoint { datetime time; double price; bool isHigh; } - struct FVGSlot { datetime startTime; double upper; double lower; int direction; bool isActive; } - struct LiquidityEvent { datetime time; double level; int direction; } - Queue: SwingDeque, ActiveFVGs, LiquidityEvents control length. ### 4.2 Core function - bool DetectSwings(int index): Determine whether index is a structural swing point. - int UpdateStructureBias(): Returns +1/-1/0 structure direction. - bool DetectLiquiditySweep(int index): Confirm whether to sweep external liquidity. - void ScanFVG(int index): identifies gaps and writes ActiveFVGs. - bool ValidateSession(datetime time): matches the London/New York time period. - bool ConfirmEntry(const FVGSlot& slot): Determine whether to trigger entry. - void RenderSignal(...): Draw arrows/rectangles and text. ### 4.3 Gap Management - Every time a new Bar updates ActiveFVGs status: If the price is completely filled, it will be marked as invalid. - You can set the maximum number of items to hold (such as MaxActiveFVG) to avoid memory expansion. - Optional: Use ObjectCreate to draw a rectangular visual gap, with colors distinguishing long and short spaces. ### 4.4 Optimization ideas (FVG + structure) - Adaptive structure depth: Dynamically adjust SwingDepth through ATR or average swing range, which improves noise immunity in oscillating markets and reduces latency in trending markets. - FVG Scoring System: Score each gap (consistent structural direction, scanning strength, gap width, volume amplification weight), and only retain candidates with scores higher than the threshold. - Multi-Cycle Alignment: Detect the structure and FVG of a higher cycle. If superimposed in the same direction, the confidence level will be improved, and the resonance level will be marked in the signal output. - Partial replenishment filter: Set key lines within the gap (such as 50%, 70%), which will only trigger when deep replenishment is reached; shallow replenishment can trigger prompts but not generate trading signals. - Continuous Gap Aggregation: Merge multiple adjacent small FVGs with the same direction to avoid repeated signals and highlight major imbalance areas. - Scan order confirmation enhancement: Combined with candle patterns (such as long upper and lower shadows, false consolidation breakthroughs) or order flow agents (sudden increases in tick volume and volatility), filter scan orders that lack momentum. - Time weight: The longer the gap survives or spans the deserted period, the priority will be lowered; gaps that are formed rapidly in London/New York will be given priority. - Backtest statistical closed loop: Record whether each gap is filled, time consumption, and transaction profit and loss in the indicator to form a database to support parameter optimization. ## 5. Input parameter suggestions | Parameters | Default value | Description | --- | --- | --- | | SwingDepth | 3 | Swing point determination window | SessionMode | Custom | Period mode: All, London, NY, Custom | | LondonSession | 08:00-11:30 | Configurable| | NYSession | 13:30-16:30 | Configurable| | RiskPercent | 1.0 | Single risk ratio | | PartialTPRatio | 1.0 | First goal: risk-reward multiple | | FinalTPRatio | 2.5 | Second goal: risk-reward multiple | ## 6. Output and interface - Buffer: - EntryBuffer: Entry arrow (+1/-1). - StopBuffer: Stop loss level. - TargetBuffer: target price. - Chart object: - FVG rectangle + label (showing direction, creation time). - Liquidity sweep level line (marked in different colors). - Data exchange: - Optional output GlobalVariableSet or FileWrite, read by EA. ## 7. Risk management - Place stop loss on the opposite side of FVG or the latest structure point, and add BufferPips if necessary. - Trading lot size: Lots = AccountRisk * AccountBalance / (StopLossPips * PipValue). - Optional: If PartialTPRatio is reached after entry, use OrderModify to push SL to break even. ## 8. Testing and verification - Backtesting process: Strategy tester → Visual mode → Check whether the structure, gap, and scan mark are consistent with the actual price behavior. - Statistical dimensions: winning rate, RR, maximum continuous drawdown, performance in each period (London vs New York). - Parameter Sensitivity: Adjust SwingDepth, FVGMinPips, FVGExpiryMinutes to find the most stable combination. - Data Integrity: Ensure that historical data contains the number of ticks (used for order scanning confirmation). ## 9. Subsequent development steps 1. Confirm the logic details, default parameters and output form with the demander. 2. Create the FVGStructureLiquidity.mq4 (indicator or EA) framework in MT4 and define the input and buffer. 3. Code and unit test module by module (structure → FVG → order scanning → time filtering). 4. Integrate signals and position management and provide visualization and export interfaces. 5. Conduct historical backtesting and forward testing to record whether the 65–80% winning rate target is achieved.
💡 Featured Recommendations
🔗 You May Be Interested In