last ...
This commit is contained in:
@@ -24,6 +24,7 @@
|
||||
#include "../../Classes/x-saherelm.base.class.mq5"
|
||||
#include "../../Classes/x-saherelm.x-cobject.class.mq5"
|
||||
#include "../Classes/xcaea.x-poi.detector.class.mq5"
|
||||
#include "../Classes/xcaea.x-poi.drawer.class.mq5"
|
||||
#include "../Helpers/xcaea.helper.mq5"
|
||||
#include "../Libraries/xcaea.signaller.lib.mq5"
|
||||
|
||||
@@ -41,6 +42,7 @@ class XCXCAEASignaller : XCBase
|
||||
XCAEAInputs inputs;
|
||||
XBarTracker barTraker;
|
||||
XCXCAEAHelper *helper;
|
||||
XCXCAEAPOIDrawer *drawer;
|
||||
bool continuesRFTillTarget;
|
||||
XCXCAEAPOIDetector *detector;
|
||||
XCAEAStrategyConditions mConditions;
|
||||
@@ -56,6 +58,8 @@ class XCXCAEASignaller : XCBase
|
||||
//
|
||||
symbol = _symbol;
|
||||
period = _period;
|
||||
|
||||
//
|
||||
Init();
|
||||
}
|
||||
|
||||
@@ -172,7 +176,12 @@ class XCXCAEASignaller : XCBase
|
||||
);
|
||||
|
||||
//
|
||||
DrawPivots();
|
||||
// Draw Active Pivots ...
|
||||
drawer.DrawActives();
|
||||
|
||||
//
|
||||
// Draw Founded Pivots ...
|
||||
drawer.Draw();
|
||||
|
||||
//
|
||||
//
|
||||
@@ -515,501 +524,6 @@ class XCXCAEASignaller : XCBase
|
||||
protected:
|
||||
//
|
||||
|
||||
//
|
||||
void DrawPivots()
|
||||
{
|
||||
//
|
||||
int count = 0;
|
||||
bool has = false;
|
||||
datetime cTime = TimeCurrent();
|
||||
|
||||
//
|
||||
bool drawPeakPivots = false;
|
||||
bool drawValePivots = false;
|
||||
bool drawSWHPivots = true;
|
||||
bool drawSWLPivots = true;
|
||||
bool drawPeakSWHResPivots = false;
|
||||
bool drawValeSWLSupPivots = false;
|
||||
bool drawKIBullishPivots = false;
|
||||
bool drawKIBearishPivots = false;
|
||||
bool drawTKIBullishPivots = false;
|
||||
bool drawTKIBearishPivots = false;
|
||||
bool drawTrendBullishPivots = false;
|
||||
bool drawTrendBearishPivots = false;
|
||||
|
||||
//
|
||||
// Draw Peak Pivots ...
|
||||
if (drawPeakPivots)
|
||||
{
|
||||
//
|
||||
has = detector.HasPeakPivots();
|
||||
if (has)
|
||||
{
|
||||
//
|
||||
count = detector.CountPeakPivots();
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
//
|
||||
XBoxZone iBox;
|
||||
has = detector
|
||||
.peakPivots[i]
|
||||
.AsBox(iBox);
|
||||
if (has)
|
||||
{
|
||||
//
|
||||
// iBox.to = cTime;
|
||||
|
||||
//
|
||||
XCBoxObject *iObj;
|
||||
has = helper.poiDrawer.DrawBox(
|
||||
iBox,
|
||||
iObj //
|
||||
);
|
||||
if (has)
|
||||
{
|
||||
mObjects.Add(iObj);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
iBox.Clean();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Draw Vale Pivots ...
|
||||
if (drawValePivots)
|
||||
{
|
||||
//
|
||||
has = detector.HasValePivots();
|
||||
if (has)
|
||||
{
|
||||
//
|
||||
count = detector.CountValePivots();
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
//
|
||||
XBoxZone iBox;
|
||||
has = detector
|
||||
.valePivots[i]
|
||||
.AsBox(iBox);
|
||||
if (has)
|
||||
{
|
||||
//
|
||||
// iBox.to = cTime;
|
||||
|
||||
//
|
||||
XCBoxObject *iObj;
|
||||
has = helper.poiDrawer.DrawBox(
|
||||
iBox,
|
||||
iObj //
|
||||
);
|
||||
if (has)
|
||||
{
|
||||
mObjects.Add(iObj);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
iBox.Clean();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Draw SWH Pvots ...
|
||||
if (drawSWHPivots)
|
||||
{
|
||||
//
|
||||
has = detector.HasSWHPivots();
|
||||
if (has)
|
||||
{
|
||||
//
|
||||
count = detector.CountSWHPivots();
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
//
|
||||
XBoxZone iBox;
|
||||
has = detector
|
||||
.swhPivots[i]
|
||||
.AsBox(iBox);
|
||||
if (has)
|
||||
{
|
||||
//
|
||||
// iBox.to = cTime;
|
||||
|
||||
//
|
||||
XCBoxObject *iObj;
|
||||
has = helper
|
||||
.poiDrawer
|
||||
.DrawBox(
|
||||
iBox,
|
||||
iObj //
|
||||
);
|
||||
if (has)
|
||||
{
|
||||
mObjects.Add(iObj);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Draw SWL Pvots ...
|
||||
if (drawSWLPivots)
|
||||
{
|
||||
//
|
||||
has = detector.HasSWLPivots();
|
||||
if (has)
|
||||
{
|
||||
//
|
||||
count = detector.CountSWLPivots();
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
//
|
||||
XBoxZone iBox;
|
||||
has = detector
|
||||
.swlPivots[i]
|
||||
.AsBox(iBox);
|
||||
if (has)
|
||||
{
|
||||
//
|
||||
// iBox.to = cTime;
|
||||
|
||||
//
|
||||
XCBoxObject *iObj;
|
||||
has = helper
|
||||
.poiDrawer
|
||||
.DrawBox(
|
||||
iBox,
|
||||
iObj //
|
||||
);
|
||||
if (has)
|
||||
{
|
||||
mObjects.Add(iObj);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Draw Peak SWH Res Pivots ...
|
||||
if (drawPeakSWHResPivots)
|
||||
{
|
||||
//
|
||||
has = detector.HasPeakSWHResPivots();
|
||||
if (has)
|
||||
{
|
||||
//
|
||||
count = detector.CountPeakSWHResPivots();
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
//
|
||||
XBoxZone iBox;
|
||||
has = detector
|
||||
.peakSWHResPivots[i]
|
||||
.AsBox(iBox);
|
||||
if (has)
|
||||
{
|
||||
//
|
||||
// iBox.to = cTime;
|
||||
|
||||
//
|
||||
XCBoxObject *iObj;
|
||||
has = helper.poiDrawer.DrawBox(
|
||||
iBox,
|
||||
iObj //
|
||||
);
|
||||
if (has)
|
||||
{
|
||||
mObjects.Add(iObj);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
iBox.Clean();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Draw Vale SWL Sup Pivots ...
|
||||
if (drawValeSWLSupPivots)
|
||||
{
|
||||
//
|
||||
has = detector.HasValeSWLSupPivots();
|
||||
if (has)
|
||||
{
|
||||
//
|
||||
count = detector.CountValeSWLSupPivots();
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
//
|
||||
XBoxZone iBox;
|
||||
has = detector
|
||||
.valeSWLSupPivots[i]
|
||||
.AsBox(iBox);
|
||||
if (has)
|
||||
{
|
||||
//
|
||||
// iBox.to = cTime;
|
||||
|
||||
//
|
||||
XCBoxObject *iObj;
|
||||
has = helper.poiDrawer.DrawBox(
|
||||
iBox,
|
||||
iObj //
|
||||
);
|
||||
if (has)
|
||||
{
|
||||
mObjects.Add(iObj);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
iBox.Clean();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Draw KI Bullish Pivots ...
|
||||
if (drawKIBullishPivots)
|
||||
{
|
||||
//
|
||||
has = detector.HasKIBullishPivots();
|
||||
if (has)
|
||||
{
|
||||
//
|
||||
count = detector.CountKIBullishPivots();
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
//
|
||||
XBoxZone iBox;
|
||||
has = detector
|
||||
.kiBullishPivots[i]
|
||||
.AsBox(iBox);
|
||||
if (has)
|
||||
{
|
||||
//
|
||||
// iBox.to = cTime;
|
||||
|
||||
//
|
||||
XCBoxObject *iObj;
|
||||
has = helper
|
||||
.poiDrawer
|
||||
.DrawBox(
|
||||
iBox,
|
||||
iObj //
|
||||
);
|
||||
if (has)
|
||||
{
|
||||
mObjects.Add(iObj);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Draw KI Bearish Pivots ...
|
||||
if (drawKIBearishPivots)
|
||||
{
|
||||
//
|
||||
has = detector.HasKIBullishPivots();
|
||||
if (has)
|
||||
{
|
||||
//
|
||||
count = detector.CountKIBearishPivots();
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
//
|
||||
XBoxZone iBox;
|
||||
has = detector
|
||||
.kiBearishPivots[i]
|
||||
.AsBox(iBox);
|
||||
if (has)
|
||||
{
|
||||
//
|
||||
// iBox.to = cTime;
|
||||
|
||||
//
|
||||
XCBoxObject *iObj;
|
||||
has = helper
|
||||
.poiDrawer
|
||||
.DrawBox(
|
||||
iBox,
|
||||
iObj //
|
||||
);
|
||||
if (has)
|
||||
{
|
||||
mObjects.Add(iObj);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Draw TKI Bullish Pivots ...
|
||||
if (drawTKIBullishPivots)
|
||||
{
|
||||
//
|
||||
has = detector.HasTKIBullishPivots();
|
||||
if (has)
|
||||
{
|
||||
//
|
||||
count = detector.CountTKIBullishPivots();
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
//
|
||||
XBoxZone iBox;
|
||||
has = detector
|
||||
.tkiBullishPivots[i]
|
||||
.AsBox(iBox);
|
||||
if (has)
|
||||
{
|
||||
//
|
||||
// iBox.to = cTime;
|
||||
|
||||
//
|
||||
XCBoxObject *iObj;
|
||||
has = helper
|
||||
.poiDrawer
|
||||
.DrawBox(
|
||||
iBox,
|
||||
iObj //
|
||||
);
|
||||
if (has)
|
||||
{
|
||||
mObjects.Add(iObj);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Draw TKI Bearish Pivots ...
|
||||
if (drawTKIBearishPivots)
|
||||
{
|
||||
//
|
||||
has = detector.HasTKIBullishPivots();
|
||||
if (has)
|
||||
{
|
||||
//
|
||||
count = detector.CountTKIBearishPivots();
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
//
|
||||
XBoxZone iBox;
|
||||
has = detector
|
||||
.tkiBearishPivots[i]
|
||||
.AsBox(iBox);
|
||||
if (has)
|
||||
{
|
||||
//
|
||||
// iBox.to = cTime;
|
||||
|
||||
//
|
||||
XCBoxObject *iObj;
|
||||
has = helper
|
||||
.poiDrawer
|
||||
.DrawBox(
|
||||
iBox,
|
||||
iObj //
|
||||
);
|
||||
if (has)
|
||||
{
|
||||
mObjects.Add(iObj);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Draw Trend Bullish Pivots ...
|
||||
if (drawTrendBullishPivots)
|
||||
{
|
||||
//
|
||||
has = detector.HasTrendBullishPivots();
|
||||
if (has)
|
||||
{
|
||||
//
|
||||
count = detector.CountTrendBullishPivots();
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
//
|
||||
XBoxZone iBox;
|
||||
has = detector
|
||||
.trendBullishPivots[i]
|
||||
.AsBox(iBox);
|
||||
if (has)
|
||||
{
|
||||
//
|
||||
// iBox.to = cTime;
|
||||
|
||||
//
|
||||
XCBoxObject *iObj;
|
||||
has = helper
|
||||
.poiDrawer
|
||||
.DrawBox(
|
||||
iBox,
|
||||
iObj //
|
||||
);
|
||||
if (has)
|
||||
{
|
||||
mObjects.Add(iObj);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Draw Trend Bearish Pivots ...
|
||||
if (drawTrendBearishPivots)
|
||||
{
|
||||
//
|
||||
has = detector.HasTrendBullishPivots();
|
||||
if (has)
|
||||
{
|
||||
//
|
||||
count = detector.CountTrendBearishPivots();
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
//
|
||||
XBoxZone iBox;
|
||||
has = detector
|
||||
.trendBearishPivots[i]
|
||||
.AsBox(iBox);
|
||||
if (has)
|
||||
{
|
||||
//
|
||||
// iBox.to = cTime;
|
||||
|
||||
//
|
||||
XCBoxObject *iObj;
|
||||
has = helper
|
||||
.poiDrawer
|
||||
.DrawBox(
|
||||
iBox,
|
||||
iObj //
|
||||
);
|
||||
if (has)
|
||||
{
|
||||
mObjects.Add(iObj);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Private ...
|
||||
private:
|
||||
@@ -1098,6 +612,44 @@ class XCXCAEASignaller : XCBase
|
||||
|
||||
//
|
||||
detector = new XCXCAEAPOIDetector(helper);
|
||||
|
||||
//
|
||||
// Initialize and Configure Drawer ...
|
||||
drawer = new XCXCAEAPOIDrawer(detector);
|
||||
|
||||
//
|
||||
// UnActive Pivots ...
|
||||
drawer.drawSWHPivots = false;
|
||||
drawer.drawSWLPivots = false;
|
||||
drawer.drawPeakPivots = false;
|
||||
drawer.drawValePivots = false;
|
||||
drawer.drawKIBullishPivots = false;
|
||||
drawer.drawKIBearishPivots = false;
|
||||
drawer.drawPeakSWHResPivots = true;
|
||||
drawer.drawValeSWLSupPivots = true;
|
||||
drawer.drawTKIBullishPivots = false;
|
||||
drawer.drawTKIBearishPivots = false;
|
||||
drawer.drawTrendBullishPivots = false;
|
||||
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;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1107,6 +659,9 @@ class XCXCAEASignaller : XCBase
|
||||
{
|
||||
//
|
||||
inputs.Clean();
|
||||
|
||||
//
|
||||
ZeroMemory(drawer);
|
||||
ZeroMemory(helper);
|
||||
ZeroMemory(detector);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user