This commit is contained in:
2025-04-17 01:46:46 +03:30
parent d912210e68
commit c6e3c78e06
9 changed files with 3038 additions and 37 deletions
+194 -9
View File
@@ -23,6 +23,7 @@
// Imports ...
#include "../../Classes/x-saherelm.base.class.mq5"
#include "../../Classes/x-saherelm.x-cobject.class.mq5"
#include "../Classes/xcaea.x-poi.detector.class.mq5"
#include "../Helpers/xcaea.helper.mq5"
#include "../Libraries/xcaea.signaller.lib.mq5"
@@ -41,6 +42,7 @@ class XCXCAEASignaller : XCBase
XBarTracker barTraker;
XCXCAEAHelper *helper;
bool continuesRFTillTarget;
XCXCAEAPOIDetector *detector;
XCAEAStrategyConditions mConditions;
XCAEAStrategyConditions mConditionsCollection[];
@@ -115,6 +117,11 @@ class XCXCAEASignaller : XCBase
//
int loopback = 10;
//
int idx = -1;
int count = 0;
bool has = false;
//
double ask = GetAsk(symbol);
double bid = GetBid(symbol);
@@ -159,7 +166,180 @@ class XCXCAEASignaller : XCBase
ENUM_X_DIRECTION signalBoxDir = X_DIRECTION_NONE;
//
// Checking Conditions ...
// Detecting Pivots ...
detector.Update(
zIndex //
);
//
bool drawSWHPivots = true;
bool drawSWLPivots = true;
bool drawPeakPivots = false;
bool drawValePivots = false;
//
// Draw Peak SWH Res Pivots ...
if (drawPeakPivots)
{
//
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();
}
//
Print("Draw Peak SWH Res Pivots ...");
}
}
//
// Draw Vale SWL Sup Pivots ...
if (drawValePivots)
{
//
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();
}
//
Print("Draw Vale SWL Sup Pivots ...");
}
}
//
// 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);
}
}
}
}
}
//
XCAEAConditions conditions;
@@ -232,7 +412,8 @@ class XCXCAEASignaller : XCBase
? entry - sl
: sl - entry;
risk += spread;
if (risk >= maxAllowedSLDistanceInPoint * points) {
if (risk >= maxAllowedSLDistanceInPoint * points)
{
//
// Fix Risk in Big Distances ...
double hh5 = zBar.FindHighest(5, MODE_HIGH);
@@ -541,23 +722,23 @@ class XCXCAEASignaller : XCBase
//
inputs.caInputs.supResSmoothingLength = 7;
inputs.caInputs.supResSmoothingMode = X_MA_MODE_NONE;
inputs.caInputs.supResSmoothingMode = X_MA_MODE_NONE;
//
inputs.caInputs.showKI = true;
inputs.caInputs.showSar = true;
inputs.caInputs.showSar = false;
inputs.caInputs.showTrend = true;
inputs.caInputs.showSwings = false;
inputs.caInputs.showSwings = true;
inputs.caInputs.showLongCycle = false;
inputs.caInputs.showHindCycle = false;
inputs.caInputs.showFiboLevel1 = false;
inputs.caInputs.showFiboLevel1 = true;
inputs.caInputs.showFiboLevel2 = false;
inputs.caInputs.showFiboLevel3 = false;
inputs.caInputs.showFiboLevel3 = true;
inputs.caInputs.showShortCycle = false;
inputs.caInputs.showMediumCycle = false;
inputs.caInputs.showPeaksAndVales = true;
inputs.caInputs.showPeakAndValeGolden = true;
inputs.caInputs.showSupportAndResistance = true;
inputs.caInputs.showPeakAndValeGolden = false;
inputs.caInputs.showSupportAndResistance = false;
//
// XOSCS ...
@@ -582,6 +763,9 @@ class XCXCAEASignaller : XCBase
period,
inputs //
);
//
detector = new XCXCAEAPOIDetector(helper);
}
/**
@@ -592,6 +776,7 @@ class XCXCAEASignaller : XCBase
//
inputs.Clean();
ZeroMemory(helper);
ZeroMemory(detector);
//
mConditions.Clean();