From a6e4d625e49c41cec71756d80530448c0bcb49e4 Mon Sep 17 00:00:00 2001 From: Hadi Khazaee Asl Date: Tue, 22 Oct 2024 14:36:34 +0330 Subject: [PATCH] Apply Fix on Drawing Support and Resistance Zones ... --- Classes/x-saherelm.x-poi.class.mq5 | 32 ++++++++++++++++++++++++++---- 1 file changed, 28 insertions(+), 4 deletions(-) diff --git a/Classes/x-saherelm.x-poi.class.mq5 b/Classes/x-saherelm.x-poi.class.mq5 index 2abc3af7..611d2077 100644 --- a/Classes/x-saherelm.x-poi.class.mq5 +++ b/Classes/x-saherelm.x-poi.class.mq5 @@ -1894,14 +1894,14 @@ class XCPOI : public XSCBaseAlert RejectionBarBearishColor(clrMagenta); // - SupportZoneLoopBack(21); + SupportZoneLoopBack(52); SupportZoneWidth(1); SupportZoneColor(clrLime); SupportZoneStyle(STYLE_DOT); SupportZonePriceType(X_PRICE_CLOSE); // - ResistanceZoneLoopBack(21); + ResistanceZoneLoopBack(52); ResistanceZoneWidth(1); ResistanceZoneColor(clrRed); ResistanceZoneStyle(STYLE_DOT); @@ -4363,6 +4363,18 @@ class XCPOI : public XSCBaseAlert return; } + // + datetime cBarTime = TimeCurrent(); + if (bar.Index() > 0) + { + // + cBarTime = iTime( + Symbol(), + Period(), + bar.Index() - 10 // + ); + } + // XCSupportZoneObject *iObj; iObj = new XCSupportZoneObject(); @@ -4371,7 +4383,7 @@ class XCPOI : public XSCBaseAlert name, Window(), bar, - TimeCurrent() // + cBarTime // ); if (!isCreated) { @@ -4418,6 +4430,18 @@ class XCPOI : public XSCBaseAlert return; } + // + datetime cBarTime = TimeCurrent(); + if (bar.Index() > 0) + { + // + cBarTime = iTime( + Symbol(), + Period(), + bar.Index() - 10 // + ); + } + // XCResistanceZoneObject *iObj; iObj = new XCResistanceZoneObject(); @@ -4426,7 +4450,7 @@ class XCPOI : public XSCBaseAlert name, Window(), bar, - TimeCurrent() // + cBarTime // ); if (!isCreated) {