From 55d972292267164b039f6304c3772390ed24241e Mon Sep 17 00:00:00 2001 From: Bell Date: Thu, 19 Mar 2026 21:12:47 +0700 Subject: [PATCH] =?UTF-8?q?//=20Ch=E1=BB=89=20t=C3=ACm=20t=C3=ADn=20hi?= =?UTF-8?q?=E1=BB=87u=20low=20TF=20FVG=20khi=20high=20TF=20FVG=20=C4=91?= =?UTF-8?q?=C3=A3=20TOUCHED=20(gi=C3=A1=20l=E1=BA=A5p=20=C4=91=E1=BB=A7=20?= =?UTF-8?q?%),=20kh=C3=B4ng=20trigger=20khi=20m=E1=BB=9Bi=20ch=E1=BA=A1m?= =?UTF-8?q?=20c=E1=BA=A1nh?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Experts/SimpleFVG/Trade.mqh | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/Experts/SimpleFVG/Trade.mqh b/Experts/SimpleFVG/Trade.mqh index 691f629..e207f3e 100644 --- a/Experts/SimpleFVG/Trade.mqh +++ b/Experts/SimpleFVG/Trade.mqh @@ -382,12 +382,9 @@ void ManageFVGTrades() if(currentLimits >= InpMaxLimitOrders) return; - // Khi giá chạm cạnh FVG (high TF) -> tìm tín hiệu xác nhận trên low TF (FVG cùng hướng) + // Chỉ tìm tín hiệu low TF FVG khi high TF FVG đã TOUCHED (giá lấp đủ %), không trigger khi mới chạm cạnh ENUM_TREND_DIRECTION trend = g_CurrentTrend; string symbol = GetTradeSymbol(); - double lastHigh = iHigh(symbol, InpTimeframe, 1); - double lastLow = iLow (symbol, InpTimeframe, 1); - ENUM_TIMEFRAMES lowTF = GetConfirmationTimeframe(InpTimeframe); const int LOW_TF_FVG_LOOKBACK = 15; @@ -402,18 +399,8 @@ void ManageFVGTrades() if(zone.type == FVG_BEARISH && trend != TREND_BEARISH) continue; - bool touchedEdge = false; - if(zone.type == FVG_BULLISH) - { - if(lastLow <= zone.upperEdge && lastHigh >= zone.upperEdge) - touchedEdge = true; - } - else - { - if(lastHigh >= zone.lowerEdge && lastLow <= zone.lowerEdge) - touchedEdge = true; - } - if(!touchedEdge) + // Điều kiện vào lệnh: FVG high TF phải đã TOUCHED (giá lấp >= InpFVGTouchedPercent), không chỉ chạm cạnh + if(!IsZoneTouched(zone)) continue; // Chỉ đặt lệnh khi có low TF để xác nhận (H1->M5, H4->M15, M15->M2) @@ -439,7 +426,11 @@ void ManageFVGTrades() } if(PlaceLimitFromLowTF(symbol, zone.type, entryPrice, slPrice)) + { + // Mỗi FVG chỉ được dùng để trade 1 lần + g_FVGZones[i].status = EXPIRED; currentLimits++; + } } }