last ...
This commit is contained in:
@@ -42,8 +42,10 @@ enum ENUM_XCA_PIVOTS
|
||||
XCA_TKI_BEAR, // TKIBear
|
||||
XCA_PEAKSWHRES, // PeakSWHRes
|
||||
XCA_VALESWLSUP, // ValeSWLSup
|
||||
XCA_TREND_BULL, // Trend Bullish
|
||||
XCA_TREND_BEAR, // Trend Bearish
|
||||
XCA_TREND_BULL, // TrendBull
|
||||
XCA_TREND_BEAR, // TrendBear
|
||||
XCA_TKITRND_BULL, // TKITRNDBull
|
||||
XCA_TKITRND_BEAR, // TKITRNDBear
|
||||
};
|
||||
|
||||
//
|
||||
@@ -320,6 +322,7 @@ struct XCAPivot
|
||||
case XCA_TKI_BULL:
|
||||
case XCA_TREND_BULL:
|
||||
case XCA_VALESWLSUP:
|
||||
case XCA_TKITRND_BULL:
|
||||
iDir = X_DIRECTION_BULLISH;
|
||||
break;
|
||||
|
||||
@@ -330,6 +333,7 @@ struct XCAPivot
|
||||
case XCA_TKI_BEAR:
|
||||
case XCA_TREND_BEAR:
|
||||
case XCA_PEAKSWHRES:
|
||||
case XCA_TKITRND_BEAR:
|
||||
iDir = X_DIRECTION_BEARISH;
|
||||
break;
|
||||
}
|
||||
@@ -386,6 +390,12 @@ struct XCAPivot
|
||||
//
|
||||
typeStr = "XCA_TREND";
|
||||
}
|
||||
else if (type == XCA_TKITRND_BULL ||
|
||||
type == XCA_TKITRND_BEAR)
|
||||
{
|
||||
//
|
||||
typeStr = "XCA_TKITRND";
|
||||
}
|
||||
box.type = typeStr;
|
||||
|
||||
//
|
||||
@@ -473,6 +483,26 @@ class XCXCAEAPOIDetector : public XCBase
|
||||
public:
|
||||
//
|
||||
// Props ...
|
||||
|
||||
//
|
||||
// Active Pivots ...
|
||||
XCAPivot swhPivot;
|
||||
XCAPivot swlPivot;
|
||||
XCAPivot peakPivot;
|
||||
XCAPivot valePivot;
|
||||
XCAPivot kiBullishPivot;
|
||||
XCAPivot kiBearishPivot;
|
||||
XCAPivot tkiBullishPivot;
|
||||
XCAPivot tkiBearishPivot;
|
||||
XCAPivot peakSWHResPivot;
|
||||
XCAPivot valeSWLSupPivot;
|
||||
XCAPivot trendBullishPivot;
|
||||
XCAPivot trendBearishPivot;
|
||||
XCAPivot tkitrndBullishPivot;
|
||||
XCAPivot tkitrndBearishPivot;
|
||||
|
||||
//
|
||||
// UnActive Pivots ...
|
||||
XCAPivot swhPivots[];
|
||||
XCAPivot swlPivots[];
|
||||
XCAPivot peakPivots[];
|
||||
@@ -485,6 +515,8 @@ class XCXCAEAPOIDetector : public XCBase
|
||||
XCAPivot valeSWLSupPivots[];
|
||||
XCAPivot trendBullishPivots[];
|
||||
XCAPivot trendBearishPivots[];
|
||||
XCAPivot tkitrndBullishPivots[];
|
||||
XCAPivot tkitrndBearishPivots[];
|
||||
|
||||
//
|
||||
// Constructors ...
|
||||
@@ -727,6 +759,141 @@ class XCXCAEAPOIDetector : public XCBase
|
||||
cResistance != pResistance &&
|
||||
pResistance == p2Resistance;
|
||||
|
||||
//
|
||||
// PEAK SWH RES ...
|
||||
|
||||
//
|
||||
bool isCPeakIsPivot =
|
||||
cPeak == cSWH &&
|
||||
cSWH == cResistance;
|
||||
|
||||
//
|
||||
bool isPPeakIsPivot =
|
||||
pPeak == pSWH &&
|
||||
pSWH == pResistance;
|
||||
|
||||
//
|
||||
bool isStartPeakIsPivot =
|
||||
isCPeakIsPivot &&
|
||||
!isPPeakIsPivot;
|
||||
|
||||
//
|
||||
bool isFinishedPeakIsPivot =
|
||||
!isCPeakIsPivot &&
|
||||
isPPeakIsPivot;
|
||||
|
||||
//
|
||||
// VALE SWL SUP ...
|
||||
|
||||
//
|
||||
bool isCValeIsPivot =
|
||||
cVale == cSWL &&
|
||||
cSWL == cSupport;
|
||||
|
||||
//
|
||||
bool isPValeIsPivot =
|
||||
pVale == pSWL &&
|
||||
pSWL == pSupport;
|
||||
|
||||
//
|
||||
bool isStartValeIsPivot =
|
||||
isCValeIsPivot &&
|
||||
!isPValeIsPivot;
|
||||
|
||||
//
|
||||
bool isFinishedValeIsPivot =
|
||||
!isCValeIsPivot &&
|
||||
isPValeIsPivot;
|
||||
|
||||
//
|
||||
// TKITRND ...
|
||||
|
||||
//
|
||||
double cKI = iConditions.kiBuffer[cIDX];
|
||||
double pKI = iConditions.kiBuffer[pIDX];
|
||||
double p2KI = iConditions.kiBuffer[p2IDX];
|
||||
|
||||
//
|
||||
double cKIState = iConditions.kiStateBuffer[cIDX];
|
||||
double pKIState = iConditions.kiStateBuffer[pIDX];
|
||||
double p2KIState = iConditions.kiStateBuffer[p2IDX];
|
||||
|
||||
//
|
||||
double cTKI = iConditions.tkiBuffer[cIDX];
|
||||
double pTKI = iConditions.tkiBuffer[pIDX];
|
||||
double p2TKI = iConditions.tkiBuffer[p2IDX];
|
||||
|
||||
//
|
||||
double cTKIState = iConditions.tkiStateBuffer[cIDX];
|
||||
double pTKIState = iConditions.tkiStateBuffer[pIDX];
|
||||
double p2TKIState = iConditions.tkiStateBuffer[p2IDX];
|
||||
|
||||
//
|
||||
double cTrend = iConditions.trendBuffer[cIDX];
|
||||
double pTrend = iConditions.trendBuffer[pIDX];
|
||||
double p2Trend = iConditions.trendBuffer[p2IDX];
|
||||
|
||||
//
|
||||
double cTrendState = iConditions.trendStateBuffer[cIDX];
|
||||
double pTrendState = iConditions.trendStateBuffer[pIDX];
|
||||
double p2TrendState = iConditions.trendStateBuffer[p2IDX];
|
||||
|
||||
//
|
||||
double cTKITRNDs[] = {
|
||||
cKI,
|
||||
cTKI,
|
||||
cTrend //
|
||||
};
|
||||
|
||||
//
|
||||
double cTKITRNDMin = GetMin(cTKITRNDs);
|
||||
double cTKITRNDMax = GetMax(cTKITRNDs);
|
||||
|
||||
//
|
||||
double pTKITRNDs[] = {
|
||||
pKI,
|
||||
pTKI,
|
||||
pTrend //
|
||||
};
|
||||
|
||||
//
|
||||
double pTKITRNDMin = GetMin(pTKITRNDs);
|
||||
double pTKITRNDMax = GetMax(pTKITRNDs);
|
||||
|
||||
//
|
||||
bool isCTKITRNDBullish =
|
||||
cKIState > 0 &&
|
||||
cTKIState > 0 &&
|
||||
cTrendState > 0;
|
||||
|
||||
//
|
||||
bool isPTKITRNDBullish =
|
||||
pKIState > 0 &&
|
||||
pTKIState > 0 &&
|
||||
pTrendState > 0;
|
||||
|
||||
//
|
||||
bool isTKITRNDSwitchedBullish =
|
||||
isCTKITRNDBullish &&
|
||||
!isPTKITRNDBullish;
|
||||
|
||||
//
|
||||
bool isCTKITRNDBearish =
|
||||
cKIState < 0 &&
|
||||
cTKIState < 0 &&
|
||||
cTrendState < 0;
|
||||
|
||||
//
|
||||
bool isPTKITRNDBearish =
|
||||
pKIState < 0 &&
|
||||
pTKIState < 0 &&
|
||||
pTrendState < 0;
|
||||
|
||||
//
|
||||
bool isTKITRNDSwitchedBearish =
|
||||
isCTKITRNDBearish &&
|
||||
!isPTKITRNDBearish;
|
||||
|
||||
//
|
||||
// Checking Pivots ...
|
||||
|
||||
@@ -735,6 +902,8 @@ class XCXCAEAPOIDetector : public XCBase
|
||||
bool detectSWLPivot = true;
|
||||
bool detectPeakPivot = true;
|
||||
bool detectValePivot = true;
|
||||
bool detectTKITRNDBullish = true;
|
||||
bool detectTKITRNDBearish = true;
|
||||
bool detectKIBullishPivot = true;
|
||||
bool detectKIBearishPivot = true;
|
||||
bool detectTKIBullishPivot = true;
|
||||
@@ -1074,28 +1243,39 @@ class XCXCAEAPOIDetector : public XCBase
|
||||
peakSWHResPivot.period = iConditions.period;
|
||||
|
||||
//
|
||||
if (iConditions.isPeakIsPivot && iConditions.isPeakSameLast)
|
||||
if (isFinishedPeakIsPivot)
|
||||
{
|
||||
//
|
||||
peakSWHResPivot.to = cBar.time;
|
||||
peakSWHResPivot.Clean();
|
||||
|
||||
//
|
||||
peakSWHResPivot.type = XCA_PEAKSWHRES;
|
||||
peakSWHResPivot.symbol = iConditions.symbol;
|
||||
peakSWHResPivot.period = iConditions.period;
|
||||
|
||||
//
|
||||
peakSWHResPivot.to = pBar.time;
|
||||
peakSWHResPivot.from = pBar.time;
|
||||
peakSWHResPivot.value = iConditions.peakBuffer[cIDX];
|
||||
peakSWHResPivot.value = iConditions.peakBuffer[pIDX];
|
||||
peakSWHResPivot.reserve = iConditions.peakGoldenBuffer[pIDX];
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
if (iConditions.isPeakIsPivot && iConditions.isPeakSameLast)
|
||||
if (iConditions.isPeakIsPivot)
|
||||
{
|
||||
//
|
||||
peakSWHResPivot.from = pBar.time;
|
||||
|
||||
//
|
||||
peakSWHResPivot.reserve =
|
||||
peakSWHResPivot.reserve == 0
|
||||
? iConditions.peakGoldenBuffer[cIDX]
|
||||
: MathMax(peakSWHResPivot.reserve, iConditions.peakGoldenBuffer[cIDX]);
|
||||
? iConditions.peakGoldenBuffer[pIDX]
|
||||
: MathMax(peakSWHResPivot.reserve, iConditions.peakGoldenBuffer[pIDX]);
|
||||
}
|
||||
|
||||
//
|
||||
if (!(iConditions.isPeakIsPivot && iConditions.isPeakSameLast))
|
||||
if (isStartPeakIsPivot)
|
||||
{
|
||||
//
|
||||
has = peakSWHResPivot.IsValid() &&
|
||||
@@ -1127,28 +1307,39 @@ class XCXCAEAPOIDetector : public XCBase
|
||||
valeSWLSupPivot.period = iConditions.period;
|
||||
|
||||
//
|
||||
if (iConditions.isValeIsPivot && iConditions.isValeSameLast)
|
||||
if (isFinishedValeIsPivot)
|
||||
{
|
||||
//
|
||||
valeSWLSupPivot.to = cBar.time;
|
||||
valeSWLSupPivot.Clean();
|
||||
|
||||
//
|
||||
valeSWLSupPivot.type = XCA_VALESWLSUP;
|
||||
valeSWLSupPivot.symbol = iConditions.symbol;
|
||||
valeSWLSupPivot.period = iConditions.period;
|
||||
|
||||
//
|
||||
valeSWLSupPivot.to = pBar.time;
|
||||
valeSWLSupPivot.from = pBar.time;
|
||||
valeSWLSupPivot.value = iConditions.valeBuffer[cIDX];
|
||||
valeSWLSupPivot.value = iConditions.valeBuffer[pIDX];
|
||||
valeSWLSupPivot.reserve = iConditions.valeGoldenBuffer[pIDX];
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
if (iConditions.isValeIsPivot && iConditions.isValeSameLast)
|
||||
if (iConditions.isValeIsPivot)
|
||||
{
|
||||
//
|
||||
valeSWLSupPivot.from = pBar.time;
|
||||
|
||||
//
|
||||
valeSWLSupPivot.reserve =
|
||||
valeSWLSupPivot.reserve == 0
|
||||
? iConditions.valeGoldenBuffer[cIDX]
|
||||
: MathMin(valeSWLSupPivot.reserve, iConditions.valeGoldenBuffer[cIDX]);
|
||||
? iConditions.valeGoldenBuffer[pIDX]
|
||||
: MathMin(valeSWLSupPivot.reserve, iConditions.valeGoldenBuffer[pIDX]);
|
||||
}
|
||||
|
||||
//
|
||||
if (!(iConditions.isValeIsPivot && iConditions.isValeSameLast))
|
||||
if (isStartValeIsPivot)
|
||||
{
|
||||
//
|
||||
has = valeSWLSupPivot.IsValid() &&
|
||||
@@ -1629,6 +1820,172 @@ class XCXCAEAPOIDetector : public XCBase
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// TKITRND Bullish ...
|
||||
if (detectTKITRNDBullish)
|
||||
{
|
||||
//
|
||||
if (!tkitrndBullishPivot.IsValid())
|
||||
{
|
||||
//
|
||||
tkitrndBullishPivot.type = XCA_TKITRND_BULL;
|
||||
tkitrndBullishPivot.symbol = iConditions.symbol;
|
||||
tkitrndBullishPivot.period = iConditions.period;
|
||||
|
||||
//
|
||||
if (!isCTKITRNDBullish && isPTKITRNDBullish)
|
||||
{
|
||||
//
|
||||
tkitrndBullishPivot.Clean();
|
||||
|
||||
//
|
||||
tkitrndBullishPivot.type = XCA_TKITRND_BULL;
|
||||
tkitrndBullishPivot.symbol = iConditions.symbol;
|
||||
tkitrndBullishPivot.period = iConditions.period;
|
||||
|
||||
//
|
||||
tkitrndBullishPivot.to = pBar.time;
|
||||
tkitrndBullishPivot.from = pBar.time;
|
||||
tkitrndBullishPivot.value = pTKITRNDMin;
|
||||
tkitrndBullishPivot.reserve = pTKITRNDMax;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
if (isCTKITRNDBullish)
|
||||
{
|
||||
//
|
||||
tkitrndBullishPivot.from = cBar.time;
|
||||
|
||||
//
|
||||
Add(
|
||||
cTKITRNDMin,
|
||||
tkitrndBullishPivot.values //
|
||||
);
|
||||
|
||||
//
|
||||
Add(
|
||||
cTKITRNDMax,
|
||||
tkitrndBullishPivot.values //
|
||||
);
|
||||
|
||||
//
|
||||
tkitrndBullishPivot.value =
|
||||
tkitrndBullishPivot.value == 0
|
||||
? cTKITRNDMin
|
||||
: MathMin(cTKITRNDMin, tkitrndBullishPivot.value);
|
||||
|
||||
//
|
||||
tkitrndBullishPivot.reserve =
|
||||
tkitrndBullishPivot.reserve == 0
|
||||
? cTKITRNDMax
|
||||
: MathMax(cTKITRNDMax, tkitrndBullishPivot.reserve);
|
||||
}
|
||||
|
||||
//
|
||||
if (!isCTKITRNDBullish)
|
||||
{
|
||||
//
|
||||
has =
|
||||
tkitrndBullishPivot.IsValid() &&
|
||||
tkitrndBullishPivot.GetAge() >= pivotVerifications;
|
||||
if (has)
|
||||
{
|
||||
//
|
||||
AddPivot(
|
||||
tkitrndBullishPivot,
|
||||
tkitrndBullishPivots //
|
||||
);
|
||||
}
|
||||
|
||||
//
|
||||
trendBullishPivot.Clean();
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// TKITRND Bearish ...
|
||||
if (detectTKITRNDBearish)
|
||||
{
|
||||
//
|
||||
if (!tkitrndBearishPivot.IsValid())
|
||||
{
|
||||
//
|
||||
tkitrndBearishPivot.type = XCA_TKITRND_BEAR;
|
||||
tkitrndBearishPivot.symbol = iConditions.symbol;
|
||||
tkitrndBearishPivot.period = iConditions.period;
|
||||
|
||||
//
|
||||
if (!isCTKITRNDBearish && isPTKITRNDBearish)
|
||||
{
|
||||
//
|
||||
tkitrndBearishPivot.Clean();
|
||||
|
||||
//
|
||||
tkitrndBearishPivot.type = XCA_TKITRND_BEAR;
|
||||
tkitrndBearishPivot.symbol = iConditions.symbol;
|
||||
tkitrndBearishPivot.period = iConditions.period;
|
||||
|
||||
//
|
||||
tkitrndBearishPivot.to = pBar.time;
|
||||
tkitrndBearishPivot.from = pBar.time;
|
||||
tkitrndBearishPivot.value = pTKITRNDMax;
|
||||
tkitrndBearishPivot.reserve = pTKITRNDMin;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
if (isCTKITRNDBearish)
|
||||
{
|
||||
//
|
||||
tkitrndBearishPivot.from = cBar.time;
|
||||
|
||||
//
|
||||
Add(
|
||||
cTKITRNDMin,
|
||||
tkitrndBearishPivot.values //
|
||||
);
|
||||
|
||||
//
|
||||
Add(
|
||||
cTKITRNDMax,
|
||||
tkitrndBearishPivot.values //
|
||||
);
|
||||
|
||||
//
|
||||
tkitrndBearishPivot.value =
|
||||
tkitrndBearishPivot.value == 0
|
||||
? cTKITRNDMax
|
||||
: MathMax(cTKITRNDMax, tkitrndBearishPivot.value);
|
||||
|
||||
//
|
||||
tkitrndBearishPivot.reserve =
|
||||
tkitrndBearishPivot.reserve == 0
|
||||
? cTKITRNDMin
|
||||
: MathMin(cTKITRNDMin, tkitrndBearishPivot.reserve);
|
||||
}
|
||||
|
||||
//
|
||||
if (!isCTKITRNDBearish)
|
||||
{
|
||||
//
|
||||
has =
|
||||
tkitrndBearishPivot.IsValid() &&
|
||||
tkitrndBearishPivot.GetAge() >= pivotVerifications;
|
||||
if (has)
|
||||
{
|
||||
//
|
||||
AddPivot(
|
||||
tkitrndBearishPivot,
|
||||
tkitrndBearishPivots //
|
||||
);
|
||||
}
|
||||
|
||||
//
|
||||
trendBearishPivot.Clean();
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
start++;
|
||||
|
||||
@@ -1817,6 +2174,33 @@ class XCXCAEAPOIDetector : public XCBase
|
||||
return ArraySize(trendBearishPivots);
|
||||
}
|
||||
|
||||
//
|
||||
// TKITRND ...
|
||||
|
||||
//
|
||||
bool HasTKITRNDBullishPivots()
|
||||
{
|
||||
return HasChild(tkitrndBullishPivots);
|
||||
}
|
||||
|
||||
//
|
||||
int CountTKITRNDBullishPivots()
|
||||
{
|
||||
return ArraySize(tkitrndBullishPivots);
|
||||
}
|
||||
|
||||
//
|
||||
bool HasTKITRNDBearishPivots()
|
||||
{
|
||||
return HasChild(tkitrndBearishPivots);
|
||||
}
|
||||
|
||||
//
|
||||
int CountTKITRNDBearishPivots()
|
||||
{
|
||||
return ArraySize(tkitrndBearishPivots);
|
||||
}
|
||||
|
||||
//
|
||||
// Protected ...
|
||||
protected:
|
||||
@@ -1831,20 +2215,6 @@ class XCXCAEAPOIDetector : public XCBase
|
||||
int pivotVerifications; // Pivots Verifications ...
|
||||
int maxAllowedPivots; // Max Allowed Holding Pibots ...
|
||||
|
||||
//
|
||||
XCAPivot swhPivot;
|
||||
XCAPivot swlPivot;
|
||||
XCAPivot peakPivot;
|
||||
XCAPivot valePivot;
|
||||
XCAPivot kiBullishPivot;
|
||||
XCAPivot kiBearishPivot;
|
||||
XCAPivot tkiBullishPivot;
|
||||
XCAPivot tkiBearishPivot;
|
||||
XCAPivot peakSWHResPivot;
|
||||
XCAPivot valeSWLSupPivot;
|
||||
XCAPivot trendBullishPivot;
|
||||
XCAPivot trendBearishPivot;
|
||||
|
||||
//
|
||||
XCPOIDrawer *drawer;
|
||||
XCXCAEAHelper *helper;
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -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