R:R = 1:3

This commit is contained in:
Bell
2026-03-11 23:42:37 +07:00
parent 53642a5613
commit a8d296ab2c
4 changed files with 12 additions and 8 deletions
+1 -1
View File
@@ -25,7 +25,7 @@ input double InpFVGMaxOuterBarRatio = 2.0;
//--- Step 3: Trading ---
input bool InpTradeEnabled = true;
input double InpRiskPercentPerR = 1.0;
input double InpRRRatio = 2.2;
input double InpRRRatio = 3.2;
input int InpMaxLimitOrders = 3;
input int InpLimitMaxAgeBars = 24;
input long InpEAMagic = 123456;
+6 -2
View File
@@ -300,11 +300,15 @@ void DrawAll()
}
//+------------------------------------------------------------------+
//| Clean up all drawn objects |
//| Clean up drawn objects (giữ lại PNL_STATS để xem kết quả sau test) |
//+------------------------------------------------------------------+
void DrawCleanup()
{
ObjectsDeleteAll(0, EA_PREFIX);
ObjectsDeleteAll(0, EA_PREFIX + "FVG_");
ObjectsDeleteAll(0, EA_PREFIX + "ORD_");
ObjectDelete(0, EA_PREFIX + "PNL_HDR");
ObjectDelete(0, EA_PREFIX + "PNL_TREND");
ObjectDelete(0, EA_PREFIX + "PNL_FVG");
ChartRedraw(0);
}
+2 -2
View File
@@ -200,7 +200,7 @@ void ScanForNewFVGs()
if(gapRatio >= minGapVsBody && !FVGAlreadyTracked(fvgTime, FVG_BULLISH))
{
double slRef = candleA_Low; // SL dưới bar A
double slRef = candleB_Low; // SL dưới bar B (impulse, dưới FVG)
AddFVGZone(FVG_BULLISH, candleC_Low, candleA_High, slRef, fvgTime);
}
}
@@ -215,7 +215,7 @@ void ScanForNewFVGs()
if(gapRatio >= minGapVsBody && !FVGAlreadyTracked(fvgTime, FVG_BEARISH))
{
double slRef = candleA_High; // SL trên bar A
double slRef = candleB_High; // SL trên bar B (impulse, dưới FVG)
AddFVGZone(FVG_BEARISH, candleA_Low, candleC_High, slRef, fvgTime);
}
}
+3 -3
View File
@@ -425,17 +425,17 @@ void ManageFVGTrades()
ltfUpper, ltfLower, ltfBarALow, ltfBarAHigh))
continue;
// Entry theo low TF FVG; SL vẫn dùng bar A của high TF (đủ xa)
// Entry theo low TF FVG; SL = bar B của high TF FVG
double entryPrice, slPrice;
if(zone.type == FVG_BULLISH)
{
entryPrice = ltfUpper; // Buy limit tại cạnh trên low TF FVG
slPrice = zone.slReferencePrice; // SL dưới bar A của high TF FVG
slPrice = zone.slReferencePrice; // SL dưới bar B high TF
}
else
{
entryPrice = ltfLower; // Sell limit tại cạnh dưới low TF FVG
slPrice = zone.slReferencePrice; // SL trên bar A của high TF FVG
slPrice = zone.slReferencePrice; // SL trên bar B high TF
}
if(PlaceLimitFromLowTF(symbol, zone.type, entryPrice, slPrice))