diff --git a/.vscode/vscode-kanban.json b/.vscode/vscode-kanban.json index c99b511d..857a7aca 100644 --- a/.vscode/vscode-kanban.json +++ b/.vscode/vscode-kanban.json @@ -44,19 +44,6 @@ } ], "in-progress": [ - { - "assignedTo": { - "name": "Hadi Khazaee Asl" - }, - "creation_time": "2024-06-01T00:56:22.059Z", - "description": { - "content": "Indicators:\n- [] XHULL;\n- [] XSSL;\n- [] XAMA;\n- [] XTM;\n\nfor each indicator:\n- [] Buffers;\n- [] Conditions;\n- [] Clean;\n- [] Score;\n- [] Summary;\n", - "mime": "text/markdown" - }, - "id": "71", - "references": [], - "title": "add XHULL/XSSLC/XAMA/XTM Indicators also to X121MarketCycle Calss" - }, { "assignedTo": { "name": "Hadi Khazaee Asl" @@ -97,6 +84,19 @@ } ], "testing": [ + { + "assignedTo": { + "name": "Hadi Khazaee Asl" + }, + "creation_time": "2024-06-01T00:56:22.059Z", + "description": { + "content": "Indicators:\n- [x] XHULL;\n- [x] XSSL;\n- [x] XAMA;\n- [x] XTM;\n\nfor each indicator:\n- [x] Buffers;\n- [x] Conditions;\n- [x] Clean;\n- [x] Score;\n- [x] Summary;\n\nignore XAMA and XTM ...", + "mime": "text/markdown" + }, + "id": "71", + "references": [], + "title": "add XHULL/XSSLC/XAMA/XTM Indicators also to X121MarketCycle Calss" + }, { "assignedTo": { "name": "Hadi Khazaee Asl" diff --git a/Classes/x-saherelm.x121.xmcycle.class.mq5 b/Classes/x-saherelm.x121.xmcycle.class.mq5 index 14fe692f..b9ab30ef 100644 --- a/Classes/x-saherelm.x121.xmcycle.class.mq5 +++ b/Classes/x-saherelm.x121.xmcycle.class.mq5 @@ -687,9 +687,21 @@ public: // // XHULL ... + bool isHullBullish; + bool isHullBearish; + bool isHullUpBullish; + bool isHullUpBearish; + bool isHullDownBullish; + bool isHullDownBearish; + bool isHullSwitchedToBullish; + bool isHullSwitchedToBearish; // // XSSLC ... + bool isSSLCBullish; + bool isSSLCBearish; + bool isSSLCSwitchedToBullish; + bool isSSLCSwitchedToBearish; // // XPV ... @@ -1129,9 +1141,21 @@ public: // // XHULL ... + isHullBullish = false; + isHullBearish = false; + isHullUpBullish = false; + isHullUpBearish = false; + isHullDownBullish = false; + isHullDownBearish = false; + isHullSwitchedToBullish = false; + isHullSwitchedToBearish = false; // // XSSLC ... + isSSLCBullish = false; + isSSLCBearish = false; + isSSLCSwitchedToBullish = false; + isSSLCSwitchedToBearish = false; // // XPV ... @@ -1420,9 +1444,57 @@ public: // // XHULL ... + if (isHullBullish) + { + bullScore++; + } + if (isHullBearish) + { + bearScore++; + } + if (isHullUpBullish) + { + bullScore++; + } + if (isHullUpBearish) + { + bearScore++; + } + if (isHullDownBullish) + { + bullScore++; + } + if (isHullDownBearish) + { + bearScore++; + } + if (isHullSwitchedToBullish) + { + bullScore++; + } + if (isHullSwitchedToBearish) + { + bearScore++; + } // // XSSLC ... + if (isSSLCBullish) + { + bullScore++; + } + if (isSSLCBearish) + { + bearScore++; + } + if (isSSLCSwitchedToBullish) + { + bullScore++; + } + if (isSSLCSwitchedToBearish) + { + bearScore++; + } // // XPV ... @@ -2148,7 +2220,7 @@ public: "" // ; - candlestickStr = SetLabel(": ", candlestickStr, separator); + candlestickStr = SetLabel("XOHCL: ", candlestickStr, separator); // // XZG ... @@ -2159,7 +2231,7 @@ public: "" // ; - zgStr = SetLabel(": ", zgStr, separator); + zgStr = SetLabel("XZG: ", zgStr, separator); // // XSTR ... @@ -2172,7 +2244,7 @@ public: "" // ; - strStr = SetLabel(": ", strStr, separator); + strStr = SetLabel("XSTR: ", strStr, separator); // // XCHE ... @@ -2185,7 +2257,7 @@ public: "" // ; - cheStr = SetLabel(": ", cheStr, separator); + cheStr = SetLabel("XCHE: ", cheStr, separator); // // XTD ... @@ -2198,7 +2270,37 @@ public: "" // ; - tdStr = SetLabel(": ", tdStr, separator); + tdStr = SetLabel("XTD: ", tdStr, separator); + + // + // XSSLC ... + string sslcStr = + // + ToString("isSSLCBullish", isSSLCBullish, ignoreFalseConditions, separator) + + ToString("isSSLCBearish", isSSLCBearish, ignoreFalseConditions, separator) + + ToString("isSSLCSwitchedToBullish", isSSLCSwitchedToBullish, ignoreFalseConditions, separator) + + ToString("isSSLCSwitchedToBearish", isSSLCSwitchedToBearish, ignoreFalseConditions, separator) + + "" + // + ; + sslcStr = SetLabel("XSSLC: ", sslcStr, separator); + + // + // XHULL ... + string hullStr = + // + ToString("isHullBullish", isHullBullish, ignoreFalseConditions, separator) + + ToString("isHullBearish", isHullBearish, ignoreFalseConditions, separator) + + ToString("isHullUpBullish", isHullUpBullish, ignoreFalseConditions, separator) + + ToString("isHullUpBearish", isHullUpBearish, ignoreFalseConditions, separator) + + ToString("isHullDownBullish", isHullDownBullish, ignoreFalseConditions, separator) + + ToString("isHullDownBearish", isHullDownBearish, ignoreFalseConditions, separator) + + ToString("isHullSwitchedToBullish", isHullSwitchedToBullish, ignoreFalseConditions, separator) + + ToString("isHullSwitchedToBearish", isHullSwitchedToBearish, ignoreFalseConditions, separator) + + "" + // + ; + hullStr = SetLabel("XHULL: ", hullStr, separator); // // XHK ... @@ -2219,7 +2321,7 @@ public: "" // ; - hkStr = SetLabel(": ", hkStr, separator); + hkStr = SetLabel("XHK: ", hkStr, separator); // // XDON ... @@ -2240,7 +2342,7 @@ public: "" // ; - donStr = SetLabel(": ", donStr, separator); + donStr = SetLabel("XDON: ", donStr, separator); // // XMC ... @@ -2261,7 +2363,7 @@ public: "" // ; - mcStr = SetLabel(": ", mcStr, separator); + mcStr = SetLabel("XMC: ", mcStr, separator); // // XMRB ... @@ -2282,7 +2384,7 @@ public: "" // ; - mrbStr = SetLabel(": ", mrbStr, separator); + mrbStr = SetLabel("XMRB: ", mrbStr, separator); // // XICH ... @@ -2313,7 +2415,7 @@ public: "" // ; - ichStr = SetLabel(": ", ichStr, separator); + ichStr = SetLabel("XICH: ", ichStr, separator); // // XPV ... @@ -2379,7 +2481,7 @@ public: "" // ; - pvStr = SetLabel(": ", pvStr, separator); + pvStr = SetLabel("XPV: ", pvStr, separator); // result = @@ -2391,6 +2493,8 @@ public: strStr + cheStr + tdStr + + sslcStr + + hullStr + hkStr + donStr + mcStr + @@ -3614,11 +3718,54 @@ public: bool isSMHKSwitchedToBullish = cSMHKBar.IsBullish() && !pSMHKBar.IsBullish(); bool isSMHKSwitchedToBearish = cSMHKBar.IsBearish() && !pSMHKBar.IsBearish(); + // + // XSSLC ... + + // + bool isSSLCBullish = conditions.sslcUps[cIndex] > conditions.sslcDowns[cIndex]; + bool isSSLCBullishPrev = conditions.sslcUps[pIndex] > conditions.sslcDowns[pIndex]; + + // + bool isSSLCBearish = conditions.sslcDowns[cIndex] > conditions.sslcUps[cIndex]; + bool isSSLCBearishPrev = conditions.sslcDowns[pIndex] > conditions.sslcUps[pIndex]; + + // + bool isSSLCSwitchedToBullish = isSSLCBullish && + !isSSLCBullishPrev; + bool isSSLCSwitchedToBearish = isSSLCBearish && + !isSSLCBearishPrev; + // // XHULL ... // - // XSSLC ... + bool isHullUpBullish = conditions.hullUps[cIndex] > conditions.hullUps[pIndex]; + bool isHullUpBullishPrev = conditions.hullUps[pIndex] > conditions.hullUps[ppIndex]; + + // + bool isHullUpBearish = conditions.hullUps[cIndex] < conditions.hullUps[pIndex]; + bool isHullUpBearishPrev = conditions.hullUps[pIndex] < conditions.hullUps[ppIndex]; + + // + bool isHullDownBullish = conditions.hullDowns[cIndex] > conditions.hullDowns[pIndex]; + bool isHullDownBullishPrev = conditions.hullDowns[pIndex] > conditions.hullDowns[ppIndex]; + + // + bool isHullDownBearish = conditions.hullDowns[cIndex] < conditions.hullDowns[pIndex]; + bool isHullDownBearishPrev = conditions.hullDowns[pIndex] < conditions.hullDowns[ppIndex]; + + // + bool isHullBullish = isHullUpBullish && isHullDownBullish; + bool isHullBullishPrev = isHullUpBullishPrev && isHullDownBullishPrev; + + // + bool isHullBearish = isHullUpBearish && isHullDownBearish; + bool isHullBearishPrev = isHullUpBearishPrev && isHullDownBearishPrev; + + bool isHullSwitchedToBullish = isHullBullish && + !isHullBullishPrev; + bool isHullSwitchedToBearish = isHullBearish && + !isHullBearishPrev; // // XICH ... @@ -4246,6 +4393,22 @@ public: conditions.isCurrentMidLineOverLastMidLine = isCurrentMidLineOverLastMidLine; conditions.isCurrentMidLineUnderLastMidLine = isCurrentMidLineUnderLastMidLine; + // + conditions.isSSLCBullish = isSSLCBullish; + conditions.isSSLCBearish = isSSLCBearish; + conditions.isSSLCSwitchedToBullish = isSSLCSwitchedToBullish; + conditions.isSSLCSwitchedToBearish = isSSLCSwitchedToBearish; + + // + conditions.isHullBullish = isHullBullish; + conditions.isHullBearish = isHullBearish; + conditions.isHullUpBullish = isHullUpBullish; + conditions.isHullUpBearish = isHullUpBearish; + conditions.isHullDownBullish = isHullDownBullish; + conditions.isHullDownBearish = isHullDownBearish; + conditions.isHullSwitchedToBullish = isHullSwitchedToBullish; + conditions.isHullSwitchedToBearish = isHullSwitchedToBearish; + // conditions.isHKBullish = isHKBullish; conditions.isHKBearish = isHKBearish;