diff --git a/Helpers/x-saherelm.x121.xpv.helper.mq5 b/Helpers/x-saherelm.x121.xpv.helper.mq5 index badc1dbd..10f8f1c8 100644 --- a/Helpers/x-saherelm.x121.xpv.helper.mq5 +++ b/Helpers/x-saherelm.x121.xpv.helper.mq5 @@ -35,22 +35,27 @@ enum ENUM_X121_XPV_BUFFERS X121_XPV_PEAK_LINE = 0, X121_XPV_VALE_LINE = 1, X121_XPV_SAR_LINE = 2, - X121_XPV_PEAK_GOLDEN_ZONE_LINE = 3, - X121_XPV_VALE_GOLDEN_ZONE_LINE = 4, - X121_XPV_SUPPORT_LINE = 5, - X121_XPV_RESISTANCE_LINE = 6, - X121_XPV_C_HH_LINE = 7, - X121_XPV_C_LL_LINE = 8, - X121_XPV_S_HH_LINE = 9, - X121_XPV_S_LL_LINE = 10, - X121_XPV_M_HH_LINE = 11, - X121_XPV_M_LL_LINE = 12, - X121_XPV_L_HH_LINE = 13, - X121_XPV_L_LL_LINE = 14, - X121_XPV_H_HH_LINE = 15, - X121_XPV_H_LL_LINE = 16, - X121_XPV_FRACTALS_UPPER_LINE = 17, - X121_XPV_FRACTALS_LOWER_LINE = 18, + X121_XPV_SWING_LOW_LINE = 3, + X121_XPV_SWING_HIGH_LINE = 4, + X121_XPV_PEAK_GOLDEN_ZONE_LINE = 5, + X121_XPV_VALE_GOLDEN_ZONE_LINE = 6, + X121_XPV_SUPPORT_LINE = 7, + X121_XPV_RESISTANCE_LINE = 8, + X121_XPV_TREND_LINE = 9, + X121_XPV_TREND_COLOR_LINE = 10, + X121_XPV_C_HH_LINE = 11, + X121_XPV_C_LL_LINE = 12, + X121_XPV_S_HH_LINE = 13, + X121_XPV_S_LL_LINE = 14, + X121_XPV_M_HH_LINE = 15, + X121_XPV_M_LL_LINE = 16, + X121_XPV_L_HH_LINE = 17, + X121_XPV_L_LL_LINE = 18, + X121_XPV_H_HH_LINE = 19, + X121_XPV_H_LL_LINE = 20, + X121_XPV_FRACTALS_UPPER_LINE = 21, + X121_XPV_FRACTALS_LOWER_LINE = 22, + X121_XPV_TREND_STATE_LINE = 23, }; // @@ -87,10 +92,14 @@ struct X121XPVInputs ENUM_X_FIBO_LEVELS goldenZoneLevel; // Golden Zone Detection // - // Parabolic Sar Detection ... + // Sar Detection ... double sarStep; // Step double sarMax; // Maximum + // + // Swing Detection ... + int swingLength; // Length + // int startCalculationForLastBars; // Calculate Last n Bars @@ -98,6 +107,9 @@ struct X121XPVInputs int sarArrowCode; // Parabolic Sar Arrow Code int peaksArrowCode; // Peaks Arrow Code int valesArrowCode; // Vales Arrow Code + int trendArrowCode; // Trend Arrow Code + int swingLowsArrowCode; // Swing Lows Arrow Code + int swingHighsArrowCode; // Swing Highs Arrow Code int supportsArrowCode; // Supports Arrow Code int resistancesArrowCode; // Resistances Arrow Code @@ -106,6 +118,9 @@ struct X121XPVInputs bool showPeaks; // Show Peaks bool showVales; // Show Vales bool showGoldenZones; // Show Golden Zones + bool showTrend; // Show Trend + bool showSwingLows; // Show Swing Lows + bool showSwingHighs; // Show Swing Highs bool showSupports; // Show Supports bool showResistances; // Show Resistances @@ -154,6 +169,9 @@ struct X121XPVInputs sarStep = 0; sarMax = 0; + // + swingLength = 0; + // startCalculationForLastBars = 0; @@ -161,6 +179,9 @@ struct X121XPVInputs sarArrowCode = 0; peaksArrowCode = 0; valesArrowCode = 0; + trendArrowCode = 0; + swingLowsArrowCode = 0; + swingHighsArrowCode = 0; supportsArrowCode = 0; resistancesArrowCode = 0; @@ -168,6 +189,9 @@ struct X121XPVInputs showSar = false; showPeaks = false; showVales = false; + showTrend = false; + showSwingLows = false; + showSwingHighs = false; showGoldenZones = false; showSupports = false; showResistances = false; @@ -210,6 +234,9 @@ struct X121XPVInputs sarStep = 0.02; sarMax = 0.2; + // + swingLength = 5; + // startCalculationForLastBars = 1000; @@ -217,6 +244,9 @@ struct X121XPVInputs sarArrowCode = 159; peaksArrowCode = 159; valesArrowCode = 159; + trendArrowCode = 117; + swingLowsArrowCode = 225; + swingHighsArrowCode = 226; supportsArrowCode = 159; resistancesArrowCode = 159; @@ -224,6 +254,9 @@ struct X121XPVInputs showSar = true; showPeaks = true; showVales = true; + showTrend = true; + showSwingLows = true; + showSwingHighs = true; showGoldenZones = true; showSupports = true; showResistances = true; @@ -242,6 +275,7 @@ struct X121XPVInputs // SAR ... sarMax > 0 && sarStep > 0 && + swingLength > 0 && sarMax > sarStep && // // XPV ... @@ -264,7 +298,7 @@ struct X121XPVInputs int result = 0; // - result = MathMax(1, 1); + result = MathMax(0, swingLength); // return result; @@ -283,12 +317,6 @@ struct X121XPVConditions // // Buffers ... - double peaksBuffer[]; - double valesBuffer[]; - double peaksGoldenBuffer[]; - double valesGoldenBuffer[]; - double supportsBuffer[]; - double resistancesBuffer[]; double sarBuffer[]; double cHHBuffer[]; double cLLBuffer[]; @@ -300,6 +328,17 @@ struct X121XPVConditions double lLLBuffer[]; double hHHBuffer[]; double hLLBuffer[]; + double trendBuffer[]; + double peaksBuffer[]; + double valesBuffer[]; + double supportsBuffer[]; + double swingLowsBuffer[]; + double swingHighsBuffer[]; + double trendColorBuffer[]; + double trendStateBuffer[]; + double peaksGoldenBuffer[]; + double valesGoldenBuffer[]; + double resistancesBuffer[]; double fractalsUpperBuffer[]; double fractalsLowerBuffer[]; @@ -355,12 +394,6 @@ struct X121XPVConditions // Buffers ... // - Clean(peaksBuffer); - Clean(valesBuffer); - Clean(peaksGoldenBuffer); - Clean(valesGoldenBuffer); - Clean(supportsBuffer); - Clean(resistancesBuffer); Clean(sarBuffer); Clean(cHHBuffer); Clean(cLLBuffer); @@ -372,6 +405,17 @@ struct X121XPVConditions Clean(lLLBuffer); Clean(hHHBuffer); Clean(hLLBuffer); + Clean(trendBuffer); + Clean(peaksBuffer); + Clean(valesBuffer); + Clean(supportsBuffer); + Clean(swingLowsBuffer); + Clean(swingHighsBuffer); + Clean(trendColorBuffer); + Clean(trendStateBuffer); + Clean(peaksGoldenBuffer); + Clean(valesGoldenBuffer); + Clean(resistancesBuffer); Clean(fractalsUpperBuffer); Clean(fractalsLowerBuffer); @@ -380,12 +424,6 @@ struct X121XPVConditions // Clean(bearishTrendBuffer); // - ArraySetAsSeries(peaksBuffer, true); - ArraySetAsSeries(valesBuffer, true); - ArraySetAsSeries(peaksGoldenBuffer, true); - ArraySetAsSeries(valesGoldenBuffer, true); - ArraySetAsSeries(supportsBuffer, true); - ArraySetAsSeries(resistancesBuffer, true); ArraySetAsSeries(sarBuffer, true); ArraySetAsSeries(cHHBuffer, true); ArraySetAsSeries(cLLBuffer, true); @@ -397,6 +435,17 @@ struct X121XPVConditions ArraySetAsSeries(lLLBuffer, true); ArraySetAsSeries(hHHBuffer, true); ArraySetAsSeries(hLLBuffer, true); + ArraySetAsSeries(trendBuffer, true); + ArraySetAsSeries(peaksBuffer, true); + ArraySetAsSeries(valesBuffer, true); + ArraySetAsSeries(supportsBuffer, true); + ArraySetAsSeries(swingLowsBuffer, true); + ArraySetAsSeries(swingHighsBuffer, true); + ArraySetAsSeries(trendColorBuffer, true); + ArraySetAsSeries(trendStateBuffer, true); + ArraySetAsSeries(peaksGoldenBuffer, true); + ArraySetAsSeries(valesGoldenBuffer, true); + ArraySetAsSeries(resistancesBuffer, true); ArraySetAsSeries(fractalsUpperBuffer, true); ArraySetAsSeries(fractalsLowerBuffer, true); @@ -595,12 +644,6 @@ class XCX121XPVHelper : public XCBaseHelper mInputs.Clean(); // - Clean(peaksBuffer); - Clean(valesBuffer); - Clean(peaksGoldenBuffer); - Clean(valesGoldenBuffer); - Clean(supportsBuffer); - Clean(resistancesBuffer); Clean(sarBuffer); Clean(cHHBuffer); Clean(cLLBuffer); @@ -612,6 +655,17 @@ class XCX121XPVHelper : public XCBaseHelper Clean(lLLBuffer); Clean(hHHBuffer); Clean(hLLBuffer); + Clean(trendBuffer); + Clean(peaksBuffer); + Clean(valesBuffer); + Clean(supportsBuffer); + Clean(swingLowsBuffer); + Clean(swingHighsBuffer); + Clean(trendColorBuffer); + Clean(trendStateBuffer); + Clean(peaksGoldenBuffer); + Clean(valesGoldenBuffer); + Clean(resistancesBuffer); Clean(fractalsUpperBuffer); Clean(fractalsLowerBuffer); } @@ -639,12 +693,6 @@ class XCX121XPVHelper : public XCBaseHelper } // - ArraySetAsSeries(peaksBuffer, true); - ArraySetAsSeries(valesBuffer, true); - ArraySetAsSeries(peaksGoldenBuffer, true); - ArraySetAsSeries(valesGoldenBuffer, true); - ArraySetAsSeries(supportsBuffer, true); - ArraySetAsSeries(resistancesBuffer, true); ArraySetAsSeries(sarBuffer, true); ArraySetAsSeries(cHHBuffer, true); ArraySetAsSeries(cLLBuffer, true); @@ -656,6 +704,17 @@ class XCX121XPVHelper : public XCBaseHelper ArraySetAsSeries(lLLBuffer, true); ArraySetAsSeries(hHHBuffer, true); ArraySetAsSeries(hLLBuffer, true); + ArraySetAsSeries(trendBuffer, true); + ArraySetAsSeries(peaksBuffer, true); + ArraySetAsSeries(valesBuffer, true); + ArraySetAsSeries(supportsBuffer, true); + ArraySetAsSeries(swingLowsBuffer, true); + ArraySetAsSeries(swingHighsBuffer, true); + ArraySetAsSeries(trendColorBuffer, true); + ArraySetAsSeries(trendStateBuffer, true); + ArraySetAsSeries(peaksGoldenBuffer, true); + ArraySetAsSeries(valesGoldenBuffer, true); + ArraySetAsSeries(resistancesBuffer, true); ArraySetAsSeries(fractalsUpperBuffer, true); ArraySetAsSeries(fractalsLowerBuffer, true); @@ -704,6 +763,10 @@ class XCX121XPVHelper : public XCBaseHelper mInputs.sarStep, mInputs.sarMax, // + // Swing Detection ... + "", + mInputs.swingLength, + // // Presentation ... "", // @@ -711,12 +774,18 @@ class XCX121XPVHelper : public XCBaseHelper mInputs.sarArrowCode, mInputs.peaksArrowCode, mInputs.valesArrowCode, + mInputs.trendArrowCode, + mInputs.swingLowsArrowCode, + mInputs.swingHighsArrowCode, mInputs.supportsArrowCode, mInputs.resistancesArrowCode, // mInputs.showSar, mInputs.showPeaks, mInputs.showVales, + mInputs.showTrend, + mInputs.showSwingLows, + mInputs.showSwingHighs, mInputs.showGoldenZones, mInputs.showSupports, mInputs.showResistances @@ -917,6 +986,266 @@ class XCX121XPVHelper : public XCBaseHelper ); } + // + // SWINGLOW ... + + // + double GetSwingLow( + int barIndex // Bar Index + ) + { + // + if (barIndex < 0) + { + barIndex = 0; + } + + // + Calculate(); + + // + int count = ArraySize(swingLowsBuffer); + if (barIndex >= count) + { + barIndex = count - 1; + } + + // + return swingLowsBuffer[barIndex]; + } + + // + int CopySwingLow( + int start, // Start + int count, // Number of Items for read + double &buffer[], // Dest Buffer + bool forceClean = true // Force To Clean buffer + ) + { + // + // Update Calculations ... + Calculate(); + + // + // Copy Items ... + return Copy( + start, + count, + swingLowsBuffer, + buffer, + forceClean + // + ); + } + + // + // SWINGHIGH ... + + // + double GetSwingHigh( + int barIndex // Bar Index + ) + { + // + if (barIndex < 0) + { + barIndex = 0; + } + + // + Calculate(); + + // + int count = ArraySize(swingHighsBuffer); + if (barIndex >= count) + { + barIndex = count - 1; + } + + // + return swingHighsBuffer[barIndex]; + } + + // + int CopySwingHigh( + int start, // Start + int count, // Number of Items for read + double &buffer[], // Dest Buffer + bool forceClean = true // Force To Clean buffer + ) + { + // + // Update Calculations ... + Calculate(); + + // + // Copy Items ... + return Copy( + start, + count, + swingHighsBuffer, + buffer, + forceClean + // + ); + } + + // + // TREND ... + + // + double GetTrend( + int barIndex // Bar Index + ) + { + // + if (barIndex < 0) + { + barIndex = 0; + } + + // + Calculate(); + + // + int count = ArraySize(trendBuffer); + if (barIndex >= count) + { + barIndex = count - 1; + } + + // + return trendBuffer[barIndex]; + } + + // + int CopyTrend( + int start, // Start + int count, // Number of Items for read + double &buffer[], // Dest Buffer + bool forceClean = true // Force To Clean buffer + ) + { + // + // Update Calculations ... + Calculate(); + + // + // Copy Items ... + return Copy( + start, + count, + trendBuffer, + buffer, + forceClean + // + ); + } + + // + // TRENDCOLOR ... + + // + double GetTrendColor( + int barIndex // Bar Index + ) + { + // + if (barIndex < 0) + { + barIndex = 0; + } + + // + Calculate(); + + // + int count = ArraySize(trendColorBuffer); + if (barIndex >= count) + { + barIndex = count - 1; + } + + // + return trendColorBuffer[barIndex]; + } + + // + int CopyTrendColor( + int start, // Start + int count, // Number of Items for read + double &buffer[], // Dest Buffer + bool forceClean = true // Force To Clean buffer + ) + { + // + // Update Calculations ... + Calculate(); + + // + // Copy Items ... + return Copy( + start, + count, + trendColorBuffer, + buffer, + forceClean + // + ); + } + + // + // TRENDSTATE ... + + // + double GetTrendState( + int barIndex // Bar Index + ) + { + // + if (barIndex < 0) + { + barIndex = 0; + } + + // + Calculate(); + + // + int count = ArraySize(trendStateBuffer); + if (barIndex >= count) + { + barIndex = count - 1; + } + + // + return trendStateBuffer[barIndex]; + } + + // + int CopyTrendState( + int start, // Start + int count, // Number of Items for read + double &buffer[], // Dest Buffer + bool forceClean = true // Force To Clean buffer + ) + { + // + // Update Calculations ... + Calculate(); + + // + // Copy Items ... + return Copy( + start, + count, + trendStateBuffer, + buffer, + forceClean + // + ); + } + // // SUPPORTS ... @@ -1125,238 +1454,6 @@ class XCX121XPVHelper : public XCBaseHelper ); } - // - // - // - - // - double GetHigherPeak( - int &index, // Bar Index - double peak, // Peak Source - int barIndex = 0, // Bar Index - int loopback = 576 // Max Allowed Loopback - ) - { - // - double result = 0; - - // - index = -1; - - // - if (barIndex < 0) - { - barIndex = 0; - } - - // - if (loopback < 576) - { - loopback = 576; - } - - // - if (peak <= 0) - { - return result; - } - - // - double iValue = 0; - int sIndex = barIndex; - bool canContinue = true; - while (canContinue) - { - // - iValue = GetPeak(sIndex); - if (iValue > peak) - { - // - index = sIndex; - result = iValue; - break; - } - - // - canContinue = sIndex < barIndex + loopback; - sIndex++; - } - - // - return result; - } - - // - double GetLowerPeak( - int &index, // Bar Index - double peak, // Peak Source - int barIndex = 0, // Bar Index - int loopback = 576 // Max Allowed Loopback - ) - { - // - double result = 0; - - // - index = -1; - - // - if (barIndex < 0) - { - barIndex = 0; - } - - // - if (loopback < 576) - { - loopback = 576; - } - - // - if (peak <= 0) - { - return result; - } - - // - double iValue = 0; - int sIndex = barIndex; - bool canContinue = true; - while (canContinue) - { - // - iValue = GetPeak(sIndex); - if (iValue < peak) - { - // - index = sIndex; - result = iValue; - break; - } - - // - canContinue = sIndex < barIndex + loopback; - sIndex++; - } - - // - return result; - } - - // - double GetHigherVale( - int &index, // Bar Index - double vale, // Vale Source - int barIndex = 0, // Bar Index - int loopback = 576 // Max Allowed Loopback - ) - { - // - double result = 0; - - // - index = -1; - - // - if (barIndex < 0) - { - barIndex = 0; - } - - // - if (loopback < 576) - { - loopback = 576; - } - - // - if (vale <= 0) - { - return result; - } - - // - double iValue = 0; - int sIndex = barIndex; - bool canContinue = true; - while (canContinue) - { - // - iValue = GetVale(sIndex); - if (iValue > vale) - { - // - index = sIndex; - result = iValue; - break; - } - - // - canContinue = sIndex < barIndex + loopback; - sIndex++; - } - - // - return result; - } - - // - double GetLowerVale( - int &index, // Bar Index - double vale, // Vale Source - int barIndex = 0, // Bar Index - int loopback = 576 // Max Allowed Loopback - ) - { - // - double result = 0; - - // - index = -1; - - // - if (barIndex < 0) - { - barIndex = 0; - } - - // - if (loopback < 576) - { - loopback = 576; - } - - // - if (vale <= 0) - { - return result; - } - - // - double iValue = 0; - int sIndex = barIndex; - bool canContinue = true; - while (canContinue) - { - // - iValue = GetVale(sIndex); - if (iValue < vale) - { - // - index = sIndex; - result = iValue; - break; - } - - // - canContinue = sIndex < barIndex + loopback; - sIndex++; - } - - // - return result; - } - // // CURRENT ... @@ -1999,6 +2096,234 @@ class XCX121XPVHelper : public XCBaseHelper // // Tools Function ... + // + double GetHigherPeak( + int &index, // Bar Index + double peak, // Peak Source + int barIndex = 0, // Bar Index + int loopback = 576 // Max Allowed Loopback + ) + { + // + double result = 0; + + // + index = -1; + + // + if (barIndex < 0) + { + barIndex = 0; + } + + // + if (loopback < 576) + { + loopback = 576; + } + + // + if (peak <= 0) + { + return result; + } + + // + double iValue = 0; + int sIndex = barIndex; + bool canContinue = true; + while (canContinue) + { + // + iValue = GetPeak(sIndex); + if (iValue > peak) + { + // + index = sIndex; + result = iValue; + break; + } + + // + canContinue = sIndex < barIndex + loopback; + sIndex++; + } + + // + return result; + } + + // + double GetLowerPeak( + int &index, // Bar Index + double peak, // Peak Source + int barIndex = 0, // Bar Index + int loopback = 576 // Max Allowed Loopback + ) + { + // + double result = 0; + + // + index = -1; + + // + if (barIndex < 0) + { + barIndex = 0; + } + + // + if (loopback < 576) + { + loopback = 576; + } + + // + if (peak <= 0) + { + return result; + } + + // + double iValue = 0; + int sIndex = barIndex; + bool canContinue = true; + while (canContinue) + { + // + iValue = GetPeak(sIndex); + if (iValue < peak) + { + // + index = sIndex; + result = iValue; + break; + } + + // + canContinue = sIndex < barIndex + loopback; + sIndex++; + } + + // + return result; + } + + // + double GetHigherVale( + int &index, // Bar Index + double vale, // Vale Source + int barIndex = 0, // Bar Index + int loopback = 576 // Max Allowed Loopback + ) + { + // + double result = 0; + + // + index = -1; + + // + if (barIndex < 0) + { + barIndex = 0; + } + + // + if (loopback < 576) + { + loopback = 576; + } + + // + if (vale <= 0) + { + return result; + } + + // + double iValue = 0; + int sIndex = barIndex; + bool canContinue = true; + while (canContinue) + { + // + iValue = GetVale(sIndex); + if (iValue > vale) + { + // + index = sIndex; + result = iValue; + break; + } + + // + canContinue = sIndex < barIndex + loopback; + sIndex++; + } + + // + return result; + } + + // + double GetLowerVale( + int &index, // Bar Index + double vale, // Vale Source + int barIndex = 0, // Bar Index + int loopback = 576 // Max Allowed Loopback + ) + { + // + double result = 0; + + // + index = -1; + + // + if (barIndex < 0) + { + barIndex = 0; + } + + // + if (loopback < 576) + { + loopback = 576; + } + + // + if (vale <= 0) + { + return result; + } + + // + double iValue = 0; + int sIndex = barIndex; + bool canContinue = true; + while (canContinue) + { + // + iValue = GetVale(sIndex); + if (iValue < vale) + { + // + index = sIndex; + result = iValue; + break; + } + + // + canContinue = sIndex < barIndex + loopback; + sIndex++; + } + + // + return result; + } + // double GetLowestPeak( int barIndex, @@ -2301,48 +2626,6 @@ class XCX121XPVHelper : public XCBaseHelper conditions.sarBuffer // ); - // - CopyPeak( - zIndex, - loopback, - conditions.peaksBuffer // - ); - - // - CopyVale( - zIndex, - loopback, - conditions.valesBuffer // - ); - - // - CopySupport( - zIndex, - loopback, - conditions.supportsBuffer // - ); - - // - CopyResistance( - zIndex, - loopback, - conditions.resistancesBuffer // - ); - - // - CopyPeakGoldenZone( - zIndex, - loopback, - conditions.peaksGoldenBuffer // - ); - - // - CopyValeGoldenZone( - zIndex, - loopback, - conditions.valesGoldenBuffer // - ); - // CopyCHH( zIndex, @@ -2413,6 +2696,83 @@ class XCX121XPVHelper : public XCBaseHelper conditions.hLLBuffer // ); + // + CopyTrend( + zIndex, + loopback, + conditions.trendBuffer // + ); + + // + CopyPeak( + zIndex, + loopback, + conditions.peaksBuffer // + ); + + // + CopyVale( + zIndex, + loopback, + conditions.valesBuffer // + ); + + // + CopySupport( + zIndex, + loopback, + conditions.supportsBuffer // + ); + + // + CopySwingLow( + zIndex, + loopback, + conditions.swingLowsBuffer // + ); + + // + CopySwingHigh( + zIndex, + loopback, + conditions.swingHighsBuffer // + ); + + // + CopyTrendColor( + zIndex, + loopback, + conditions.trendColorBuffer // + ); + + // + CopyTrendState( + zIndex, + loopback, + conditions.trendStateBuffer // + ); + + // + CopyPeakGoldenZone( + zIndex, + loopback, + conditions.peaksGoldenBuffer // + ); + + // + CopyValeGoldenZone( + zIndex, + loopback, + conditions.valesGoldenBuffer // + ); + + // + CopyResistance( + zIndex, + loopback, + conditions.resistancesBuffer // + ); + // CopyFractalsUpper( zIndex, @@ -2504,12 +2864,6 @@ class XCX121XPVHelper : public XCBaseHelper // // Buffers ... - double peaksBuffer[]; - double valesBuffer[]; - double supportsBuffer[]; - double resistancesBuffer[]; - double peaksGoldenBuffer[]; - double valesGoldenBuffer[]; double sarBuffer[]; double cHHBuffer[]; double cLLBuffer[]; @@ -2521,6 +2875,17 @@ class XCX121XPVHelper : public XCBaseHelper double lLLBuffer[]; double hHHBuffer[]; double hLLBuffer[]; + double trendBuffer[]; + double peaksBuffer[]; + double valesBuffer[]; + double supportsBuffer[]; + double swingLowsBuffer[]; + double swingHighsBuffer[]; + double trendColorBuffer[]; + double trendStateBuffer[]; + double peaksGoldenBuffer[]; + double valesGoldenBuffer[]; + double resistancesBuffer[]; double fractalsUpperBuffer[]; double fractalsLowerBuffer[]; @@ -2531,232 +2896,222 @@ class XCX121XPVHelper : public XCBaseHelper { // // Buffers ... + int calculatedBars = BarsCalculated(mHandler); // - // SAR ... CopyBuffer( mHandler, X121_XPV_SAR_LINE, 0, maxRequiredBars, - sarBuffer - // + sarBuffer // ); // - // XPV ... - - // - // PEAKS ... - CopyBuffer( - mHandler, - X121_XPV_PEAK_LINE, - 0, - maxRequiredBars, - peaksBuffer - // - ); - - // - // VALES ... - CopyBuffer( - mHandler, - X121_XPV_VALE_LINE, - 0, - maxRequiredBars, - valesBuffer - // - ); - - // - // SUPPORTS ... - CopyBuffer( - mHandler, - X121_XPV_SUPPORT_LINE, - 0, - maxRequiredBars, - supportsBuffer - // - ); - - // - // RESISTANCES ... - CopyBuffer( - mHandler, - X121_XPV_RESISTANCE_LINE, - 0, - maxRequiredBars, - resistancesBuffer - // - ); - - // - // GOLDEN PEAKS ... - CopyBuffer( - mHandler, - X121_XPV_PEAK_GOLDEN_ZONE_LINE, - 0, - maxRequiredBars, - peaksGoldenBuffer - // - ); - - // - // GOLDEN VALES ... - CopyBuffer( - mHandler, - X121_XPV_VALE_GOLDEN_ZONE_LINE, - 0, - maxRequiredBars, - valesGoldenBuffer - // - ); - - // - // CURRENT ... - - // - // HH ... CopyBuffer( mHandler, X121_XPV_C_HH_LINE, 0, maxRequiredBars, - cHHBuffer - // + cHHBuffer // ); // - // LL ... CopyBuffer( mHandler, X121_XPV_C_LL_LINE, 0, maxRequiredBars, - cLLBuffer - // + cLLBuffer // ); // - // SHORT ... - - // - // HH ... CopyBuffer( mHandler, X121_XPV_S_HH_LINE, 0, maxRequiredBars, - sHHBuffer - // + sHHBuffer // ); // - // LL ... CopyBuffer( mHandler, X121_XPV_S_LL_LINE, 0, maxRequiredBars, - sLLBuffer - // + sLLBuffer // ); // - // MEDIUM ... - - // - // HH ... CopyBuffer( mHandler, X121_XPV_M_HH_LINE, 0, maxRequiredBars, - mHHBuffer - // + mHHBuffer // ); // - // LL ... CopyBuffer( mHandler, X121_XPV_M_LL_LINE, 0, maxRequiredBars, - mLLBuffer - // + mLLBuffer // ); // - // LONG ... - - // - // HH ... CopyBuffer( mHandler, X121_XPV_L_HH_LINE, 0, maxRequiredBars, - lHHBuffer - // + lHHBuffer // ); // - // LL ... CopyBuffer( mHandler, X121_XPV_L_LL_LINE, 0, maxRequiredBars, - lLLBuffer - // + lLLBuffer // ); // - // HIND ... - - // - // HH ... CopyBuffer( mHandler, X121_XPV_H_HH_LINE, 0, maxRequiredBars, - hHHBuffer - // + hHHBuffer // ); // - // LL ... CopyBuffer( mHandler, X121_XPV_H_LL_LINE, 0, maxRequiredBars, - hLLBuffer - // + hLLBuffer // + ); + + // + CopyBuffer( + mHandler, + X121_XPV_TREND_LINE, + 0, + maxRequiredBars, + trendBuffer // + ); + + // + CopyBuffer( + mHandler, + X121_XPV_PEAK_LINE, + 0, + maxRequiredBars, + peaksBuffer // + ); + + // + CopyBuffer( + mHandler, + X121_XPV_VALE_LINE, + 0, + maxRequiredBars, + valesBuffer // + ); + + // + CopyBuffer( + mHandler, + X121_XPV_SUPPORT_LINE, + 0, + maxRequiredBars, + supportsBuffer // + ); + + // + CopyBuffer( + mHandler, + X121_XPV_SWING_LOW_LINE, + 0, + maxRequiredBars, + swingLowsBuffer // + ); + + // + CopyBuffer( + mHandler, + X121_XPV_SWING_HIGH_LINE, + 0, + maxRequiredBars, + swingHighsBuffer // + ); + + // + CopyBuffer( + mHandler, + X121_XPV_TREND_COLOR_LINE, + 0, + maxRequiredBars, + trendColorBuffer // + ); + + // + CopyBuffer( + mHandler, + X121_XPV_TREND_STATE_LINE, + 0, + maxRequiredBars, + trendStateBuffer // + ); + + // + CopyBuffer( + mHandler, + X121_XPV_PEAK_GOLDEN_ZONE_LINE, + 0, + maxRequiredBars, + peaksGoldenBuffer // + ); + + // + CopyBuffer( + mHandler, + X121_XPV_VALE_GOLDEN_ZONE_LINE, + 0, + maxRequiredBars, + valesGoldenBuffer // + ); + + // + CopyBuffer( + mHandler, + X121_XPV_RESISTANCE_LINE, + 0, + maxRequiredBars, + resistancesBuffer // ); // - // FRACTALS Upper ... CopyBuffer( mHandler, X121_XPV_FRACTALS_UPPER_LINE, 0, maxRequiredBars, - fractalsUpperBuffer - // + fractalsUpperBuffer // ); // - // FRACTALS Lower ... CopyBuffer( mHandler, X121_XPV_FRACTALS_LOWER_LINE, 0, maxRequiredBars, - fractalsLowerBuffer - // + fractalsLowerBuffer // ); } @@ -2765,42 +3120,6 @@ class XCX121XPVHelper : public XCBaseHelper int maxAllowed = 100 // ) { - // - CleanupArray( - peaksBuffer, - maxAllowed // - ); - - // - CleanupArray( - valesBuffer, - maxAllowed // - ); - - // - CleanupArray( - peaksGoldenBuffer, - maxAllowed // - ); - - // - CleanupArray( - valesGoldenBuffer, - maxAllowed // - ); - - // - CleanupArray( - supportsBuffer, - maxAllowed // - ); - - // - CleanupArray( - resistancesBuffer, - maxAllowed // - ); - // CleanupArray( sarBuffer, @@ -2867,6 +3186,72 @@ class XCX121XPVHelper : public XCBaseHelper maxAllowed // ); + // + CleanupArray( + trendBuffer, + maxAllowed // + ); + + // + CleanupArray( + peaksBuffer, + maxAllowed // + ); + + // + CleanupArray( + valesBuffer, + maxAllowed // + ); + + // + CleanupArray( + supportsBuffer, + maxAllowed // + ); + + // + CleanupArray( + swingLowsBuffer, + maxAllowed // + ); + + // + CleanupArray( + swingHighsBuffer, + maxAllowed // + ); + + // + CleanupArray( + trendColorBuffer, + maxAllowed // + ); + + // + CleanupArray( + trendStateBuffer, + maxAllowed // + ); + + // + CleanupArray( + peaksGoldenBuffer, + maxAllowed // + ); + + // + CleanupArray( + valesGoldenBuffer, + maxAllowed // + ); + + // + CleanupArray( + resistancesBuffer, + maxAllowed // + ); + // CleanupArray( fractalsUpperBuffer, @@ -2878,8 +3263,6 @@ class XCX121XPVHelper : public XCBaseHelper fractalsLowerBuffer, maxAllowed // ); - - // } // diff --git a/Indicators/x-saherelm.x121.xpv.mq5 b/Indicators/x-saherelm.x121.xpv.mq5 index 16b4fd4b..90dd823a 100644 --- a/Indicators/x-saherelm.x121.xpv.mq5 +++ b/Indicators/x-saherelm.x121.xpv.mq5 @@ -69,7 +69,7 @@ input double sarMax = 0.2; // Maximum // input group "Swing Detection"; -input int swingLength = 5; +input int swingLength = 5; // Length // // Presentation ... @@ -81,8 +81,8 @@ input int sarArrowCode = 159; // Parabolic Sar Arrow Code input int peaksArrowCode = 159; // Peaks Arrow Code input int valesArrowCode = 159; // Vales Arrow Code input int trendArrowCode = 117; // Trend Arrow Code -input int swingLowsArrowCode = 159; // Swing Lows Arrow Code -input int swingHighsArrowCode = 159; // Swing Highs Arrow Code +input int swingLowsArrowCode = 225; // Swing Lows Arrow Code +input int swingHighsArrowCode = 226; // Swing Highs Arrow Code input int supportsArrowCode = 159; // Supports Arrow Code input int resistancesArrowCode = 159; // Resistances Arrow Code @@ -351,6 +351,14 @@ ENUM_TIMEFRAMES mLCPeriod = NULL; int mHCLength = 0; ENUM_TIMEFRAMES mHCPeriod = NULL; +// +// Swings ... +double lSwingLow = emptyValue; +double lSwingHigh = emptyValue; +double lTrend = emptyValue; +double lTrendState = emptyValue; +double lTrendColor = hideColorIDX; + // // Event Handlers ... @@ -943,10 +951,17 @@ void CalculateBuffers( tickVolume // ); + // + int swingBarIndex = bar_index; + if (bar_index < swingLength) + { + swingBarIndex = bar_index + swingLength; + } + // // Calcultae Swing High and Low and Trends ... CalculateSwingsAndTrend( - bar_index, + swingBarIndex, prevCalculated, ratesTotal, open, @@ -955,6 +970,21 @@ void CalculateBuffers( low, tickVolume // ); + + // + if (bar_index < swingLength) + { + // + // for (int i = bar_index; i < bar_index + swingLength; i++) + // { + // // + // trendBuffer[i] = lTrend; + // swingLowsBuffer[i] = lSwingLow; + // swingHighsBuffer[i] = lSwingHigh; + // trendStateBuffer[i] = lTrendState; + // trendColorBuffer[i] = lTrendColor; + // } + } } else { @@ -1447,6 +1477,10 @@ void CalculateSwingsAndTrend( ? lastSwingLow : iLow; swingLowsBuffer[bar_index] = iSwingLow; + if (isSwingLow) + { + lSwingLow = iSwingLow; + } // // Swing High ... @@ -1459,6 +1493,10 @@ void CalculateSwingsAndTrend( ? lastSwingHigh : iHigh; swingHighsBuffer[bar_index] = iSwingHigh; + if (isSwingHigh) + { + lSwingHigh = iSwingHigh; + } // // Calculate Trend ... @@ -1476,6 +1514,14 @@ void CalculateSwingsAndTrend( ? iSwingHigh : lastTrend; trendBuffer[bar_index] = iTrend; + bool isBullTrnd = + isSwingLow && + iSwingLow > lastSwingLow; + bool isBearTrnd = + isSwingHigh && + iSwingHigh < lastSwingHigh; + bool isTrnd = isBullTrnd || + isBearTrnd; // double lastTrendState = isFirstBar @@ -1530,6 +1576,15 @@ void CalculateSwingsAndTrend( ? bearishColorIDX : hideColorIDX; trendColorBuffer[bar_index] = iTrendColor; + + // + if (isTrnd) + { + // + lTrend = iTrend; + lTrendColor = iTrendColor; + lTrendState = iTrendState; + } } // @@ -1547,7 +1602,7 @@ bool IsSwingLow( bool result = false; // - result = index - length > 0; + result = index - length >= 0; if (!result) { return result; @@ -1581,7 +1636,7 @@ bool IsSwingHigh( bool result = false; // - result = index - length > 0; + result = index - length >= 0; if (!result) { return result; diff --git a/Libraries/x-saherelm.x-poi.extensions.lib.mq5 b/Libraries/x-saherelm.x-poi.extensions.lib.mq5 index 56beaec1..1af61492 100644 --- a/Libraries/x-saherelm.x-poi.extensions.lib.mq5 +++ b/Libraries/x-saherelm.x-poi.extensions.lib.mq5 @@ -1340,12 +1340,12 @@ bool IsBoxValid( } // - int fromIndex = iBarShift( + int toIndex = iBarShift( box.symbol, forPeriod, - box.from // + box.to // ); - result = IsValidIndex(fromIndex); + result = IsValidIndex(toIndex); if (!result) { return result; @@ -1354,7 +1354,7 @@ bool IsBoxValid( // XOHCL iBar; bool isBullish = box.IsBullish(); - for (int i = barIndex; i < fromIndex; i++) + for (int i = barIndex; i < toIndex; i++) { // result = iBar.Init( @@ -1370,8 +1370,94 @@ bool IsBoxValid( // result = isBullish - ? iBar.GetDown() > box.lower - : iBar.GetUp() < box.upper; + ? iBar.low > box.upper + : iBar.high < box.lower; + if (!result) + { + break; + } + + // + iBar.Clean(); + } + + // + iBar.Clean(); + + // + return result; +} + +/** + * Check Box Breaked ... + * + * @param box: XBoxZone instance ... + * @param barIndex: int, Current Bar Index ... + * @param forPeriod: Testing Period ... + * + * @return ( bool ) + */ +bool IsBoxBreaked( + XBoxZone &box, + int barIndex = 0, + ENUM_TIMEFRAMES forPeriod = NULL // +) +{ + // + bool result = false; + + // + result = box.IsValid(); + if (!result) + { + return result; + } + + // + if (barIndex < 0) + { + barIndex = 0; + } + + // + if (!IsValid(forPeriod)) + { + forPeriod = box.period; + } + + // + int toIndex = iBarShift( + box.symbol, + forPeriod, + box.to // + ); + result = IsValidIndex(toIndex); + if (!result) + { + return result; + } + + // + XOHCL iBar; + bool isBullish = box.IsBullish(); + for (int i = barIndex; i < toIndex; i++) + { + // + result = iBar.Init( + box.symbol, + forPeriod, + i // + ); + if (!result) + { + break; + } + + // + result = + isBullish + ? iBar.high < box.lower + : iBar.low > box.upper; if (!result) { break; diff --git a/X121SMCEA/Signals/x-121.smc.xind.signal.class.mq5 b/X121SMCEA/Signals/x-121.smc.xind.signal.class.mq5 index 87c2bc4b..64ee657c 100644 --- a/X121SMCEA/Signals/x-121.smc.xind.signal.class.mq5 +++ b/X121SMCEA/Signals/x-121.smc.xind.signal.class.mq5 @@ -36,6 +36,10 @@ class XCX121SMCXINDSignalDetector : public XCBase // Props ... bool useGuards; double rfRewar; + XBoxZone mWaitingBoxes[]; + XBoxZone mInsideBoxes[]; + XBoxZone mBreakedBoxes[]; + XBoxZone mUnAvailableBoxes[]; X121SMCStrategyXINDSignalConditions mConditions; X121SMCStrategyXINDSignalConditions mConditionsCollection[]; @@ -206,21 +210,39 @@ class XCX121SMCXINDSignalDetector : public XCBase // // - hasSignalBox = HasXPVConditions( + int waitingBoxesCount = UpdateWaitingBoxes( X_CYCLE_DECISION, - signalBox, - signalBoxDir, - provider, - zIndex // + provider // ); - if (hasSignalBox) + bool hasWaitingBoxes = IsValidSize(waitingBoxesCount); + + // + DrawBoxes(drawer); + + // + if (hasWaitingBoxes) { - signalProvider = X121SMC_XIND_PROVIDER_XSTR; + // + hasSignalBox = HasXPVConditions( + X_CYCLE_DECISION, + signalBox, + signalBoxDir, + provider, + zIndex // + ); + if (hasSignalBox) + { + signalProvider = X121SMC_XIND_PROVIDER_XSTR; + } } // - // Update Models To Time ... - UpdateTo(cTime); + // + // + + // // + // // Update Models To Time ... + // UpdateTo(cTime); // // Cleanup Signal if UnApproved ... @@ -393,6 +415,7 @@ class XCX121SMCXINDSignalDetector : public XCBase pBar.Clean(); pPBar.Clean(); signalBox.Clean(); + ZeroMemory(drawer); consolidationZBar.Clean(); // @@ -1046,6 +1069,399 @@ class XCX121SMCXINDSignalDetector : public XCBase return result; } + // + // Waiting Boxes ... + int UpdateWaitingBoxes( + ENUM_X_CYCLES cycle, + X121SMCStrategySignalProviderData &provider // + ) + { + // + int result = ArraySize(mWaitingBoxes) + ArraySize(mInsideBoxes); + + // + int count = 0; + bool has = false; + + // + // Fil Selected Data ... + XPOIState cState; + X121Conditions cXConditions; + XPOIStateEvents cStateEvents; + XC121SMCCycleHelper *cHelper; + X121SMCCycleConditions cConditions; + has = provider.SelectCycle( + cycle, + cState, + cStateEvents, + cXConditions, + cHelper, + cConditions // + ); + if (!has) + { + // + cState.Clean(); + ZeroMemory(cHelper); + cConditions.Clean(); + cXConditions.Clean(); + cStateEvents.Clean(); + + // + return result; + } + + // + // Detecting New Boxes ... + + // + // Checking Bullish Fair Value Gaps ... + has = cState.HasBullishFairValueGaps(); + if (has) + { + // + XBoxZone tmpBoxes[]; + ToBox( + cState.bullishFairValueGaps, + tmpBoxes // + ); + + // + count = ArraySize(tmpBoxes); + has = IsValidSize(count); + if (has) + { + // + for (int i = 0; i < count; i++) + { + // + XBoxZone iBox = tmpBoxes[i]; + bool isValid = IsBoxValid( + iBox, + 0, + iBox.period // + ); + if (isValid) + { + // + has = IsBoxExists(iBox); + if (!has) + { + // + AddRef( + iBox, + mWaitingBoxes // + ); + } + } + + // + iBox.Clean(); + } + } + + // + Clean(tmpBoxes); + } + + // + // Checking Bearish Fair Value Gaps ... + has = cState.HasBearishFairValueGaps(); + if (has) + { + // + XBoxZone tmpBoxes[]; + ToBox( + cState.bearishFairValueGaps, + tmpBoxes // + ); + + // + count = ArraySize(tmpBoxes); + has = IsValidSize(count); + if (has) + { + // + for (int i = 0; i < count; i++) + { + // + XBoxZone iBox = tmpBoxes[i]; + bool isValid = IsBoxValid( + iBox, + 0, + iBox.period // + ); + if (isValid) + { + // + has = IsBoxExists(iBox); + if (!has) + { + // + AddRef( + iBox, + mWaitingBoxes // + ); + } + } + + // + iBox.Clean(); + } + } + + // + Clean(tmpBoxes); + } + + // + // Update Times ... + + // + count = ArraySize(mWaitingBoxes); + has = IsValidSize(count); + if (has) + { + // + for (int i = 0; i < count; i++) + { + mWaitingBoxes[i].to = TimeCurrent(); + } + } + + // + count = ArraySize(mInsideBoxes); + has = IsValidSize(count); + if (has) + { + // + for (int i = 0; i < count; i++) + { + mInsideBoxes[i].to = TimeCurrent(); + } + } + + // + // Validate Exists Boxes ... + + // + // Waiting Boxes ... + // count = ArraySize(mWaitingBoxes); + // has = IsValidSize(count); + // if (has) + // { + // // + // int mustRemove[]; + // for (int i = 0; i < count; i++) + // { + // // + // mWaitingBoxes[i].to = TimeCurrent(); + // XBoxZone iBox = mWaitingBoxes[i]; + + // // + // bool isValid = IsBoxValid( + // iBox, + // 0, + // iBox.period // + // ); + // bool isBreaked = IsBoxBreaked( + // iBox, + // 0, + // iBox.period // + // ); + + // // + // bool isInside = !isValid && !isBreaked; + // if (isInside) + // { + // // + // Add( + // i, + // mustRemove // + // ); + + // // + // AddRef( + // iBox, + // mInsideBoxes // + // ); + // } + + // // + // if (!isInside && isBreaked) + // { + // // + // Add( + // i, + // mustRemove // + // ); + + // // + // AddRef( + // iBox, + // mBreakedBoxes // + // ); + // } + // } + + // // + // CleanupArray( + // mustRemove, + // mWaitingBoxes // + // ); + // } + + // + // Inside Boxes ... + // count = ArraySize(mInsideBoxes); + // has = IsValidSize(count); + // if (has) + // { + // // + // int mustRemove[]; + // for (int i = 0; i < count; i++) + // { + // // + // mInsideBoxes[i].to = TimeCurrent(); + // XBoxZone iBox = mInsideBoxes[i]; + + // // + // bool isBreaked = IsBoxBreaked( + // iBox, + // 0, + // iBox.period // + // ); + // if (isBreaked) + // { + // // + // Add( + // i, + // mustRemove // + // ); + + // // + // AddRef( + // iBox, + // mBreakedBoxes // + // ); + // } + // } + + // // + // CleanupArray( + // mustRemove, + // mInsideBoxes // + // ); + // } + + // + // Cleanup Resources ... + + // + cState.Clean(); + ZeroMemory(cHelper); + cConditions.Clean(); + cXConditions.Clean(); + cStateEvents.Clean(); + + // + result = ArraySize(mWaitingBoxes) + ArraySize(mInsideBoxes); + + // + return result; + } + + // + bool IsBoxExists(XBoxZone &box) + { + // + bool result = false; + + // + int idx = -1; + int count = 0; + bool has = false; + + // + // Witing Boxes ... + count = ArraySize(mWaitingBoxes); + has = IsValidSize(count); + if (has) + { + // + has = FindBoxIndex( + idx, + box, + mWaitingBoxes // + ); + result = has; + if (result) + { + return result; + } + } + + // + // Inside Boxes ... + count = ArraySize(mInsideBoxes); + has = IsValidSize(count); + if (has) + { + // + has = FindBoxIndex( + idx, + box, + mInsideBoxes // + ); + result = has; + if (result) + { + return result; + } + } + + // + // Breaked Boxes ... + count = ArraySize(mBreakedBoxes); + has = IsValidSize(count); + if (has) + { + // + has = FindBoxIndex( + idx, + box, + mBreakedBoxes // + ); + result = has; + if (result) + { + return result; + } + } + + // + // UnAvailable Boxes ... + count = ArraySize(mUnAvailableBoxes); + has = IsValidSize(count); + if (has) + { + // + has = FindBoxIndex( + idx, + box, + mUnAvailableBoxes // + ); + result = has; + if (result) + { + return result; + } + } + + // + return result; + } + // // Add Conditions to Conditions Collection ... int AddConditionsIfNotExists( @@ -1188,6 +1604,78 @@ class XCX121SMCXINDSignalDetector : public XCBase } } + // + void DrawBoxes( + XCPOIDrawer *drawer, + bool forceClean = false // + ) + { + // + if (forceClean) + { + mObjects.Clear(); + } + + // + int count = 0; + bool has = false; + + // + // Waiting Boxes ... + count = ArraySize(mWaitingBoxes); + has = IsValidSize(count); + if (has) + { + // + for (int i = 0; i < count; i++) + { + // + XCBoxObject *iObj; + has = drawer.DrawBox( + mWaitingBoxes[i], + iObj // + ); + if (has) + { + mObjects.Add(iObj); + } + } + } + + // + // Inside Boxes ... + count = ArraySize(mInsideBoxes); + has = IsValidSize(count); + if (has) + { + // + for (int i = 0; i < count; i++) + { + // + XCBoxObject *iObj; + has = drawer.DrawBox( + mInsideBoxes[i], + iObj // + ); + if (has) + { + // + if (mInsideBoxes[i].IsBullish()) + { + iObj.BoxColor(clrYellow); + } + else + { + iObj.BoxColor(clrOrange); + } + + // + mObjects.Add(iObj); + } + } + } + } + // protected: // @@ -1225,18 +1713,18 @@ class XCX121SMCXINDSignalDetector : public XCBase mBarObjects.Clear(); } - /** - * Update To Time of Exists Components ... - * - * @param value: updated time ... - */ - void UpdateTo( - datetime value = NULL // - ) - { - // - value = NormalizeTime(value); - } + // /** + // * Update To Time of Exists Components ... + // * + // * @param value: updated time ... + // */ + // void UpdateTo( + // datetime value = NULL // + // ) + // { + // // + // value = NormalizeTime(value); + // } // }; diff --git a/X121SMCEA/Signals/x-121.smc.xind.signal.lib.mq5 b/X121SMCEA/Signals/x-121.smc.xind.signal.lib.mq5 index 059e9304..abd945b9 100644 --- a/X121SMCEA/Signals/x-121.smc.xind.signal.lib.mq5 +++ b/X121SMCEA/Signals/x-121.smc.xind.signal.lib.mq5 @@ -448,10 +448,6 @@ bool HasXPVConditions( // // - // - // Check new Order Block ... - - // // Summarize Conditions ... @@ -459,7 +455,7 @@ bool HasXPVConditions( isBullish = // false - // + // ; //