From 78b2ac283ab76f06351d6f3b7d972d25a02245a5 Mon Sep 17 00:00:00 2001 From: Hadi Khazaee Asl Date: Tue, 9 Jul 2024 17:28:07 +0330 Subject: [PATCH] last ... --- Libraries/x-saherelm.common.lib.mq5 | 42 +++++++-------------- Libraries/x-saherelm.tools.mq5 | 57 ++++++++++++++++++++++++++++- 2 files changed, 69 insertions(+), 30 deletions(-) diff --git a/Libraries/x-saherelm.common.lib.mq5 b/Libraries/x-saherelm.common.lib.mq5 index 1082e837..a263e698 100644 --- a/Libraries/x-saherelm.common.lib.mq5 +++ b/Libraries/x-saherelm.common.lib.mq5 @@ -1070,20 +1070,13 @@ struct XOHCL } // - // Prev Bar Must be Bearish ... - result = pBar.IsBearish(); - if (!result) - { - return result; - } - - // - // Close of Current Bar must be Higher than High of Prev Bar ... - result = close > pBar.high; - if (!result) - { - return result; - } + result = + // + pBar.IsBearish() && + open < pBar.close && close > pBar.open && + high >= pBar.high && low <= pBar.low + // + ; // return result; @@ -1114,20 +1107,13 @@ struct XOHCL } // - // Prev Bar Must be Bullish ... - result = pBar.IsBullish(); - if (!result) - { - return result; - } - - // - // Close of Current Bar must be Lower than Low of Prev Bar ... - result = close < pBar.low; - if (!result) - { - return result; - } + result = + // + pBar.IsBullidh() && + open > pBar.close && close < pBar.open && + high >= pBar.high && low <= pBar.low + // + ; // return result; diff --git a/Libraries/x-saherelm.tools.mq5 b/Libraries/x-saherelm.tools.mq5 index 0a91ec9a..e3c817d5 100644 --- a/Libraries/x-saherelm.tools.mq5 +++ b/Libraries/x-saherelm.tools.mq5 @@ -1125,6 +1125,8 @@ enum ENUM_XZONE_STATE }; // +// a Zone Consists an Area of +// an Upper Pivot and a Lower Pivot ... struct XZone { // @@ -1395,8 +1397,54 @@ struct XZone return result; } + // + // Zone Tools ... + double _threshold; + double GetThresholdPoints() + { + // + double result = 0; + + // + if (!IsValid()) + { + return result; + } + + // + double _points = GetPoints(symbol); + result = + // + _points && + _threshold + // + ; + + // + return result; + } + // // Check Zone Rejected ... + bool IsSupportRejected() { + // + bool result = false; + + // + // Check is Full Support or Not ... + ENUM_XZONE_STATE state = GetState(); + result = state == XZONE_STATE_FULL_SUPPORT; + if (!result) { + return result; + } + + // + // First Check Price Rejection Above Upper Line ... + + + // + return result; + } // // Check Zone Breaked ... @@ -1414,6 +1462,9 @@ struct XZone up.Clean(); down.Clean(); + // + _threshold = 15; + // _objName = NULL; } @@ -1431,7 +1482,8 @@ struct XZone IsValid(symbol) && IsValid(period) && up.IsValid() && - down.IsValid() + down.IsValid() && + _threshold > 0 // ; @@ -1505,7 +1557,8 @@ struct XZone _subWindow, true // Force PRefix ... ); - if (!result) { + if (!result) + { return result; }