From 97a444c92df7a9b85ff0badf40276f54b7305613 Mon Sep 17 00:00:00 2001 From: Hadi Khazaee Asl Date: Sun, 27 Apr 2025 10:21:45 +0330 Subject: [PATCH] apply fix on Trend FVG Types issues ... --- XCAEA/Classes/xcaea.x-poi.detector.class.mq5 | 18 ++++++++++++++++++ XCAEA/Libraries/xcaea.signaller.lib.mq5 | 16 ++++++++++++---- 2 files changed, 30 insertions(+), 4 deletions(-) diff --git a/XCAEA/Classes/xcaea.x-poi.detector.class.mq5 b/XCAEA/Classes/xcaea.x-poi.detector.class.mq5 index 6373be5c..a29fa33a 100644 --- a/XCAEA/Classes/xcaea.x-poi.detector.class.mq5 +++ b/XCAEA/Classes/xcaea.x-poi.detector.class.mq5 @@ -194,6 +194,10 @@ ENUM_XCA_PIVOTS GetPivotType(XBoxZone &value) value.dir == GetDirection(XCA_TREND_BULL); bool isTrendBearish = value.type == GetBoxType(XCA_TREND_BEAR) && value.dir == GetDirection(XCA_TREND_BEAR); + bool isPeakSWHRes = value.type == GetBoxType(XCA_PEAKSWHRES) && + value.dir == GetDirection(XCA_PEAKSWHRES); + bool isValeSWLSup = value.type == GetBoxType(XCA_VALESWLSUP) && + value.dir == GetDirection(XCA_VALESWLSUP); // if (isTick) @@ -252,6 +256,14 @@ ENUM_XCA_PIVOTS GetPivotType(XBoxZone &value) { result = XCA_TREND_BEAR; } + else if (isPeakSWHRes) + { + result = XCA_PEAKSWHRES; + } + else if (isValeSWLSup) + { + result = XCA_VALESWLSUP; + } // return result; @@ -2397,6 +2409,9 @@ class XCXCAEAPOIDetector : public XCBase // Handling FVGs Here ... if (isBullishFVG) { + // + fvgBox.type = GetBoxType(XCA_FVG_BULL); + // AddBox( fvgBox, @@ -2508,6 +2523,9 @@ class XCXCAEAPOIDetector : public XCBase // Handling FVGs Here ... if (isBearishFVG) { + // + fvgBox.type = GetBoxType(XCA_FVG_BEAR); + // AddBox( fvgBox, diff --git a/XCAEA/Libraries/xcaea.signaller.lib.mq5 b/XCAEA/Libraries/xcaea.signaller.lib.mq5 index cabb7fb4..e6b9202e 100644 --- a/XCAEA/Libraries/xcaea.signaller.lib.mq5 +++ b/XCAEA/Libraries/xcaea.signaller.lib.mq5 @@ -762,6 +762,15 @@ bool DetectXCAEAConditions( // // Parsing Pivots ... + bool hasPivots = HasChild(pivots); + if (hasPivots) + { + // + drawer.DrawBoxes( + pivots, + TimeCurrent() // + ); + } // // Select Inside Boxes ... @@ -775,16 +784,15 @@ bool DetectXCAEAConditions( p2Bar // ); bool hasInsidePivots = IsValidSize(insidePivotsCount); - if (hasInsidePivots) { - // - drawer.DrawBoxes(insidePivots, TimeCurrent()); + if (hasInsidePivots) + { + // drawer.DrawBoxes(insidePivots, TimeCurrent()); } // // Detect Selected Pivot ... XBoxZone rejectedPivot; double providedSL = 0; - bool hasPivots = HasChild(pivots); if (hasPivots) { //