Files
MQL5Data/XCAEA/Classes/xcaea.x-poi.drawer.class.mq5
T
2025-04-20 10:10:27 +03:30

1846 lines
39 KiB
Plaintext

///////////////////////////////////////////////////////
//
// 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 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 drawTKITRNDBullishPivots;
bool drawTKITRNDBearishPivots;
bool drawRSICrossedOverOSPivots;
bool drawRSICrossedUnderOBPivots;
bool drawCCICrossedOverOSPivots;
bool drawCCICrossedUnderOBPivots;
//
// 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;
drawTrendBullishPivots = false;
drawTrendBearishPivots = false;
drawTKITRNDBullishPivots = false;
drawTKITRNDBearishPivots = false;
drawRSICrossedOverOSPivots = false;
drawRSICrossedUnderOBPivots = false;
drawCCICrossedOverOSPivots = false;
drawCCICrossedUnderOBPivots = false;
}
//
void Draw(datetime to = NULL)
{
//
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 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)
{
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)
{
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)
{
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)
{
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)
{
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)
{
mKIBearishPivotObjects.Add(iObj);
}
//
iBox.Clean();
}
}
//
void DrawFVGBullishPivots(datetime to = NULL) {
//
if (!drawFVGBullishPivots) {
return;
}
//
bool canUpdateTo = IsValid(to);
//
bool has = detector.HasFVGBullishPivots();
if (!has) {
return;
}
//
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) {
mFVGBullishPivotObjects.Add(iObj);
}
}
}
//
void DrawFVGBearishPivots(datetime to = NULL) {
//
if (!drawFVGBearishPivots) {
return;
}
//
bool canUpdateTo = IsValid(to);
//
bool has = detector.HasFVGBearishPivots();
if (!has) {
return;
}
//
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) {
mFVGBearishPivotObjects.Add(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)
{
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)
{
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)
{
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)
{
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)
{
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)
{
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)
{
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)
{
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)
{
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)
{
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)
{
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)
{
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)
{
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)
{
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)
{
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)
{
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)
{
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)
{
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)
{
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)
{
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)
{
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)
{
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)
{
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)
{
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;
//
};
//