/////////////////////////////////////////////////////// // // SaherElm IT Center MQL5 Indicator // ------------------------------------------------- // Name: XCXCAEAPOIDrawer ... // Description: Class for XCAEA POI Drawer ... // // // Maintainer: // ------------ // Hadi Khazaee Asl (hadi_khazaee_asl@yahoo.com) // ////////////////////////////////////////////////////// // // Global Properties ... #property library #property copyright "Copyright 2023, SaherElm IT Center" #property link "https://saherelm.ir" #property version "1.00" #property description "SaherElm Class for XCAEA POI Drawer" #property strict // // Imports ... #include "../../Classes/x-saherelm.x-poi.drawer.class.mq5" #include "../Classes/xcaea.x-poi.detector.class.mq5" // // Definitions ... // // Implementations ... class XCXCAEAPOIDrawer : public XCBase { // // Public ... public: // // Props ... bool drawSWHPivots; bool drawSWLPivots; bool drawPeakPivots; bool drawValePivots; bool drawRSIPeakPivots; bool drawRSIValePivots; bool drawCCIPeakPivots; bool drawCCIValePivots; bool drawKIBullishPivots; bool drawKIBearishPivots; bool drawFVGBullishPivots; bool drawFVGBearishPivots; bool drawPeakSWHResPivots; bool drawValeSWLSupPivots; bool drawTKIBullishPivots; bool drawTKIBearishPivots; bool drawCycleSameLLPivots; bool drawCycleSameHHPivots; bool drawTrendBullishPivots; bool drawTrendBearishPivots; bool drawPVFVGBullishPivots; bool drawPVFVGBearishPivots; bool drawTKITRNDBullishPivots; bool drawTKITRNDBearishPivots; bool drawRSICrossedOverOSPivots; bool drawRSICrossedUnderOBPivots; bool drawCCICrossedOverOSPivots; bool drawCCICrossedUnderOBPivots; // bool drawTicks; // // Colorize Props ... // color peakPivotColor; color valePivotColor; color sameHHPivotColor; color sameLLPivotColor; color ticksBullishColor; color ticksBearishColor; color kiBullishPivotColor; color kiBearishPivotColor; color fvgBullishPivotColor; color fvgBearishPivotColor; color defBullishPivotColor; color defBearishPivotColor; color oscsBullishPivotColor; color oscsBearishPivotColor; color trendBullishPivotColor; color trendBearishPivotColor; // // Width Props ... // int peakPivotWidth; int valePivotWidth; int sameHHPivotWidth; int sameLLPivotWidth; int ticksBullishWidth; int ticksBearishWidth; int kiBullishPivotWidth; int kiBearishPivotWidth; int fvgBullishPivotWidth; int fvgBearishPivotWidth; int defBullishPivotWidth; int defBearishPivotWidth; int oscsBullishPivotWidth; int oscsBearishPivotWidth; int trendBullishPivotWidth; int trendBearishPivotWidth; // // Style Props ... // ENUM_LINE_STYLE peakPivotStyle; ENUM_LINE_STYLE valePivotStyle; ENUM_LINE_STYLE sameHHPivotStyle; ENUM_LINE_STYLE sameLLPivotStyle; ENUM_LINE_STYLE ticksBullishStyle; ENUM_LINE_STYLE ticksBearishStyle; ENUM_LINE_STYLE kiBullishPivotStyle; ENUM_LINE_STYLE kiBearishPivotStyle; ENUM_LINE_STYLE fvgBullishPivotStyle; ENUM_LINE_STYLE fvgBearishPivotStyle; ENUM_LINE_STYLE defBullishPivotStyle; ENUM_LINE_STYLE defBearishPivotStyle; ENUM_LINE_STYLE oscsBullishPivotStyle; ENUM_LINE_STYLE oscsBearishPivotStyle; ENUM_LINE_STYLE trendBullishPivotStyle; ENUM_LINE_STYLE trendBearishPivotStyle; // // Constructors ... XCXCAEAPOIDrawer( XCXCAEAPOIDetector *_detector // ) { // detector = _detector; drawer = new XCPOIDrawer(); // Default(); } // // De Constructors ... ~XCXCAEAPOIDrawer() { // mSWHPivotObjects.Clear(); mSWLPivotObjects.Clear(); mPeakPivotObjects.Clear(); mValePivotObjects.Clear(); mRSIPeakPivotObjects.Clear(); mRSIValePivotObjects.Clear(); mCCIPeakPivotObjects.Clear(); mCCIValePivotObjects.Clear(); mKIBullishPivotObjects.Clear(); mKIBearishPivotObjects.Clear(); mFVGBullishPivotObjects.Clear(); mFVGBearishPivotObjects.Clear(); mPeakSWHResPivotObjects.Clear(); mValeSWLSupPivotObjects.Clear(); mTKIBullishPivotObjects.Clear(); mTKIBearishPivotObjects.Clear(); mTrendBullishPivotObjects.Clear(); mTrendBearishPivotObjects.Clear(); mCycleSameLLPivotObjects.Clear(); mCycleSameHHPivotObjects.Clear(); mTKITRNDBullishPivotObjects.Clear(); mTKITRNDBearishPivotObjects.Clear(); mRSICrossedOverOSPivotObjects.Clear(); mRSICrossedUnderOBPivotObjects.Clear(); mCCICrossedOverOSPivotObjects.Clear(); mCCICrossedUnderOBPivotObjects.Clear(); // ZeroMemory(drawer); ZeroMemory(detector); } // // Properties ... // // Tools ... // virtual void Default() { // drawSWHPivots = false; drawSWLPivots = false; drawPeakPivots = false; drawValePivots = false; drawRSIPeakPivots = false; drawRSIValePivots = false; drawCCIPeakPivots = false; drawCCIValePivots = false; drawKIBullishPivots = false; drawKIBearishPivots = false; drawFVGBullishPivots = false; drawFVGBearishPivots = false; drawPeakSWHResPivots = false; drawValeSWLSupPivots = false; drawTKIBullishPivots = false; drawTKIBearishPivots = false; drawCycleSameLLPivots = false; drawCycleSameHHPivots = false; drawPVFVGBullishPivots = false; drawPVFVGBearishPivots = false; drawTrendBullishPivots = false; drawTrendBearishPivots = false; drawTKITRNDBullishPivots = false; drawTKITRNDBearishPivots = false; drawRSICrossedOverOSPivots = false; drawRSICrossedUnderOBPivots = false; drawCCICrossedOverOSPivots = false; drawCCICrossedUnderOBPivots = false; // drawTicks = false; // // Color ... defBullishPivotColor = clrLime; defBearishPivotColor = clrRed; // peakPivotColor = defBearishPivotColor; valePivotColor = defBullishPivotColor; sameHHPivotColor = defBearishPivotColor; sameLLPivotColor = defBullishPivotColor; ticksBullishColor = defBearishPivotColor; ticksBearishColor = defBullishPivotColor; kiBullishPivotColor = defBullishPivotColor; kiBearishPivotColor = defBearishPivotColor; fvgBullishPivotColor = defBullishPivotColor; fvgBearishPivotColor = defBearishPivotColor; oscsBullishPivotColor = defBullishPivotColor; oscsBearishPivotColor = defBearishPivotColor; trendBullishPivotColor = defBullishPivotColor; trendBearishPivotColor = defBearishPivotColor; // // Width ... defBullishPivotWidth = 1; defBearishPivotWidth = 1; // peakPivotWidth = defBearishPivotWidth; valePivotWidth = defBullishPivotWidth; sameHHPivotWidth = defBearishPivotWidth; sameLLPivotWidth = defBullishPivotWidth; ticksBullishWidth = defBearishPivotWidth; ticksBearishWidth = defBullishPivotWidth; kiBullishPivotWidth = defBullishPivotWidth; kiBearishPivotWidth = defBearishPivotWidth; fvgBullishPivotWidth = defBullishPivotWidth; fvgBearishPivotWidth = defBearishPivotWidth; oscsBullishPivotWidth = defBullishPivotWidth; oscsBearishPivotWidth = defBearishPivotWidth; trendBullishPivotWidth = defBullishPivotWidth; trendBearishPivotWidth = defBearishPivotWidth; // // Style ... defBullishPivotStyle = STYLE_DOT; defBearishPivotStyle = STYLE_DOT; // peakPivotStyle = defBearishPivotStyle; valePivotStyle = defBullishPivotStyle; sameHHPivotStyle = defBearishPivotStyle; sameLLPivotStyle = defBullishPivotStyle; ticksBullishStyle = defBearishPivotStyle; ticksBearishStyle = defBullishPivotStyle; kiBullishPivotStyle = defBullishPivotStyle; kiBearishPivotStyle = defBearishPivotStyle; fvgBullishPivotStyle = defBullishPivotStyle; fvgBearishPivotStyle = defBearishPivotStyle; oscsBullishPivotStyle = defBullishPivotStyle; oscsBearishPivotStyle = defBearishPivotStyle; trendBullishPivotStyle = defBullishPivotStyle; trendBearishPivotStyle = defBearishPivotStyle; } // void Draw(datetime to = NULL) { // DrawTicks(to); DrawSWHPivots(to); DrawSWLPivots(to); DrawPeakPivots(to); DrawValePivots(to); DrawRSIPeakPivots(to); DrawRSIValePivots(to); DrawCCIPeakPivots(to); DrawCCIValePivots(to); DrawKIBullishPivots(to); DrawKIBearishPivots(to); DrawFVGBullishPivots(to); DrawFVGBearishPivots(to); DrawPeakSWHResPivots(to); DrawValeSWLSupPivots(to); DrawTKIBullishPivots(to); DrawTKIBearishPivots(to); DrawCycleSameLLPivots(to); DrawCycleSameHHPivots(to); DrawTrendBullishPivots(to); DrawTrendBearishPivots(to); DrawTKITRNDBullishPivots(to); DrawTKITRNDBearishPivots(to); DrawRSICrossedOverOSPivots(to); DrawRSICrossedUnderOBPivots(to); DrawCCICrossedOverOSPivots(to); DrawCCICrossedUnderOBPivots(to); } // // // // void DrawTicks(datetime to = NULL) { // if (!drawTicks) { return; } // bool canUpdateTo = IsValid(to); // // PEAK TICKS ... bool has = detector.HasPeakTicks(); if (has) { // int count = detector.CountPeakTicks(); for (int i = 0; i < count; i++) { // XCAPVTick iPVTick = detector.peakTicks[i]; // // Converts Zone to Box ... XBoxZone iBox; has = iPVTick.GetMaxVolumeBox(iBox); if (!has) { // iBox.Clean(); iPVTick.Clean(); // continue; } if (canUpdateTo) { iBox.to = to; } // XCBoxObject *iObj; has = drawer.DrawBox( iBox, iObj // ); if (has) { // iObj.BoxColor(ticksBearishColor); iObj.BoxWidth(ticksBearishWidth); iObj.BoxStyle(ticksBearishStyle); // mPeakSWHResPivotObjects.Add(iObj); } // iBox.Clean(); iPVTick.Clean(); ZeroMemory(iObj); } } // // VALE TICKS ... has = detector.HasValeTicks(); if (has) { // int count = detector.CountValeTicks(); for (int i = 0; i < count; i++) { // XCAPVTick iPVTick = detector.valeTicks[i]; // // Converts Zone to Box ... XBoxZone iBox; has = iPVTick.GetMaxVolumeBox(iBox); if (!has) { // iBox.Clean(); iPVTick.Clean(); // continue; } if (canUpdateTo) { iBox.to = to; } // XCBoxObject *iObj; has = drawer.DrawBox( iBox, iObj // ); if (has) { // iObj.BoxColor(ticksBullishColor); iObj.BoxWidth(ticksBullishWidth); iObj.BoxStyle(ticksBullishStyle); // mValeSWLSupPivotObjects.Add(iObj); } // iBox.Clean(); iPVTick.Clean(); ZeroMemory(iObj); } } } // void DrawSWHPivots(datetime to = NULL) { // if (!drawSWHPivots) { return; } // bool canUpdateTo = IsValid(to); // bool has = detector.HasSWHPivots(); if (!has) { return; } // int count = detector.CountSWHPivots(); for (int i = 0; i < count; i++) { // XBoxZone iBox; has = detector.swhPivots[i].AsBox(iBox); if (!has) { continue; } // if (canUpdateTo) { iBox.to = to; } // XCBoxObject *iObj; has = drawer.DrawBox( iBox, iObj // ); if (has) { // iObj.BoxColor(peakPivotColor); iObj.BoxWidth(peakPivotWidth); iObj.BoxStyle(peakPivotStyle); // mSWHPivotObjects.Add(iObj); } // iBox.Clean(); } } // void DrawSWLPivots(datetime to = NULL) { // if (!drawSWLPivots) { return; } // bool canUpdateTo = IsValid(to); // bool has = detector.HasSWLPivots(); if (!has) { return; } // int count = detector.CountSWLPivots(); for (int i = 0; i < count; i++) { // XBoxZone iBox; has = detector.swlPivots[i].AsBox(iBox); if (!has) { continue; } // if (canUpdateTo) { iBox.to = to; } // XCBoxObject *iObj; has = drawer.DrawBox( iBox, iObj // ); if (has) { // iObj.BoxColor(valePivotColor); iObj.BoxWidth(valePivotWidth); iObj.BoxStyle(valePivotStyle); // mSWLPivotObjects.Add(iObj); } // iBox.Clean(); } } // void DrawPeakPivots(datetime to = NULL) { // if (!drawPeakPivots) { return; } // bool canUpdateTo = IsValid(to); // bool has = detector.HasPeakPivots(); if (!has) { return; } // int count = detector.CountPeakPivots(); for (int i = 0; i < count; i++) { // XBoxZone iBox; has = detector.peakPivots[i].AsBox(iBox); if (!has) { continue; } // if (canUpdateTo) { iBox.to = to; } // XCBoxObject *iObj; has = drawer.DrawBox( iBox, iObj // ); if (has) { // iObj.BoxColor(peakPivotColor); iObj.BoxWidth(peakPivotWidth); iObj.BoxStyle(peakPivotStyle); // mPeakPivotObjects.Add(iObj); } // iBox.Clean(); } } // void DrawValePivots(datetime to = NULL) { // if (!drawValePivots) { return; } // bool canUpdateTo = IsValid(to); // bool has = detector.HasValePivots(); if (!has) { return; } // int count = detector.CountValePivots(); for (int i = 0; i < count; i++) { // XBoxZone iBox; has = detector.valePivots[i].AsBox(iBox); if (!has) { continue; } // if (canUpdateTo) { iBox.to = to; } // XCBoxObject *iObj; has = drawer.DrawBox( iBox, iObj // ); if (has) { // iObj.BoxColor(valePivotColor); iObj.BoxWidth(valePivotWidth); iObj.BoxStyle(valePivotStyle); // mValePivotObjects.Add(iObj); } // iBox.Clean(); } } // void DrawKIBullishPivots(datetime to = NULL) { // if (!drawKIBullishPivots) { return; } // bool canUpdateTo = IsValid(to); // bool has = detector.HasKIBullishPivots(); if (!has) { return; } // int count = detector.CountKIBullishPivots(); for (int i = 0; i < count; i++) { // XBoxZone iBox; has = detector.kiBullishPivots[i].AsBox(iBox); if (!has) { continue; } // if (canUpdateTo) { iBox.to = to; } // XCBoxObject *iObj; has = drawer.DrawBox( iBox, iObj // ); if (has) { // iObj.BoxColor(kiBullishPivotColor); iObj.BoxWidth(kiBullishPivotWidth); iObj.BoxStyle(kiBullishPivotStyle); // mKIBullishPivotObjects.Add(iObj); } // iBox.Clean(); } } // void DrawKIBearishPivots(datetime to = NULL) { // if (!drawKIBearishPivots) { return; } // bool canUpdateTo = IsValid(to); // bool has = detector.HasKIBearishPivots(); if (!has) { return; } // int count = detector.CountKIBearishPivots(); for (int i = 0; i < count; i++) { // XBoxZone iBox; has = detector.kiBearishPivots[i].AsBox(iBox); if (!has) { continue; } // if (canUpdateTo) { iBox.to = to; } // XCBoxObject *iObj; has = drawer.DrawBox( iBox, iObj // ); if (has) { // iObj.BoxColor(kiBearishPivotColor); iObj.BoxWidth(kiBearishPivotWidth); iObj.BoxStyle(kiBearishPivotStyle); // mKIBearishPivotObjects.Add(iObj); } // iBox.Clean(); } } // void DrawFVGBullishPivots(datetime to = NULL) { // bool canUpdateTo = IsValid(to); // if (drawFVGBullishPivots) { // bool has = detector.HasFVGBullishPivots(); if (has) { // int count = detector.CountFVGBullishPivots(); for (int i = 0; i < count; i++) { // XBoxZone iBox; has = detector.fvgBullishPivots[i].AsBox(iBox); if (!has) { // iBox.Clean(); continue; } // if (canUpdateTo) { iBox.to = to; } // XCBoxObject *iObj; has = drawer.DrawBox( iBox, iObj // ); if (has) { // iObj.BoxColor(fvgBullishPivotColor); iObj.BoxWidth(fvgBullishPivotWidth); iObj.BoxStyle(fvgBullishPivotStyle); // mFVGBullishPivotObjects.Add(iObj); } } } } // if (drawPVFVGBullishPivots) { // bool has = detector.HasPVFVGBullishPivots(); if (has) { // int count = detector.CountPVFVGBullishPivots(); for (int i = 0; i < count; i++) { // XCAPVPivot iPVFVG = detector.pvFVGBullishPivots[i]; // XBoxZone fvgBoxes[]; int fvgBoxesCount = iPVFVG.GetPivots(fvgBoxes); has = IsValidSize(fvgBoxesCount); if (has) { // int idx = GetLowest(fvgBoxes); if (IsValidIndex(idx)) { // XBoxZone iBox = fvgBoxes[idx]; // if (canUpdateTo) { iBox.to = to; } // XCBoxObject *iObj; // has = drawer.DrawBox( iBox, iObj // ); if (has) { // iObj.BoxColor(fvgBullishPivotColor); iObj.BoxWidth(fvgBullishPivotWidth); iObj.BoxStyle(fvgBullishPivotStyle); // mFVGBullishPivotObjects.Add(iObj); } // iBox.Clean(); ZeroMemory(iObj); } } } } } } // void DrawFVGBearishPivots(datetime to = NULL) { // bool canUpdateTo = IsValid(to); // if (drawFVGBearishPivots) { // bool has = detector.HasFVGBearishPivots(); if (has) { // int count = detector.CountFVGBearishPivots(); for (int i = 0; i < count; i++) { // XBoxZone iBox; has = detector.fvgBearishPivots[i].AsBox(iBox); if (!has) { // iBox.Clean(); continue; } // if (canUpdateTo) { iBox.to = to; } // XCBoxObject *iObj; has = drawer.DrawBox( iBox, iObj // ); if (has) { // iObj.BoxColor(fvgBearishPivotColor); iObj.BoxWidth(fvgBearishPivotWidth); iObj.BoxStyle(fvgBearishPivotStyle); // mFVGBearishPivotObjects.Add(iObj); } } } } // if (drawPVFVGBullishPivots) { // bool has = detector.HasPVFVGBearishPivots(); if (has) { // int count = detector.CountPVFVGBearishPivots(); for (int i = 0; i < count; i++) { // XCAPVPivot iPVFVG = detector.pvFVGBearishPivots[i]; // XBoxZone fvgBoxes[]; int fvgBoxesCount = iPVFVG.GetPivots(fvgBoxes); has = IsValidSize(fvgBoxesCount); if (has) { // int idx = GetHighest(fvgBoxes); if (IsValidIndex(idx)) { // XBoxZone iBox = fvgBoxes[idx]; // if (canUpdateTo) { iBox.to = to; } // XCBoxObject *iObj; // has = drawer.DrawBox( iBox, iObj // ); if (has) { // iObj.BoxColor(fvgBearishPivotColor); iObj.BoxWidth(fvgBearishPivotWidth); iObj.BoxStyle(fvgBearishPivotStyle); // mFVGBearishPivotObjects.Add(iObj); } // iBox.Clean(); ZeroMemory(iObj); } } } } } } // void DrawPeakSWHResPivots(datetime to = NULL) { // if (!drawPeakSWHResPivots) { return; } // bool canUpdateTo = IsValid(to); // bool has = detector.HasPeakSWHResPivots(); if (!has) { return; } // int count = detector.CountPeakSWHResPivots(); for (int i = 0; i < count; i++) { // XBoxZone iBox; has = detector.peakSWHResPivots[i].AsBox(iBox); if (!has) { continue; } // if (canUpdateTo) { iBox.to = to; } // XCBoxObject *iObj; has = drawer.DrawBox( iBox, iObj // ); if (has) { // iObj.BoxColor(peakPivotColor); iObj.BoxWidth(peakPivotWidth); iObj.BoxStyle(peakPivotStyle); // mPeakSWHResPivotObjects.Add(iObj); } // iBox.Clean(); } } // void DrawValeSWLSupPivots(datetime to = NULL) { // if (!drawValeSWLSupPivots) { return; } // bool canUpdateTo = IsValid(to); // bool has = detector.HasValeSWLSupPivots(); if (!has) { return; } // int count = detector.CountValeSWLSupPivots(); for (int i = 0; i < count; i++) { // XBoxZone iBox; has = detector.valeSWLSupPivots[i].AsBox(iBox); if (!has) { continue; } // if (canUpdateTo) { iBox.to = to; } // XCBoxObject *iObj; has = drawer.DrawBox( iBox, iObj // ); if (has) { // iObj.BoxColor(valePivotColor); iObj.BoxWidth(valePivotWidth); iObj.BoxStyle(valePivotStyle); // mValeSWLSupPivotObjects.Add(iObj); } // iBox.Clean(); } } // void DrawTKIBullishPivots(datetime to = NULL) { // if (!drawTKIBullishPivots) { return; } // bool canUpdateTo = IsValid(to); // bool has = detector.HasTKIBullishPivots(); if (!has) { return; } // int count = detector.CountTKIBullishPivots(); for (int i = 0; i < count; i++) { // XBoxZone iBox; has = detector.tkiBullishPivots[i].AsBox(iBox); if (!has) { continue; } // if (canUpdateTo) { iBox.to = to; } // XCBoxObject *iObj; has = drawer.DrawBox( iBox, iObj // ); if (has) { // iObj.BoxColor(kiBullishPivotColor); iObj.BoxWidth(kiBullishPivotWidth); iObj.BoxStyle(kiBullishPivotStyle); // mTKIBullishPivotObjects.Add(iObj); } // iBox.Clean(); } } // void DrawTKIBearishPivots(datetime to = NULL) { // if (!drawTKIBearishPivots) { return; } // bool canUpdateTo = IsValid(to); // bool has = detector.HasTKIBearishPivots(); if (!has) { return; } // int count = detector.CountTKIBearishPivots(); for (int i = 0; i < count; i++) { // XBoxZone iBox; has = detector.tkiBearishPivots[i].AsBox(iBox); if (!has) { continue; } // if (canUpdateTo) { iBox.to = to; } // XCBoxObject *iObj; has = drawer.DrawBox( iBox, iObj // ); if (has) { // iObj.BoxColor(kiBearishPivotColor); iObj.BoxWidth(kiBearishPivotWidth); iObj.BoxStyle(kiBearishPivotStyle); // mTKIBearishPivotObjects.Add(iObj); } // iBox.Clean(); } } // void DrawTrendBullishPivots(datetime to = NULL) { // if (!drawTrendBullishPivots) { return; } // bool canUpdateTo = IsValid(to); // bool has = detector.HasTrendBullishPivots(); if (!has) { return; } // int count = detector.CountTrendBullishPivots(); for (int i = 0; i < count; i++) { // XBoxZone iBox; has = detector.trendBullishPivots[i].AsBox(iBox); if (!has) { continue; } // if (canUpdateTo) { iBox.to = to; } // XCBoxObject *iObj; has = drawer.DrawBox( iBox, iObj // ); if (has) { // iObj.BoxColor(trendBullishPivotColor); iObj.BoxWidth(trendBullishPivotWidth); iObj.BoxStyle(trendBullishPivotStyle); // mTrendBullishPivotObjects.Add(iObj); } // iBox.Clean(); } } // void DrawTrendBearishPivots(datetime to = NULL) { // if (!drawTrendBearishPivots) { return; } // bool canUpdateTo = IsValid(to); // bool has = detector.HasTrendBearishPivots(); if (!has) { return; } // int count = detector.CountTrendBearishPivots(); for (int i = 0; i < count; i++) { // XBoxZone iBox; has = detector.trendBearishPivots[i].AsBox(iBox); if (!has) { continue; } // if (canUpdateTo) { iBox.to = to; } // XCBoxObject *iObj; has = drawer.DrawBox( iBox, iObj // ); if (has) { // iObj.BoxColor(trendBearishPivotColor); iObj.BoxWidth(trendBearishPivotWidth); iObj.BoxStyle(trendBearishPivotStyle); // mTrendBearishPivotObjects.Add(iObj); } // iBox.Clean(); } } // void DrawTKITRNDBullishPivots(datetime to = NULL) { // if (!drawTKITRNDBullishPivots) { return; } // bool canUpdateTo = IsValid(to); // bool has = detector.HasTKITRNDBullishPivots(); if (!has) { return; } // int count = detector.CountTKITRNDBullishPivots(); for (int i = 0; i < count; i++) { // XBoxZone iBox; has = detector.tkitrndBullishPivots[i].AsBox(iBox); if (!has) { continue; } // if (canUpdateTo) { iBox.to = to; } // XCBoxObject *iObj; has = drawer.DrawBox( iBox, iObj // ); if (has) { // iObj.BoxColor(trendBullishPivotColor); iObj.BoxWidth(trendBullishPivotWidth); iObj.BoxStyle(trendBullishPivotStyle); // mTKITRNDBullishPivotObjects.Add(iObj); } // iBox.Clean(); } } // void DrawTKITRNDBearishPivots(datetime to = NULL) { // if (!drawTKITRNDBearishPivots) { return; } // bool canUpdateTo = IsValid(to); // bool has = detector.HasTKITRNDBearishPivots(); if (!has) { return; } // int count = detector.CountTKITRNDBearishPivots(); for (int i = 0; i < count; i++) { // XBoxZone iBox; has = detector.tkitrndBearishPivots[i].AsBox(iBox); if (!has) { continue; } // if (canUpdateTo) { iBox.to = to; } // XCBoxObject *iObj; has = drawer.DrawBox( iBox, iObj // ); if (has) { // iObj.BoxColor(trendBearishPivotColor); iObj.BoxWidth(trendBearishPivotWidth); iObj.BoxStyle(trendBearishPivotStyle); // mTKITRNDBearishPivotObjects.Add(iObj); } // iBox.Clean(); } } // void DrawCycleSameLLPivots(datetime to = NULL) { // if (!drawCycleSameLLPivots) { return; } // bool canUpdateTo = IsValid(to); // int count = 0; // // SHORT ... bool has = detector.HasSSameLLPivots(); if (has) { // count = detector.CountSSameLLPivots(); for (int i = 0; i < count; i++) { // XBoxZone iBox; has = detector.sSameLLPivots[i].AsBox(iBox); if (!has) { continue; } // if (canUpdateTo) { iBox.to = to; } // XCBoxObject *iObj; has = drawer.DrawBox( iBox, iObj // ); if (has) { // iObj.BoxColor(sameLLPivotColor); iObj.BoxWidth(sameLLPivotWidth); iObj.BoxStyle(sameLLPivotStyle); // mCycleSameLLPivotObjects.Add(iObj); } // iBox.Clean(); } } // // MEDIUM ... has = detector.HasMSameLLPivots(); if (has) { // count = detector.CountMSameLLPivots(); for (int i = 0; i < count; i++) { // XBoxZone iBox; has = detector.mSameLLPivots[i].AsBox(iBox); if (!has) { continue; } // if (canUpdateTo) { iBox.to = to; } // XCBoxObject *iObj; has = drawer.DrawBox( iBox, iObj // ); if (has) { // iObj.BoxColor(sameLLPivotColor); iObj.BoxWidth(sameLLPivotWidth); iObj.BoxStyle(sameLLPivotStyle); // mCycleSameLLPivotObjects.Add(iObj); } // iBox.Clean(); } } // // LONG ... has = detector.HasLSameLLPivots(); if (has) { // count = detector.CountLSameLLPivots(); for (int i = 0; i < count; i++) { // XBoxZone iBox; has = detector.lSameLLPivots[i].AsBox(iBox); if (!has) { continue; } // if (canUpdateTo) { iBox.to = to; } // XCBoxObject *iObj; has = drawer.DrawBox( iBox, iObj // ); if (has) { // iObj.BoxColor(sameLLPivotColor); iObj.BoxWidth(sameLLPivotWidth); iObj.BoxStyle(sameLLPivotStyle); // mCycleSameLLPivotObjects.Add(iObj); } // iBox.Clean(); } } // // HIND ... has = detector.HasHSameLLPivots(); if (has) { // count = detector.CountHSameLLPivots(); for (int i = 0; i < count; i++) { // XBoxZone iBox; has = detector.hSameLLPivots[i].AsBox(iBox); if (!has) { continue; } // if (canUpdateTo) { iBox.to = to; } // XCBoxObject *iObj; has = drawer.DrawBox( iBox, iObj // ); if (has) { // iObj.BoxColor(sameLLPivotColor); iObj.BoxWidth(sameLLPivotWidth); iObj.BoxStyle(sameLLPivotStyle); // mCycleSameLLPivotObjects.Add(iObj); } // iBox.Clean(); } } } // void DrawCycleSameHHPivots(datetime to = NULL) { // if (!drawCycleSameHHPivots) { return; } // bool canUpdateTo = IsValid(to); // int count = 0; // // SHORT ... bool has = detector.HasSSameHHPivots(); if (has) { // count = detector.CountSSameHHPivots(); for (int i = 0; i < count; i++) { // XBoxZone iBox; has = detector.sSameHHPivots[i].AsBox(iBox); if (!has) { continue; } // if (canUpdateTo) { iBox.to = to; } // XCBoxObject *iObj; has = drawer.DrawBox( iBox, iObj // ); if (has) { // iObj.BoxColor(sameHHPivotColor); iObj.BoxWidth(sameHHPivotWidth); iObj.BoxStyle(sameHHPivotStyle); // mCycleSameHHPivotObjects.Add(iObj); } // iBox.Clean(); } } // // MEDIUM ... has = detector.HasMSameHHPivots(); if (has) { // count = detector.CountMSameHHPivots(); for (int i = 0; i < count; i++) { // XBoxZone iBox; has = detector.mSameHHPivots[i].AsBox(iBox); if (!has) { continue; } // if (canUpdateTo) { iBox.to = to; } // XCBoxObject *iObj; has = drawer.DrawBox( iBox, iObj // ); if (has) { // iObj.BoxColor(sameHHPivotColor); iObj.BoxWidth(sameHHPivotWidth); iObj.BoxStyle(sameHHPivotStyle); // mCycleSameHHPivotObjects.Add(iObj); } // iBox.Clean(); } } // // LONG ... has = detector.HasLSameHHPivots(); if (has) { // count = detector.CountLSameHHPivots(); for (int i = 0; i < count; i++) { // XBoxZone iBox; has = detector.lSameHHPivots[i].AsBox(iBox); if (!has) { continue; } // if (canUpdateTo) { iBox.to = to; } // XCBoxObject *iObj; has = drawer.DrawBox( iBox, iObj // ); if (has) { // iObj.BoxColor(sameHHPivotColor); iObj.BoxWidth(sameHHPivotWidth); iObj.BoxStyle(sameHHPivotStyle); // mCycleSameHHPivotObjects.Add(iObj); } // iBox.Clean(); } } // // HIND ... has = detector.HasHSameHHPivots(); if (has) { // count = detector.CountHSameHHPivots(); for (int i = 0; i < count; i++) { // XBoxZone iBox; has = detector.hSameHHPivots[i].AsBox(iBox); if (!has) { continue; } // if (canUpdateTo) { iBox.to = to; } // XCBoxObject *iObj; has = drawer.DrawBox( iBox, iObj // ); if (has) { // iObj.BoxColor(sameHHPivotColor); iObj.BoxWidth(sameHHPivotWidth); iObj.BoxStyle(sameHHPivotStyle); // mCycleSameHHPivotObjects.Add(iObj); } // iBox.Clean(); } } } // void DrawRSIPeakPivots(datetime to = NULL) { // if (!drawRSIPeakPivots) { return; } // to = NULL; bool canUpdateTo = IsValid(to); // int count = 0; bool has = detector.HasRSIPeakPivots(); if (has) { // count = detector.CountRSIPeakPivots(); for (int i = 0; i < count; i++) { // XBoxZone iBox; has = detector.rsiPeakPivots[i].AsBox(iBox); if (!has) { // iBox.Clean(); continue; } // if (canUpdateTo) { iBox.to = to; } // XCBoxObject *iObj; has = drawer.DrawBox( iBox, iObj // ); if (has) { // iObj.BoxColor(oscsBearishPivotColor); iObj.BoxWidth(oscsBearishPivotWidth); iObj.BoxStyle(oscsBearishPivotStyle); // mRSIPeakPivotObjects.Add(iObj); } // iBox.Clean(); } } } // void DrawRSIValePivots(datetime to = NULL) { // if (!drawRSIValePivots) { return; } // to = NULL; bool canUpdateTo = IsValid(to); // int count = 0; bool has = detector.HasRSIValePivots(); if (has) { // count = detector.CountRSIValePivots(); for (int i = 0; i < count; i++) { // XBoxZone iBox; has = detector.rsiValePivots[i].AsBox(iBox); if (!has) { // iBox.Clean(); continue; } // if (canUpdateTo) { iBox.to = to; } // XCBoxObject *iObj; has = drawer.DrawBox( iBox, iObj // ); if (has) { // iObj.BoxColor(oscsBullishPivotColor); iObj.BoxWidth(oscsBullishPivotWidth); iObj.BoxStyle(oscsBullishPivotStyle); // mRSIValePivotObjects.Add(iObj); } // iBox.Clean(); } } } // void DrawRSICrossedOverOSPivots(datetime to = NULL) { // if (!drawRSICrossedOverOSPivots) { return; } // to = NULL; bool canUpdateTo = IsValid(to); // int count = 0; bool has = detector.HasRSICrossedOverOSPivots(); if (has) { // count = detector.CountRSICrossedOverOSPivots(); for (int i = 0; i < count; i++) { // XBoxZone iBox; has = detector.rsiCrossedOverOSPivots[i].AsBox(iBox); if (!has) { continue; } // if (canUpdateTo) { iBox.to = to; } // XCBoxObject *iObj; has = drawer.DrawBox( iBox, iObj // ); if (has) { // iObj.BoxColor(oscsBullishPivotColor); iObj.BoxWidth(oscsBullishPivotWidth); iObj.BoxStyle(oscsBullishPivotStyle); // mRSICrossedOverOSPivotObjects.Add(iObj); } // iBox.Clean(); } } } // void DrawRSICrossedUnderOBPivots(datetime to = NULL) { // if (!drawRSICrossedUnderOBPivots) { return; } // to = NULL; bool canUpdateTo = IsValid(to); // int count = 0; bool has = detector.HasRSICrossedUnderOBPivots(); if (has) { // count = detector.CountRSICrossedUnderOBPivots(); for (int i = 0; i < count; i++) { // XBoxZone iBox; has = detector.rsiCrossedUnderOBPivots[i].AsBox(iBox); if (!has) { continue; } // if (canUpdateTo) { iBox.to = to; } // XCBoxObject *iObj; has = drawer.DrawBox( iBox, iObj // ); if (has) { // iObj.BoxColor(oscsBearishPivotColor); iObj.BoxWidth(oscsBearishPivotWidth); iObj.BoxStyle(oscsBearishPivotStyle); // mRSICrossedUnderOBPivotObjects.Add(iObj); } // iBox.Clean(); } } } // void DrawCCIPeakPivots(datetime to = NULL) { // if (!drawCCIPeakPivots) { return; } // to = NULL; bool canUpdateTo = IsValid(to); // int count = 0; bool has = detector.HasCCIPeakPivots(); if (has) { // count = detector.CountCCIPeakPivots(); for (int i = 0; i < count; i++) { // XBoxZone iBox; has = detector.cciPeakPivots[i].AsBox(iBox); if (!has) { // iBox.Clean(); continue; } // if (canUpdateTo) { iBox.to = to; } // XCBoxObject *iObj; has = drawer.DrawBox( iBox, iObj // ); if (has) { // iObj.BoxColor(oscsBearishPivotColor); iObj.BoxWidth(oscsBearishPivotWidth); iObj.BoxStyle(oscsBearishPivotStyle); // mCCIPeakPivotObjects.Add(iObj); } // iBox.Clean(); } } } // void DrawCCIValePivots(datetime to = NULL) { // if (!drawCCIValePivots) { return; } // to = NULL; bool canUpdateTo = IsValid(to); // int count = 0; bool has = detector.HasCCIValePivots(); if (has) { // count = detector.CountCCIValePivots(); for (int i = 0; i < count; i++) { // XBoxZone iBox; has = detector.cciValePivots[i].AsBox(iBox); if (!has) { // iBox.Clean(); continue; } // if (canUpdateTo) { iBox.to = to; } // XCBoxObject *iObj; has = drawer.DrawBox( iBox, iObj // ); if (has) { // iObj.BoxColor(oscsBullishPivotColor); iObj.BoxWidth(oscsBullishPivotWidth); iObj.BoxStyle(oscsBullishPivotStyle); // mCCIValePivotObjects.Add(iObj); } // iBox.Clean(); } } } // void DrawCCICrossedOverOSPivots(datetime to = NULL) { // if (!drawCCICrossedOverOSPivots) { return; } // to = NULL; bool canUpdateTo = IsValid(to); // int count = 0; bool has = detector.HasCCICrossedOverOSPivots(); if (has) { // count = detector.CountCCICrossedOverOSPivots(); for (int i = 0; i < count; i++) { // XBoxZone iBox; has = detector.cciCrossedOverOSPivots[i].AsBox(iBox); if (!has) { continue; } // if (canUpdateTo) { iBox.to = to; } // XCBoxObject *iObj; has = drawer.DrawBox( iBox, iObj // ); if (has) { // iObj.BoxColor(oscsBullishPivotColor); iObj.BoxWidth(oscsBullishPivotWidth); iObj.BoxStyle(oscsBullishPivotStyle); // mCCICrossedOverOSPivotObjects.Add(iObj); } // iBox.Clean(); } } } // void DrawCCICrossedUnderOBPivots(datetime to = NULL) { // if (!drawCCICrossedUnderOBPivots) { return; } // to = NULL; bool canUpdateTo = IsValid(to); // int count = 0; bool has = detector.HasCCICrossedUnderOBPivots(); if (has) { // count = detector.CountCCICrossedUnderOBPivots(); for (int i = 0; i < count; i++) { // XBoxZone iBox; has = detector.cciCrossedUnderOBPivots[i].AsBox(iBox); if (!has) { continue; } // if (canUpdateTo) { iBox.to = to; } // XCBoxObject *iObj; has = drawer.DrawBox( iBox, iObj // ); if (has) { // iObj.BoxColor(oscsBearishPivotColor); iObj.BoxWidth(oscsBearishPivotWidth); iObj.BoxStyle(oscsBearishPivotStyle); // mCCICrossedUnderOBPivotObjects.Add(iObj); } // iBox.Clean(); } } } // // Protected ... protected: // // Props ... // // Prrivate ... private: // // Props ... // XCPOIDrawer *drawer; XCXCAEAPOIDetector *detector; // CArrayObj mSWHPivotObjects; CArrayObj mSWLPivotObjects; CArrayObj mPeakPivotObjects; CArrayObj mValePivotObjects; CArrayObj mRSIPeakPivotObjects; CArrayObj mRSIValePivotObjects; CArrayObj mCCIPeakPivotObjects; CArrayObj mCCIValePivotObjects; CArrayObj mKIBullishPivotObjects; CArrayObj mKIBearishPivotObjects; CArrayObj mFVGBullishPivotObjects; CArrayObj mFVGBearishPivotObjects; CArrayObj mPeakSWHResPivotObjects; CArrayObj mValeSWLSupPivotObjects; CArrayObj mTKIBullishPivotObjects; CArrayObj mTKIBearishPivotObjects; CArrayObj mCycleSameLLPivotObjects; CArrayObj mCycleSameHHPivotObjects; CArrayObj mTrendBullishPivotObjects; CArrayObj mTrendBearishPivotObjects; CArrayObj mTKITRNDBullishPivotObjects; CArrayObj mTKITRNDBearishPivotObjects; CArrayObj mRSICrossedOverOSPivotObjects; CArrayObj mRSICrossedUnderOBPivotObjects; CArrayObj mCCICrossedOverOSPivotObjects; CArrayObj mCCICrossedUnderOBPivotObjects; // }; //