diff --git a/XCAEA/Classes/xcaea.x-poi.detector.class.mq5 b/XCAEA/Classes/xcaea.x-poi.detector.class.mq5 index 1c60c961..cef2c533 100644 --- a/XCAEA/Classes/xcaea.x-poi.detector.class.mq5 +++ b/XCAEA/Classes/xcaea.x-poi.detector.class.mq5 @@ -517,7 +517,6 @@ class XCXCAEAPOIDetector : public XCBase XCAPivot swlPivot; XCAPivot peakPivot; XCAPivot valePivot; - XCAPivot kiSamePivot; XCAPivot sSameHHPivot; XCAPivot mSameHHPivot; XCAPivot lSameHHPivot; @@ -543,7 +542,6 @@ class XCXCAEAPOIDetector : public XCBase XCAPivot swlPivots[]; XCAPivot peakPivots[]; XCAPivot valePivots[]; - XCAPivot kiSamePivots[]; XCAPivot sSameHHPivots[]; XCAPivot mSameHHPivots[]; XCAPivot lSameHHPivots[]; @@ -587,7 +585,6 @@ class XCXCAEAPOIDetector : public XCBase swlPivot.Clean(); peakPivot.Clean(); valePivot.Clean(); - kiSamePivot.Clean(); sSameHHPivot.Clean(); mSameHHPivot.Clean(); lSameHHPivot.Clean(); @@ -612,7 +609,6 @@ class XCXCAEAPOIDetector : public XCBase Clean(swlPivots); Clean(peakPivots); Clean(valePivots); - Clean(kiSamePivots); Clean(sSameHHPivots); Clean(mSameHHPivots); Clean(lSameHHPivots); @@ -3063,6 +3059,1442 @@ class XCXCAEAPOIDetector : public XCBase // } + // + void Validate( + int barIndex = 0 // + ) + { + // + // Do All Pivots Validation ... + + // + if (barIndex < 0) + { + barIndex = 0; + } + + // + XCAPivot tmp[]; + bool has = false; + + // + int zIDX = 0; + int cIDX = zIDX + 1; + int pIDX = cIDX + 1; + int p2IDX = pIDX + 1; + + // + // Implement Validation Senarios ... + + // + has = HasSWLPivots(); + if (has) + { + // + Copy( + swlPivots, + tmp // + ); + Clean(swlPivots); + while (HasChild(tmp)) + { + // + XCAPivot iPivot = tmp[0]; + ArrayRemove( + tmp, + 0, + 1 // + ); + + // + has = IsPivotBreaked( + iPivot, + barIndex // + ); + if (!has) + { + // + AddRef( + iPivot, + swlPivots // + ); + } + } + Clean(tmp); + } + + // + has = HasValePivots(); + if (has) + { + // + Copy( + valePivots, + tmp // + ); + Clean(valePivots); + while (HasChild(tmp)) + { + // + XCAPivot iPivot = tmp[0]; + ArrayRemove( + tmp, + 0, + 1 // + ); + + // + has = IsPivotBreaked( + iPivot, + barIndex // + ); + if (!has) + { + // + AddRef( + iPivot, + valePivots // + ); + } + } + Clean(tmp); + } + + // + has = HasSSameLLPivots(); + if (has) + { + // + Copy( + sSameLLPivots, + tmp // + ); + Clean(sSameLLPivots); + while (HasChild(tmp)) + { + // + XCAPivot iPivot = tmp[0]; + ArrayRemove( + tmp, + 0, + 1 // + ); + + // + has = IsPivotBreaked( + iPivot, + barIndex // + ); + if (!has) + { + // + AddRef( + iPivot, + sSameLLPivots // + ); + } + } + Clean(tmp); + } + + // + has = HasMSameLLPivots(); + if (has) + { + // + Copy( + mSameLLPivots, + tmp // + ); + Clean(mSameLLPivots); + while (HasChild(tmp)) + { + // + XCAPivot iPivot = tmp[0]; + ArrayRemove( + tmp, + 0, + 1 // + ); + + // + has = IsPivotBreaked( + iPivot, + barIndex // + ); + if (!has) + { + // + AddRef( + iPivot, + mSameLLPivots // + ); + } + } + Clean(tmp); + } + + // + has = HasLSameLLPivots(); + if (has) + { + // + Copy( + lSameLLPivots, + tmp // + ); + Clean(lSameLLPivots); + while (HasChild(tmp)) + { + // + XCAPivot iPivot = tmp[0]; + ArrayRemove( + tmp, + 0, + 1 // + ); + + // + has = IsPivotBreaked( + iPivot, + barIndex // + ); + if (!has) + { + // + AddRef( + iPivot, + lSameLLPivots // + ); + } + } + Clean(tmp); + } + + // + has = HasHSameLLPivots(); + if (has) + { + // + Copy( + hSameLLPivots, + tmp // + ); + Clean(hSameLLPivots); + while (HasChild(tmp)) + { + // + XCAPivot iPivot = tmp[0]; + ArrayRemove( + tmp, + 0, + 1 // + ); + + // + has = IsPivotBreaked( + iPivot, + barIndex // + ); + if (!has) + { + // + AddRef( + iPivot, + hSameLLPivots // + ); + } + } + Clean(tmp); + } + + // + has = HasKIBullishPivots(); + if (has) + { + // + Copy( + kiBullishPivots, + tmp // + ); + Clean(kiBullishPivots); + while (HasChild(tmp)) + { + // + XCAPivot iPivot = tmp[0]; + ArrayRemove( + tmp, + 0, + 1 // + ); + + // + has = IsPivotBreaked( + iPivot, + barIndex // + ); + if (!has) + { + // + AddRef( + iPivot, + kiBullishPivots // + ); + } + } + Clean(tmp); + } + + // + has = HasValeSWLSupPivots(); + if (has) + { + // + Copy( + valeSWLSupPivots, + tmp // + ); + Clean(valeSWLSupPivots); + while (HasChild(tmp)) + { + // + XCAPivot iPivot = tmp[0]; + ArrayRemove( + tmp, + 0, + 1 // + ); + + // + has = IsPivotBreaked( + iPivot, + barIndex // + ); + if (!has) + { + // + AddRef( + iPivot, + valeSWLSupPivots // + ); + } + } + Clean(tmp); + } + + // + has = HasTKIBullishPivots(); + if (has) + { + // + Copy( + tkiBullishPivots, + tmp // + ); + Clean(tkiBullishPivots); + while (HasChild(tmp)) + { + // + XCAPivot iPivot = tmp[0]; + ArrayRemove( + tmp, + 0, + 1 // + ); + + // + has = IsPivotBreaked( + iPivot, + barIndex // + ); + if (!has) + { + // + AddRef( + iPivot, + tkiBullishPivots // + ); + } + } + Clean(tmp); + } + + // + has = HasTrendBullishPivots(); + if (has) + { + // + Copy( + trendBullishPivots, + tmp // + ); + Clean(trendBullishPivots); + while (HasChild(tmp)) + { + // + XCAPivot iPivot = tmp[0]; + ArrayRemove( + tmp, + 0, + 1 // + ); + + // + has = IsPivotBreaked( + iPivot, + barIndex // + ); + if (!has) + { + // + AddRef( + iPivot, + trendBullishPivots // + ); + } + } + Clean(tmp); + } + + // + has = HasTKITRNDBullishPivots(); + if (has) + { + // + Copy( + tkitrndBullishPivots, + tmp // + ); + Clean(tkitrndBullishPivots); + while (HasChild(tmp)) + { + // + XCAPivot iPivot = tmp[0]; + ArrayRemove( + tmp, + 0, + 1 // + ); + + // + has = IsPivotBreaked( + iPivot, + barIndex // + ); + if (!has) + { + // + AddRef( + iPivot, + tkitrndBullishPivots // + ); + } + } + Clean(tmp); + } + + // + has = HasSWHPivots(); + if (has) + { + // + Copy( + swhPivots, + tmp // + ); + Clean(swhPivots); + while (HasChild(tmp)) + { + // + XCAPivot iPivot = tmp[0]; + ArrayRemove( + tmp, + 0, + 1 // + ); + + // + has = IsPivotBreaked( + iPivot, + barIndex // + ); + if (!has) + { + // + AddRef( + iPivot, + swhPivots // + ); + } + } + Clean(tmp); + } + + // + has = HasPeakPivots(); + if (has) + { + // + Copy( + peakPivots, + tmp // + ); + Clean(peakPivots); + while (HasChild(tmp)) + { + // + XCAPivot iPivot = tmp[0]; + ArrayRemove( + tmp, + 0, + 1 // + ); + + // + has = IsPivotBreaked( + iPivot, + barIndex // + ); + if (!has) + { + // + AddRef( + iPivot, + peakPivots // + ); + } + } + Clean(tmp); + } + + // + has = HasSSameHHPivots(); + if (has) + { + // + Copy( + sSameHHPivots, + tmp // + ); + Clean(sSameHHPivots); + while (HasChild(tmp)) + { + // + XCAPivot iPivot = tmp[0]; + ArrayRemove( + tmp, + 0, + 1 // + ); + + // + has = IsPivotBreaked( + iPivot, + barIndex // + ); + if (!has) + { + // + AddRef( + iPivot, + sSameHHPivots // + ); + } + } + Clean(tmp); + } + + // + has = HasMSameHHPivots(); + if (has) + { + // + Copy( + mSameHHPivots, + tmp // + ); + Clean(mSameHHPivots); + while (HasChild(tmp)) + { + // + XCAPivot iPivot = tmp[0]; + ArrayRemove( + tmp, + 0, + 1 // + ); + + // + has = IsPivotBreaked( + iPivot, + barIndex // + ); + if (!has) + { + // + AddRef( + iPivot, + mSameHHPivots // + ); + } + } + Clean(tmp); + } + + // + has = HasLSameHHPivots(); + if (has) + { + // + Copy( + lSameHHPivots, + tmp // + ); + Clean(lSameHHPivots); + while (HasChild(tmp)) + { + // + XCAPivot iPivot = tmp[0]; + ArrayRemove( + tmp, + 0, + 1 // + ); + + // + has = IsPivotBreaked( + iPivot, + barIndex // + ); + if (!has) + { + // + AddRef( + iPivot, + lSameHHPivots // + ); + } + } + Clean(tmp); + } + + // + has = HasHSameHHPivots(); + if (has) + { + // + Copy( + hSameHHPivots, + tmp // + ); + Clean(hSameHHPivots); + while (HasChild(tmp)) + { + // + XCAPivot iPivot = tmp[0]; + ArrayRemove( + tmp, + 0, + 1 // + ); + + // + has = IsPivotBreaked( + iPivot, + barIndex // + ); + if (!has) + { + // + AddRef( + iPivot, + hSameHHPivots // + ); + } + } + Clean(tmp); + } + + // + has = HasKIBearishPivots(); + if (has) + { + // + Copy( + kiBearishPivots, + tmp // + ); + Clean(kiBearishPivots); + while (HasChild(tmp)) + { + // + XCAPivot iPivot = tmp[0]; + ArrayRemove( + tmp, + 0, + 1 // + ); + + // + has = IsPivotBreaked( + iPivot, + barIndex // + ); + if (!has) + { + // + AddRef( + iPivot, + kiBearishPivots // + ); + } + } + Clean(tmp); + } + + // + has = HasPeakSWHResPivots(); + if (has) + { + // + Copy( + peakSWHResPivots, + tmp // + ); + Clean(peakSWHResPivots); + while (HasChild(tmp)) + { + // + XCAPivot iPivot = tmp[0]; + ArrayRemove( + tmp, + 0, + 1 // + ); + + // + has = IsPivotBreaked( + iPivot, + barIndex // + ); + if (!has) + { + // + AddRef( + iPivot, + peakSWHResPivots // + ); + } + } + Clean(tmp); + } + + // + has = HasTKIBearishPivots(); + if (has) + { + // + Copy( + tkiBearishPivots, + tmp // + ); + Clean(tkiBearishPivots); + while (HasChild(tmp)) + { + // + XCAPivot iPivot = tmp[0]; + ArrayRemove( + tmp, + 0, + 1 // + ); + + // + has = IsPivotBreaked( + iPivot, + barIndex // + ); + if (!has) + { + // + AddRef( + iPivot, + tkiBearishPivots // + ); + } + } + Clean(tmp); + } + + // + has = HasTrendBearishPivots(); + if (has) + { + // + Copy( + trendBearishPivots, + tmp // + ); + Clean(trendBearishPivots); + while (HasChild(tmp)) + { + // + XCAPivot iPivot = tmp[0]; + ArrayRemove( + tmp, + 0, + 1 // + ); + + // + has = IsPivotBreaked( + iPivot, + barIndex // + ); + if (!has) + { + // + AddRef( + iPivot, + trendBearishPivots // + ); + } + } + Clean(tmp); + } + + // + has = HasTKITRNDBearishPivots(); + if (has) + { + // + Copy( + tkitrndBearishPivots, + tmp // + ); + Clean(tkitrndBearishPivots); + while (HasChild(tmp)) + { + // + XCAPivot iPivot = tmp[0]; + ArrayRemove( + tmp, + 0, + 1 // + ); + + // + has = IsPivotBreaked( + iPivot, + barIndex // + ); + if (!has) + { + // + AddRef( + iPivot, + tkitrndBearishPivots // + ); + } + } + Clean(tmp); + } + } + + // + int FillBullishBoxes( + XBoxZone &boxes[] // + ) + { + // + int result = 0; + + // + int count = 0; + bool has = false; + + // + Clean(boxes); + + // + has = HasSWLPivots(); + if (has) + { + // + count = CountSWLPivots(); + for (int i = 0; i < count; i++) + { + // + XBoxZone iBox; + has = swlPivots[i].AsBox(iBox); + if (has) + { + // + AddRef( + iBox, + boxes // + ); + } + + // + iBox.Clean(); + } + } + + // + has = HasValePivots(); + if (has) + { + // + count = CountValePivots(); + for (int i = 0; i < count; i++) + { + // + XBoxZone iBox; + has = valePivots[i].AsBox(iBox); + if (has) + { + // + AddRef( + iBox, + boxes // + ); + } + + // + iBox.Clean(); + } + } + + // + has = HasSSameLLPivots(); + if (has) + { + // + count = CountSSameLLPivots(); + for (int i = 0; i < count; i++) + { + // + XBoxZone iBox; + has = sSameLLPivots[i].AsBox(iBox); + if (has) + { + // + AddRef( + iBox, + boxes // + ); + } + + // + iBox.Clean(); + } + } + + // + has = HasMSameLLPivots(); + if (has) + { + // + count = CountMSameLLPivots(); + for (int i = 0; i < count; i++) + { + // + XBoxZone iBox; + has = mSameLLPivots[i].AsBox(iBox); + if (has) + { + // + AddRef( + iBox, + boxes // + ); + } + + // + iBox.Clean(); + } + } + + // + has = HasLSameLLPivots(); + if (has) + { + // + count = CountLSameLLPivots(); + for (int i = 0; i < count; i++) + { + // + XBoxZone iBox; + has = lSameLLPivots[i].AsBox(iBox); + if (has) + { + // + AddRef( + iBox, + boxes // + ); + } + + // + iBox.Clean(); + } + } + + // + has = HasHSameLLPivots(); + if (has) + { + // + count = CountHSameLLPivots(); + for (int i = 0; i < count; i++) + { + // + XBoxZone iBox; + has = hSameLLPivots[i].AsBox(iBox); + if (has) + { + // + AddRef( + iBox, + boxes // + ); + } + + // + iBox.Clean(); + } + } + + // + has = HasKIBullishPivots(); + if (has) + { + // + count = CountKIBullishPivots(); + for (int i = 0; i < count; i++) + { + // + XBoxZone iBox; + has = kiBullishPivots[i].AsBox(iBox); + if (has) + { + // + AddRef( + iBox, + boxes // + ); + } + + // + iBox.Clean(); + } + } + + // + has = HasValeSWLSupPivots(); + if (has) + { + // + count = CountValeSWLSupPivots(); + for (int i = 0; i < count; i++) + { + // + XBoxZone iBox; + has = valeSWLSupPivots[i].AsBox(iBox); + if (has) + { + // + AddRef( + iBox, + boxes // + ); + } + + // + iBox.Clean(); + } + } + + // + has = HasTKIBullishPivots(); + if (has) + { + // + count = CountTKIBullishPivots(); + for (int i = 0; i < count; i++) + { + // + XBoxZone iBox; + has = tkiBullishPivots[i].AsBox(iBox); + if (has) + { + // + AddRef( + iBox, + boxes // + ); + } + + // + iBox.Clean(); + } + } + + // + has = HasTrendBullishPivots(); + if (has) + { + // + count = CountTrendBullishPivots(); + for (int i = 0; i < count; i++) + { + // + XBoxZone iBox; + has = trendBullishPivots[i].AsBox(iBox); + if (has) + { + // + AddRef( + iBox, + boxes // + ); + } + + // + iBox.Clean(); + } + } + + // + has = HasTKITRNDBullishPivots(); + if (has) + { + // + count = CountTKITRNDBullishPivots(); + for (int i = 0; i < count; i++) + { + // + XBoxZone iBox; + has = tkitrndBullishPivots[i].AsBox(iBox); + if (has) + { + // + AddRef( + iBox, + boxes // + ); + } + + // + iBox.Clean(); + } + } + + // + result = ArraySize(boxes); + + // + return result; + } + + // + int FillBearishBoxes( + XBoxZone &boxes[] // + ) + { + // + int result = 0; + + // + int count = 0; + bool has = false; + + // + Clean(boxes); + + // + has = HasSWHPivots(); + if (has) + { + // + count = CountSWHPivots(); + for (int i = 0; i < count; i++) + { + // + XBoxZone iBox; + has = swhPivots[i].AsBox(iBox); + if (has) + { + // + AddRef( + iBox, + boxes // + ); + } + + // + iBox.Clean(); + } + } + + // + has = HasPeakPivots(); + if (has) + { + // + count = CountPeakPivots(); + for (int i = 0; i < count; i++) + { + // + XBoxZone iBox; + has = peakPivots[i].AsBox(iBox); + if (has) + { + // + AddRef( + iBox, + boxes // + ); + } + + // + iBox.Clean(); + } + } + + // + has = HasSSameHHPivots(); + if (has) + { + // + count = CountSSameHHPivots(); + for (int i = 0; i < count; i++) + { + // + XBoxZone iBox; + has = sSameHHPivots[i].AsBox(iBox); + if (has) + { + // + AddRef( + iBox, + boxes // + ); + } + + // + iBox.Clean(); + } + } + + // + has = HasMSameHHPivots(); + if (has) + { + // + count = CountMSameHHPivots(); + for (int i = 0; i < count; i++) + { + // + XBoxZone iBox; + has = mSameHHPivots[i].AsBox(iBox); + if (has) + { + // + AddRef( + iBox, + boxes // + ); + } + + // + iBox.Clean(); + } + } + + // + has = HasLSameHHPivots(); + if (has) + { + // + count = CountLSameHHPivots(); + for (int i = 0; i < count; i++) + { + // + XBoxZone iBox; + has = lSameHHPivots[i].AsBox(iBox); + if (has) + { + // + AddRef( + iBox, + boxes // + ); + } + + // + iBox.Clean(); + } + } + + // + has = HasHSameHHPivots(); + if (has) + { + // + count = CountHSameHHPivots(); + for (int i = 0; i < count; i++) + { + // + XBoxZone iBox; + has = hSameHHPivots[i].AsBox(iBox); + if (has) + { + // + AddRef( + iBox, + boxes // + ); + } + + // + iBox.Clean(); + } + } + + // + has = HasKIBearishPivots(); + if (has) + { + // + count = CountKIBearishPivots(); + for (int i = 0; i < count; i++) + { + // + XBoxZone iBox; + has = kiBearishPivots[i].AsBox(iBox); + if (has) + { + // + AddRef( + iBox, + boxes // + ); + } + + // + iBox.Clean(); + } + } + + // + has = HasPeakSWHResPivots(); + if (has) + { + // + count = CountPeakSWHResPivots(); + for (int i = 0; i < count; i++) + { + // + XBoxZone iBox; + has = peakSWHResPivots[i].AsBox(iBox); + if (has) + { + // + AddRef( + iBox, + boxes // + ); + } + + // + iBox.Clean(); + } + } + + // + has = HasTKIBearishPivots(); + if (has) + { + // + count = CountTKIBearishPivots(); + for (int i = 0; i < count; i++) + { + // + XBoxZone iBox; + has = tkiBearishPivots[i].AsBox(iBox); + if (has) + { + // + AddRef( + iBox, + boxes // + ); + } + + // + iBox.Clean(); + } + } + + // + has = HasTrendBearishPivots(); + if (has) + { + // + count = CountTrendBearishPivots(); + for (int i = 0; i < count; i++) + { + // + XBoxZone iBox; + has = trendBearishPivots[i].AsBox(iBox); + if (has) + { + // + AddRef( + iBox, + boxes // + ); + } + + // + iBox.Clean(); + } + } + + // + has = HasTKITRNDBearishPivots(); + if (has) + { + // + count = CountTKITRNDBearishPivots(); + for (int i = 0; i < count; i++) + { + // + XBoxZone iBox; + has = tkitrndBearishPivots[i].AsBox(iBox); + if (has) + { + // + AddRef( + iBox, + boxes // + ); + } + + // + iBox.Clean(); + } + } + + // + result = ArraySize(boxes); + + // + return result; + } + // // POI Handlers ... @@ -3451,6 +4883,169 @@ class XCXCAEAPOIDetector : public XCBase ); } + // + bool CheckPivotCommons( + XCAPivot &pivot, + XBoxZone &box, + int barIndex = 0 // + ) + { + // + bool result = false; + + // + box.Clean(); + + // + barIndex = NormalizeInt(barIndex, 0); + + // + result = pivot.IsValid(); + if (!result) + { + return result; + } + + // + int pivotToIDX = pivot.ToIndex(); + + // + result = pivotToIDX > barIndex; + if (!result) + { + return result; + } + + // + result = pivot.AsBox(box); + if (!result) + { + // + box.Clean(); + return result; + } + + // + return result; + } + + // + bool IsPivotBreaked( + XCAPivot &pivot, + int barIndex = 0 // + ) + { + // + bool result = false; + + // + XBoxZone iBox; + result = CheckPivotCommons( + pivot, + iBox, + barIndex // + ); + if (!result) + { + // + iBox.Clean(); + return result; + } + + // + bool isBullish = iBox.IsBullish(); + double boundary = + isBullish + ? iBox.lower + : iBox.upper; + + // + int toIDX = iBox.ToIndex(); + + // + // for validating Box Break we have to wait At Least 3 Bars Close + // out of Box Boundary ... + int barsLength = 3; + + // + int startCheckBreaktionBarIndex = toIDX - barsLength; + result = startCheckBreaktionBarIndex > 0 && + barIndex < startCheckBreaktionBarIndex; + if (!result) + { + // + iBox.Clean(); + return result; + } + + // + XOHCL cBar; + XOHCL pBar; + XOHCL p2Bar; + for (int i = barIndex; i < startCheckBreaktionBarIndex; i++) + { + // + result = cBar.Init( + iBox.symbol, + iBox.period, + i + 1 // + ); + result = + result && + cBar.GetPreviousBar(pBar); + result = + result && + pBar.GetPreviousBar(p2Bar); + if (!result) + { + // + iBox.Clean(); + cBar.Clean(); + pBar.Clean(); + p2Bar.Clean(); + + // + break; + } + + // + bool isBullishBreaked = + isBullish && + cBar.close < boundary && + pBar.close < boundary && + p2Bar.close < boundary; + + // + bool isBearishBreaked = + !isBullish && + cBar.close > boundary && + pBar.close > boundary && + p2Bar.close > boundary; + + // + result = isBullishBreaked || + isBearishBreaked; + if (result) + { + break; + } + + // + cBar.Clean(); + pBar.Clean(); + p2Bar.Clean(); + } + + // + iBox.Clean(); + cBar.Clean(); + pBar.Clean(); + p2Bar.Clean(); + + // + return result; + } + // }; diff --git a/XCAEA/Classes/xcaea.x-poi.drawer.class.mq5 b/XCAEA/Classes/xcaea.x-poi.drawer.class.mq5 index 4ea7aa30..a2154005 100644 --- a/XCAEA/Classes/xcaea.x-poi.drawer.class.mq5 +++ b/XCAEA/Classes/xcaea.x-poi.drawer.class.mq5 @@ -53,22 +53,6 @@ class XCXCAEAPOIDrawer : public XCBase bool drawTKITRNDBullishPivots; bool drawTKITRNDBearishPivots; - // - bool drawActiveSWHPivot; - bool drawActiveSWLPivot; - bool drawActivePeakPivot; - bool drawActiveValePivot; - bool drawActiveKIBullishPivot; - bool drawActiveKIBearishPivot; - bool drawActivePeakSWHResPivot; - bool drawActiveValeSWLSupPivot; - bool drawActiveTKIBullishPivot; - bool drawActiveTKIBearishPivot; - bool drawActiveTrendBullishPivot; - bool drawActiveTrendBearishPivot; - bool drawActiveTKITRNDBullishPivot; - bool drawActiveTKITRNDBearishPivot; - // // Constructors ... XCXCAEAPOIDrawer( @@ -105,76 +89,6 @@ class XCXCAEAPOIDrawer : public XCBase mTKITRNDBullishPivotObjects.Clear(); mTKITRNDBearishPivotObjects.Clear(); - // - mActiveSWHPivotObject.Delete(); - mActiveSWHPivotObject.Detach(); - ZeroMemory(mActiveSWHPivotObject); - - // - mActiveSWLPivotObject.Delete(); - mActiveSWLPivotObject.Detach(); - ZeroMemory(mActiveSWLPivotObject); - - // - mActivePeakPivotObject.Delete(); - mActivePeakPivotObject.Detach(); - ZeroMemory(mActivePeakPivotObject); - - // - mActiveValePivotObject.Delete(); - mActiveValePivotObject.Detach(); - ZeroMemory(mActiveValePivotObject); - - // - mActiveKIBullishPivotObject.Delete(); - mActiveKIBullishPivotObject.Detach(); - ZeroMemory(mActiveKIBullishPivotObject); - - // - mActiveKIBearishPivotObject.Delete(); - mActiveKIBearishPivotObject.Detach(); - ZeroMemory(mActiveKIBearishPivotObject); - - // - mActivePeakSWHResPivotObject.Delete(); - mActivePeakSWHResPivotObject.Detach(); - ZeroMemory(mActivePeakSWHResPivotObject); - - // - mActiveValeSWLSupPivotObject.Delete(); - mActiveValeSWLSupPivotObject.Detach(); - ZeroMemory(mActiveValeSWLSupPivotObject); - - // - mActiveTKIBullishPivotObject.Delete(); - mActiveTKIBullishPivotObject.Detach(); - ZeroMemory(mActiveTKIBullishPivotObject); - - // - mActiveTKIBearishPivotObject.Delete(); - mActiveTKIBearishPivotObject.Detach(); - ZeroMemory(mActiveTKIBearishPivotObject); - - // - mActiveTrendBullishPivotObject.Delete(); - mActiveTrendBullishPivotObject.Detach(); - ZeroMemory(mActiveTrendBullishPivotObject); - - // - mActiveTrendBearishPivotObject.Delete(); - mActiveTrendBearishPivotObject.Detach(); - ZeroMemory(mActiveTrendBearishPivotObject); - - // - mActiveTKITRNDBullishPivotObject.Delete(); - mActiveTKITRNDBullishPivotObject.Detach(); - ZeroMemory(mActiveTKITRNDBullishPivotObject); - - // - mActiveTKITRNDBearishPivotObject.Delete(); - mActiveTKITRNDBearishPivotObject.Detach(); - ZeroMemory(mActiveTKITRNDBearishPivotObject); - // ZeroMemory(drawer); ZeroMemory(detector); @@ -206,64 +120,28 @@ class XCXCAEAPOIDrawer : public XCBase drawTrendBearishPivots = false; drawTKITRNDBullishPivots = false; drawTKITRNDBearishPivots = false; - - // - drawActiveSWHPivot = false; - drawActiveSWLPivot = false; - drawActivePeakPivot = false; - drawActiveValePivot = false; - drawActiveKIBullishPivot = false; - drawActiveKIBearishPivot = false; - drawActivePeakSWHResPivot = false; - drawActiveValeSWLSupPivot = false; - drawActiveTKIBullishPivot = false; - drawActiveTKIBearishPivot = false; - drawActiveTrendBullishPivot = false; - drawActiveTrendBearishPivot = false; - drawActiveTKITRNDBullishPivot = false; - drawActiveTKITRNDBearishPivot = false; } // - void Draw() + void Draw(datetime to = NULL) { // - DrawSWHPivots(); - DrawSWLPivots(); - DrawPeakPivots(); - DrawValePivots(); - DrawKIBullishPivots(); - DrawKIBearishPivots(); - DrawPeakSWHResPivots(); - DrawValeSWLSupPivots(); - DrawTKIBullishPivots(); - DrawTKIBearishPivots(); - DrawCycleSameLLPivots(); - DrawCycleSameHHPivots(); - DrawTrendBullishPivots(); - DrawTrendBearishPivots(); - DrawTKITRNDBullishPivots(); - DrawTKITRNDBearishPivots(); - } - - // - void DrawActives() - { - // - DrawActiveSWHPivot(); - DrawActiveSWLPivot(); - DrawActivePeakPivot(); - DrawActiveValePivot(); - DrawActiveKIBullishPivot(); - DrawActiveKIBearishPivot(); - DrawActivePeakSWHResPivot(); - DrawActiveValeSWLSupPivot(); - DrawActiveTKIBullishPivot(); - DrawActiveTKIBearishPivot(); - DrawActiveTrendBullishPivot(); - DrawActiveTrendBearishPivot(); - DrawActiveTKITRNDBullishPivot(); - DrawActiveTKITRNDBearishPivot(); + DrawSWHPivots(to); + DrawSWLPivots(to); + DrawPeakPivots(to); + DrawValePivots(to); + DrawKIBullishPivots(to); + DrawKIBearishPivots(to); + DrawPeakSWHResPivots(to); + DrawValeSWLSupPivots(to); + DrawTKIBullishPivots(to); + DrawTKIBearishPivots(to); + DrawCycleSameLLPivots(to); + DrawCycleSameHHPivots(to); + DrawTrendBullishPivots(to); + DrawTrendBearishPivots(to); + DrawTKITRNDBullishPivots(to); + DrawTKITRNDBearishPivots(to); } // @@ -271,7 +149,7 @@ class XCXCAEAPOIDrawer : public XCBase // // - void DrawSWHPivots() + void DrawSWHPivots(datetime to = NULL) { // if (!drawSWHPivots) @@ -279,6 +157,9 @@ class XCXCAEAPOIDrawer : public XCBase return; } + // + bool canUpdateTo = IsValid(to); + // bool has = detector.HasSWHPivots(); if (!has) @@ -298,6 +179,12 @@ class XCXCAEAPOIDrawer : public XCBase continue; } + // + if (canUpdateTo) + { + iBox.to = to; + } + // XCBoxObject *iObj; has = drawer.DrawBox( @@ -315,7 +202,7 @@ class XCXCAEAPOIDrawer : public XCBase } // - void DrawSWLPivots() + void DrawSWLPivots(datetime to = NULL) { // if (!drawSWLPivots) @@ -323,6 +210,9 @@ class XCXCAEAPOIDrawer : public XCBase return; } + // + bool canUpdateTo = IsValid(to); + // bool has = detector.HasSWLPivots(); if (!has) @@ -342,6 +232,12 @@ class XCXCAEAPOIDrawer : public XCBase continue; } + // + if (canUpdateTo) + { + iBox.to = to; + } + // XCBoxObject *iObj; has = drawer.DrawBox( @@ -359,7 +255,7 @@ class XCXCAEAPOIDrawer : public XCBase } // - void DrawPeakPivots() + void DrawPeakPivots(datetime to = NULL) { // if (!drawPeakPivots) @@ -367,6 +263,9 @@ class XCXCAEAPOIDrawer : public XCBase return; } + // + bool canUpdateTo = IsValid(to); + // bool has = detector.HasPeakPivots(); if (!has) @@ -386,6 +285,12 @@ class XCXCAEAPOIDrawer : public XCBase continue; } + // + if (canUpdateTo) + { + iBox.to = to; + } + // XCBoxObject *iObj; has = drawer.DrawBox( @@ -403,7 +308,7 @@ class XCXCAEAPOIDrawer : public XCBase } // - void DrawValePivots() + void DrawValePivots(datetime to = NULL) { // if (!drawValePivots) @@ -411,6 +316,9 @@ class XCXCAEAPOIDrawer : public XCBase return; } + // + bool canUpdateTo = IsValid(to); + // bool has = detector.HasValePivots(); if (!has) @@ -430,6 +338,12 @@ class XCXCAEAPOIDrawer : public XCBase continue; } + // + if (canUpdateTo) + { + iBox.to = to; + } + // XCBoxObject *iObj; has = drawer.DrawBox( @@ -447,7 +361,7 @@ class XCXCAEAPOIDrawer : public XCBase } // - void DrawKIBullishPivots() + void DrawKIBullishPivots(datetime to = NULL) { // if (!drawKIBullishPivots) @@ -455,6 +369,9 @@ class XCXCAEAPOIDrawer : public XCBase return; } + // + bool canUpdateTo = IsValid(to); + // bool has = detector.HasKIBullishPivots(); if (!has) @@ -474,6 +391,12 @@ class XCXCAEAPOIDrawer : public XCBase continue; } + // + if (canUpdateTo) + { + iBox.to = to; + } + // XCBoxObject *iObj; has = drawer.DrawBox( @@ -491,7 +414,7 @@ class XCXCAEAPOIDrawer : public XCBase } // - void DrawKIBearishPivots() + void DrawKIBearishPivots(datetime to = NULL) { // if (!drawKIBearishPivots) @@ -499,6 +422,9 @@ class XCXCAEAPOIDrawer : public XCBase return; } + // + bool canUpdateTo = IsValid(to); + // bool has = detector.HasKIBearishPivots(); if (!has) @@ -518,6 +444,12 @@ class XCXCAEAPOIDrawer : public XCBase continue; } + // + if (canUpdateTo) + { + iBox.to = to; + } + // XCBoxObject *iObj; has = drawer.DrawBox( @@ -535,7 +467,7 @@ class XCXCAEAPOIDrawer : public XCBase } // - void DrawPeakSWHResPivots() + void DrawPeakSWHResPivots(datetime to = NULL) { // if (!drawPeakSWHResPivots) @@ -543,6 +475,9 @@ class XCXCAEAPOIDrawer : public XCBase return; } + // + bool canUpdateTo = IsValid(to); + // bool has = detector.HasPeakSWHResPivots(); if (!has) @@ -562,6 +497,12 @@ class XCXCAEAPOIDrawer : public XCBase continue; } + // + if (canUpdateTo) + { + iBox.to = to; + } + // XCBoxObject *iObj; has = drawer.DrawBox( @@ -579,7 +520,7 @@ class XCXCAEAPOIDrawer : public XCBase } // - void DrawValeSWLSupPivots() + void DrawValeSWLSupPivots(datetime to = NULL) { // if (!drawValeSWLSupPivots) @@ -587,6 +528,9 @@ class XCXCAEAPOIDrawer : public XCBase return; } + // + bool canUpdateTo = IsValid(to); + // bool has = detector.HasValeSWLSupPivots(); if (!has) @@ -606,6 +550,12 @@ class XCXCAEAPOIDrawer : public XCBase continue; } + // + if (canUpdateTo) + { + iBox.to = to; + } + // XCBoxObject *iObj; has = drawer.DrawBox( @@ -623,7 +573,7 @@ class XCXCAEAPOIDrawer : public XCBase } // - void DrawTKIBullishPivots() + void DrawTKIBullishPivots(datetime to = NULL) { // if (!drawTKIBullishPivots) @@ -631,6 +581,9 @@ class XCXCAEAPOIDrawer : public XCBase return; } + // + bool canUpdateTo = IsValid(to); + // bool has = detector.HasTKIBullishPivots(); if (!has) @@ -650,6 +603,12 @@ class XCXCAEAPOIDrawer : public XCBase continue; } + // + if (canUpdateTo) + { + iBox.to = to; + } + // XCBoxObject *iObj; has = drawer.DrawBox( @@ -667,7 +626,7 @@ class XCXCAEAPOIDrawer : public XCBase } // - void DrawTKIBearishPivots() + void DrawTKIBearishPivots(datetime to = NULL) { // if (!drawTKIBearishPivots) @@ -675,6 +634,9 @@ class XCXCAEAPOIDrawer : public XCBase return; } + // + bool canUpdateTo = IsValid(to); + // bool has = detector.HasTKIBearishPivots(); if (!has) @@ -694,6 +656,12 @@ class XCXCAEAPOIDrawer : public XCBase continue; } + // + if (canUpdateTo) + { + iBox.to = to; + } + // XCBoxObject *iObj; has = drawer.DrawBox( @@ -711,7 +679,7 @@ class XCXCAEAPOIDrawer : public XCBase } // - void DrawTrendBullishPivots() + void DrawTrendBullishPivots(datetime to = NULL) { // if (!drawTrendBullishPivots) @@ -719,6 +687,9 @@ class XCXCAEAPOIDrawer : public XCBase return; } + // + bool canUpdateTo = IsValid(to); + // bool has = detector.HasTrendBullishPivots(); if (!has) @@ -738,6 +709,12 @@ class XCXCAEAPOIDrawer : public XCBase continue; } + // + if (canUpdateTo) + { + iBox.to = to; + } + // XCBoxObject *iObj; has = drawer.DrawBox( @@ -755,7 +732,7 @@ class XCXCAEAPOIDrawer : public XCBase } // - void DrawTrendBearishPivots() + void DrawTrendBearishPivots(datetime to = NULL) { // if (!drawTrendBearishPivots) @@ -763,6 +740,9 @@ class XCXCAEAPOIDrawer : public XCBase return; } + // + bool canUpdateTo = IsValid(to); + // bool has = detector.HasTrendBearishPivots(); if (!has) @@ -782,6 +762,12 @@ class XCXCAEAPOIDrawer : public XCBase continue; } + // + if (canUpdateTo) + { + iBox.to = to; + } + // XCBoxObject *iObj; has = drawer.DrawBox( @@ -799,7 +785,7 @@ class XCXCAEAPOIDrawer : public XCBase } // - void DrawTKITRNDBullishPivots() + void DrawTKITRNDBullishPivots(datetime to = NULL) { // if (!drawTKITRNDBullishPivots) @@ -807,6 +793,9 @@ class XCXCAEAPOIDrawer : public XCBase return; } + // + bool canUpdateTo = IsValid(to); + // bool has = detector.HasTKITRNDBullishPivots(); if (!has) @@ -826,6 +815,12 @@ class XCXCAEAPOIDrawer : public XCBase continue; } + // + if (canUpdateTo) + { + iBox.to = to; + } + // XCBoxObject *iObj; has = drawer.DrawBox( @@ -843,7 +838,7 @@ class XCXCAEAPOIDrawer : public XCBase } // - void DrawTKITRNDBearishPivots() + void DrawTKITRNDBearishPivots(datetime to = NULL) { // if (!drawTKITRNDBearishPivots) @@ -851,6 +846,9 @@ class XCXCAEAPOIDrawer : public XCBase return; } + // + bool canUpdateTo = IsValid(to); + // bool has = detector.HasTKITRNDBearishPivots(); if (!has) @@ -870,6 +868,12 @@ class XCXCAEAPOIDrawer : public XCBase continue; } + // + if (canUpdateTo) + { + iBox.to = to; + } + // XCBoxObject *iObj; has = drawer.DrawBox( @@ -887,7 +891,7 @@ class XCXCAEAPOIDrawer : public XCBase } // - void DrawCycleSameLLPivots() + void DrawCycleSameLLPivots(datetime to = NULL) { // if (!drawCycleSameLLPivots) @@ -895,6 +899,9 @@ class XCXCAEAPOIDrawer : public XCBase return; } + // + bool canUpdateTo = IsValid(to); + // int count = 0; @@ -915,6 +922,12 @@ class XCXCAEAPOIDrawer : public XCBase continue; } + // + if (canUpdateTo) + { + iBox.to = to; + } + // XCBoxObject *iObj; has = drawer.DrawBox( @@ -948,6 +961,12 @@ class XCXCAEAPOIDrawer : public XCBase continue; } + // + if (canUpdateTo) + { + iBox.to = to; + } + // XCBoxObject *iObj; has = drawer.DrawBox( @@ -981,6 +1000,12 @@ class XCXCAEAPOIDrawer : public XCBase continue; } + // + if (canUpdateTo) + { + iBox.to = to; + } + // XCBoxObject *iObj; has = drawer.DrawBox( @@ -1014,6 +1039,12 @@ class XCXCAEAPOIDrawer : public XCBase continue; } + // + if (canUpdateTo) + { + iBox.to = to; + } + // XCBoxObject *iObj; has = drawer.DrawBox( @@ -1032,7 +1063,7 @@ class XCXCAEAPOIDrawer : public XCBase } // - void DrawCycleSameHHPivots() + void DrawCycleSameHHPivots(datetime to = NULL) { // if (!drawCycleSameHHPivots) @@ -1040,6 +1071,9 @@ class XCXCAEAPOIDrawer : public XCBase return; } + // + bool canUpdateTo = IsValid(to); + // int count = 0; @@ -1060,6 +1094,12 @@ class XCXCAEAPOIDrawer : public XCBase continue; } + // + if (canUpdateTo) + { + iBox.to = to; + } + // XCBoxObject *iObj; has = drawer.DrawBox( @@ -1093,6 +1133,12 @@ class XCXCAEAPOIDrawer : public XCBase continue; } + // + if (canUpdateTo) + { + iBox.to = to; + } + // XCBoxObject *iObj; has = drawer.DrawBox( @@ -1126,6 +1172,12 @@ class XCXCAEAPOIDrawer : public XCBase continue; } + // + if (canUpdateTo) + { + iBox.to = to; + } + // XCBoxObject *iObj; has = drawer.DrawBox( @@ -1159,6 +1211,12 @@ class XCXCAEAPOIDrawer : public XCBase continue; } + // + if (canUpdateTo) + { + iBox.to = to; + } + // XCBoxObject *iObj; has = drawer.DrawBox( @@ -1176,514 +1234,6 @@ class XCXCAEAPOIDrawer : public XCBase } } - // - // - // - - // - void DrawActiveSWHPivot() - { - // - if (!drawActiveSWHPivot) - { - return; - } - - // - bool has = detector.swhPivot.IsValid(); - if (!has) - { - return; - } - - // - XBoxZone iBox; - has = detector.swhPivot.AsBox(iBox); - if (!has) - { - // - iBox.Clean(); - return; - } - - // - has = drawer.DrawBox( - iBox, - mActiveSWHPivotObject // - ); - - // - iBox.Clean(); - } - - // - void DrawActiveSWLPivot() - { - // - if (!drawActiveSWLPivot) - { - return; - } - - // - bool has = detector.swlPivot.IsValid(); - if (!has) - { - return; - } - - // - XBoxZone iBox; - has = detector.swlPivot.AsBox(iBox); - if (!has) - { - // - iBox.Clean(); - return; - } - - // - has = drawer.DrawBox( - iBox, - mActiveSWLPivotObject // - ); - - // - iBox.Clean(); - } - - // - void DrawActivePeakPivot() - { - // - if (!drawActivePeakPivot) - { - return; - } - - // - bool has = detector.peakPivot.IsValid(); - if (!has) - { - return; - } - - // - XBoxZone iBox; - has = detector.peakPivot.AsBox(iBox); - if (!has) - { - // - iBox.Clean(); - return; - } - - // - has = drawer.DrawBox( - iBox, - mActivePeakPivotObject // - ); - - // - iBox.Clean(); - } - - // - void DrawActiveValePivot() - { - // - if (!drawActiveValePivot) - { - return; - } - - // - bool has = detector.valePivot.IsValid(); - if (!has) - { - return; - } - - // - XBoxZone iBox; - has = detector.valePivot.AsBox(iBox); - if (!has) - { - // - iBox.Clean(); - return; - } - - // - has = drawer.DrawBox( - iBox, - mActiveValePivotObject // - ); - - // - iBox.Clean(); - } - - // - void DrawActiveKIBullishPivot() - { - // - if (!drawActiveKIBullishPivot) - { - return; - } - - // - bool has = detector.kiBullishPivot.IsValid(); - if (!has) - { - return; - } - - // - XBoxZone iBox; - has = detector.kiBullishPivot.AsBox(iBox); - if (!has) - { - // - iBox.Clean(); - return; - } - - // - has = drawer.DrawBox( - iBox, - mActiveKIBullishPivotObject // - ); - - // - iBox.Clean(); - } - - // - void DrawActiveKIBearishPivot() - { - // - if (!drawActiveKIBearishPivot) - { - return; - } - - // - bool has = detector.kiBearishPivot.IsValid(); - if (!has) - { - return; - } - - // - XBoxZone iBox; - has = detector.kiBearishPivot.AsBox(iBox); - if (!has) - { - // - iBox.Clean(); - return; - } - - // - has = drawer.DrawBox( - iBox, - mActiveKIBearishPivotObject // - ); - - // - iBox.Clean(); - } - - // - void DrawActivePeakSWHResPivot() - { - // - if (!drawActivePeakSWHResPivot) - { - return; - } - - // - bool has = detector.peakSWHResPivot.IsValid(); - if (!has) - { - return; - } - - // - XBoxZone iBox; - has = detector.peakSWHResPivot.AsBox(iBox); - if (!has) - { - // - iBox.Clean(); - return; - } - - // - has = drawer.DrawBox( - iBox, - mActivePeakSWHResPivotObject // - ); - - // - iBox.Clean(); - } - - // - void DrawActiveValeSWLSupPivot() - { - // - if (!drawActiveValeSWLSupPivot) - { - return; - } - - // - bool has = detector.valeSWLSupPivot.IsValid(); - if (!has) - { - return; - } - - // - XBoxZone iBox; - has = detector.valeSWLSupPivot.AsBox(iBox); - if (!has) - { - // - iBox.Clean(); - return; - } - - // - has = drawer.DrawBox( - iBox, - mActiveValeSWLSupPivotObject // - ); - - // - iBox.Clean(); - } - - // - void DrawActiveTKIBullishPivot() - { - // - if (!drawActiveTKIBullishPivot) - { - return; - } - - // - bool has = detector.tkiBullishPivot.IsValid(); - if (!has) - { - return; - } - - // - XBoxZone iBox; - has = detector.tkiBullishPivot.AsBox(iBox); - if (!has) - { - // - iBox.Clean(); - return; - } - - // - has = drawer.DrawBox( - iBox, - mActiveTKIBullishPivotObject // - ); - - // - iBox.Clean(); - } - - // - void DrawActiveTKIBearishPivot() - { - // - if (!drawActiveTKIBearishPivot) - { - return; - } - - // - bool has = detector.tkiBearishPivot.IsValid(); - if (!has) - { - return; - } - - // - XBoxZone iBox; - has = detector.tkiBearishPivot.AsBox(iBox); - if (!has) - { - // - iBox.Clean(); - return; - } - - // - has = drawer.DrawBox( - iBox, - mActiveTKIBearishPivotObject // - ); - - // - iBox.Clean(); - } - - // - void DrawActiveTrendBullishPivot() - { - // - if (!drawActiveTrendBullishPivot) - { - return; - } - - // - bool has = detector.trendBullishPivot.IsValid(); - if (!has) - { - return; - } - - // - XBoxZone iBox; - has = detector.trendBullishPivot.AsBox(iBox); - if (!has) - { - // - iBox.Clean(); - return; - } - - // - has = drawer.DrawBox( - iBox, - mActiveTrendBullishPivotObject // - ); - - // - iBox.Clean(); - } - - // - void DrawActiveTrendBearishPivot() - { - // - if (!drawActiveTrendBearishPivot) - { - return; - } - - // - bool has = detector.trendBearishPivot.IsValid(); - if (!has) - { - return; - } - - // - XBoxZone iBox; - has = detector.trendBearishPivot.AsBox(iBox); - if (!has) - { - // - iBox.Clean(); - return; - } - - // - has = drawer.DrawBox( - iBox, - mActiveTrendBearishPivotObject // - ); - - // - iBox.Clean(); - } - - // - void DrawActiveTKITRNDBullishPivot() - { - // - if (!drawActiveTKITRNDBullishPivot) - { - return; - } - - // - bool has = detector.tkitrndBullishPivot.IsValid(); - if (!has) - { - return; - } - - // - XBoxZone iBox; - has = detector.tkitrndBullishPivot.AsBox(iBox); - if (!has) - { - // - iBox.Clean(); - return; - } - - // - has = drawer.DrawBox( - iBox, - mActiveTKITRNDBullishPivotObject // - ); - - // - iBox.Clean(); - } - - // - void DrawActiveTKITRNDBearishPivot() - { - // - if (!drawActiveTKITRNDBearishPivot) - { - return; - } - - // - bool has = detector.tkitrndBearishPivot.IsValid(); - if (!has) - { - return; - } - - // - XBoxZone iBox; - has = detector.tkitrndBearishPivot.AsBox(iBox); - if (!has) - { - // - iBox.Clean(); - return; - } - - // - has = drawer.DrawBox( - iBox, - mActiveTKITRNDBearishPivotObject // - ); - - // - iBox.Clean(); - } - // // Protected ... protected: @@ -1718,22 +1268,6 @@ class XCXCAEAPOIDrawer : public XCBase CArrayObj mTKITRNDBullishPivotObjects; CArrayObj mTKITRNDBearishPivotObjects; - // - XCBoxObject *mActiveSWHPivotObject; - XCBoxObject *mActiveSWLPivotObject; - XCBoxObject *mActivePeakPivotObject; - XCBoxObject *mActiveValePivotObject; - XCBoxObject *mActiveKIBullishPivotObject; - XCBoxObject *mActiveKIBearishPivotObject; - XCBoxObject *mActivePeakSWHResPivotObject; - XCBoxObject *mActiveValeSWLSupPivotObject; - XCBoxObject *mActiveTKIBullishPivotObject; - XCBoxObject *mActiveTKIBearishPivotObject; - XCBoxObject *mActiveTrendBullishPivotObject; - XCBoxObject *mActiveTrendBearishPivotObject; - XCBoxObject *mActiveTKITRNDBullishPivotObject; - XCBoxObject *mActiveTKITRNDBearishPivotObject; - // }; diff --git a/XCAEA/Signals/xcaea.signaller.class.mq5 b/XCAEA/Signals/xcaea.signaller.class.mq5 index 36ef9012..923ab7cb 100644 --- a/XCAEA/Signals/xcaea.signaller.class.mq5 +++ b/XCAEA/Signals/xcaea.signaller.class.mq5 @@ -176,12 +176,14 @@ class XCXCAEASignaller : XCBase ); // - // Draw Active Pivots ... - drawer.DrawActives(); + // Validate Pivots ... + detector.Validate( + zIndex // + ); // // Draw Founded Pivots ... - drawer.Draw(); + drawer.Draw(cTime); // // @@ -572,14 +574,15 @@ class XCXCAEASignaller : XCBase // inputs.caInputs.showKI = true; + inputs.caInputs.showTKI = true; inputs.caInputs.showSar = false; inputs.caInputs.showTrend = true; - inputs.caInputs.showSwings = true; + inputs.caInputs.showSwings = false; inputs.caInputs.showLongCycle = false; inputs.caInputs.showHindCycle = false; - inputs.caInputs.showFiboLevel1 = true; + inputs.caInputs.showFiboLevel1 = false; inputs.caInputs.showFiboLevel2 = false; - inputs.caInputs.showFiboLevel3 = true; + inputs.caInputs.showFiboLevel3 = false; inputs.caInputs.showShortCycle = false; inputs.caInputs.showMediumCycle = false; inputs.caInputs.showPeaksAndVales = true; @@ -644,8 +647,8 @@ class XCXCAEASignaller : XCBase drawer.drawValePivots = false; drawer.drawKIBullishPivots = false; drawer.drawKIBearishPivots = false; - drawer.drawPeakSWHResPivots = false; // true; - drawer.drawValeSWLSupPivots = false; // true; + drawer.drawPeakSWHResPivots = true; + drawer.drawValeSWLSupPivots = true; drawer.drawCycleSameLLPivots = true; drawer.drawCycleSameHHPivots = true; drawer.drawTKIBullishPivots = false; @@ -654,23 +657,6 @@ class XCXCAEASignaller : XCBase drawer.drawTrendBearishPivots = false; drawer.drawTKITRNDBullishPivots = false; drawer.drawTKITRNDBearishPivots = false; - - // - // Active Pivots ... - drawer.drawActiveSWHPivot = false; - drawer.drawActiveSWLPivot = false; - drawer.drawActivePeakPivot = false; - drawer.drawActiveValePivot = false; - drawer.drawActiveKIBullishPivot = false; - drawer.drawActiveKIBearishPivot = false; - drawer.drawActivePeakSWHResPivot = false; - drawer.drawActiveValeSWLSupPivot = false; - drawer.drawActiveTKIBullishPivot = false; - drawer.drawActiveTKIBearishPivot = false; - drawer.drawActiveTrendBullishPivot = false; - drawer.drawActiveTrendBearishPivot = false; - drawer.drawActiveTKITRNDBullishPivot = false; - drawer.drawActiveTKITRNDBearishPivot = false; } /**