This commit is contained in:
2025-04-26 17:40:03 +03:30
parent e1bcf58bc8
commit 94878bdea2
9 changed files with 4063 additions and 540 deletions
+151 -21
View File
@@ -40,9 +40,11 @@ class XCXCAEASignaller : XCBase
//
// Props ...
bool useGuards;
int poiLoopback;
XCAEAInputs inputs;
XBarTracker barTraker;
XCXCAEAHelper *helper;
bool rfOnInvalidPivots;
XCXCAEAPOIDrawer *drawer;
bool continuesRFTillTarget;
XBoxZone unAvailableBoxes[];
@@ -192,6 +194,12 @@ class XCXCAEASignaller : XCBase
zIndex //
);
//
if (detector.pivotDetectionLoopbac > 100)
{
detector.pivotDetectionLoopbac = 100;
}
//
// Check Market Trend ...
hasTrend = detector.MarketTrend(trend);
@@ -421,7 +429,7 @@ class XCXCAEASignaller : XCBase
else
{
//
double rfReward = 1;
double rfReward = 2;
//
double rewardRF = risk * rfReward;
@@ -436,6 +444,95 @@ class XCXCAEASignaller : XCBase
mConditions.targets //
);
}
//
// Detect Rf on Invalid Pivots ...
if (rfOnInvalidPivots)
{
//
has = detector.HasInvalidPivots();
if (has)
{
//
XBoxZone targetBox;
double targetBoxPrice = 0;
count = detector.CountInvalidPivots();
for (int i = 0; i < count; i++)
{
//
XBoxZone iPivot = detector.invalidPivots[i];
//
bool isValidPivot =
Contains(
"XCA_PEAKSWHRES",
iPivot.type //
) ||
Contains(
"XCA_VALESWLSUP",
iPivot.type //
) ||
Contains(
"XCA_FVG",
iPivot.type //
);
if (!isValidPivot)
{
//
iPivot.Clean();
continue;
}
//
double selectedPrice =
isBullish
? iPivot.lower - (5 * points)
: iPivot.upper + (5 * points);
//
double targetBoxSelectedPrice =
isBullish
? targetBox.lower - (5 * points)
: targetBox.upper + (5 * points);
//
bool isDirPassed = iPivot.dir = signalBoxDir;
bool isPricePassed =
isBullish
? entry < selectedPrice
: entry > selectedPrice;
bool canSetTarget =
!targetBox.IsValid()
? true
: isBullish
? targetBoxSelectedPrice > selectedPrice
: targetBoxSelectedPrice < selectedPrice;
if (canSetTarget)
{
//
targetBox = iPivot;
targetBoxPrice = targetBoxSelectedPrice;
}
//
iPivot.Clean();
}
//
if (targetBox.IsValid() &&
targetBoxPrice > 0)
{
//
Add(
targetBoxPrice,
mConditions.targets //
);
}
//
targetBox.Clean();
}
}
}
//
@@ -658,7 +755,8 @@ class XCXCAEASignaller : XCBase
{
//
useGuards = false;
continuesRFTillTarget = true;
rfOnInvalidPivots = false;
continuesRFTillTarget = false;
//
barTraker.Init(
@@ -688,10 +786,18 @@ class XCXCAEASignaller : XCBase
inputs.caInputs.supResSmoothingMode = X_MA_MODE_NONE;
//
inputs.caInputs.showKI = true;
inputs.x3maInputs.applyColor = true;
//
inputs.x3maInputs.showFast = true;
inputs.x3maInputs.showMedium = true;
inputs.x3maInputs.showSlow = true;
//
inputs.caInputs.showKI = false;
inputs.caInputs.showTKI = false;
inputs.caInputs.showSar = false;
inputs.caInputs.showVidya = true;
inputs.caInputs.showVidya = false;
inputs.caInputs.showTrend = false;
inputs.caInputs.showSwings = false;
inputs.caInputs.showLongCycle = false;
@@ -707,15 +813,19 @@ class XCXCAEASignaller : XCBase
//
// XOSCS ...
// inputs.oscsInputs.rsiLength = 5;
// inputs.oscsInputs.cciLength = 5;
inputs.oscsInputs.rsiLength = 4;
inputs.oscsInputs.rsiOBLevel = 90;
inputs.oscsInputs.rsiOSLevel = 10;
inputs.oscsInputs.cciLength = 7;
inputs.oscsInputs.cciOBLevel = 130;
inputs.oscsInputs.cciOSLevel = -130;
// inputs.oscsInputs.mfiLength = 5;
// inputs.oscsInputs.rviLength = 5;
//
// Oscillators Views ...
inputs.showCCI = false;
inputs.showRSI = false;
inputs.showCCI = false;
inputs.showMFI = false;
inputs.showRVI = false;
inputs.showADX = false;
@@ -738,23 +848,27 @@ class XCXCAEASignaller : XCBase
detector.maxAllowedPivots = 50;
detector.pivotVerifications = 5;
detector.ticksDividerInPoints = 15;
detector.pivotDetectionLoopbac = 100;
detector.pivotDetectionLoopbac = 200;
detector.ticksDetectionPerid = PERIOD_D1;
//
// Configure Detector ...
detector.detectTickPivots = true;
detector.detectVolumePivots = true;
detector.detectRSIPeakPivots = true;
detector.detectRSIValePivots = true;
detector.detectCCIPeakPivots = true;
detector.detectCCIValePivots = true;
detector.detectFVGBullishPivots = true;
detector.detectFVGBearishPivots = true;
detector.detectTickPivots = false;
detector.detectVolumePivots = false;
detector.detectRSIPeakPivots = false;
detector.detectRSIValePivots = false;
detector.detectCCIPeakPivots = false;
detector.detectCCIValePivots = false;
detector.detectFVGBullishPivots = false;
detector.detectFVGBearishPivots = false;
detector.detectValeSupSWLPivots = true;
detector.detectPeakResSWHPivots = true;
detector.detectPVFVGBullishPivots = true;
detector.detectPVFVGBearishPivots = true;
detector.detectRSICrossedOverOSPivots = true;
detector.detectRSICrossedUnderOBPivots = true;
detector.detectCCICrossedOverOSPivots = false;
detector.detectCCICrossedUnderOBPivots = false;
//
// Initialize and Configure Drawer ...
@@ -765,19 +879,23 @@ class XCXCAEASignaller : XCBase
//
// Configure Drawer ...
drawer.drawTrendLine = true;
drawer.drawTrendLine = false;
drawer.drawTickPivots = false;
drawer.drawVolumePivots = false;
drawer.drawRSIPeakPivots = true;
drawer.drawRSIValePivots = true;
drawer.drawCCIPeakPivots = true;
drawer.drawCCIValePivots = true;
drawer.drawRSIPeakPivots = false;
drawer.drawRSIValePivots = false;
drawer.drawCCIPeakPivots = false;
drawer.drawCCIValePivots = false;
drawer.drawFVGBullishPivots = false;
drawer.drawFVGBearishPivots = false;
drawer.drawValeSupSWLPivots = true;
drawer.drawPeakResSWHPivots = true;
drawer.drawPVFVGBullishPivots = true;
drawer.drawPVFVGBearishPivots = true;
drawer.drawRSICrossedOverOSPivots = true;
drawer.drawRSICrossedUnderOBPivots = true;
drawer.drawCCICrossedOverOSPivots = true;
drawer.drawCCICrossedUnderOBPivots = true;
//
// Configure Widths ...
@@ -795,6 +913,10 @@ class XCXCAEASignaller : XCBase
drawer.trendLineBullishWidth = 4;
drawer.pvFVGBullishPivotsWidth = 1;
drawer.pvFVGBearishPivotsWidth = 1;
drawer.rsiCrossedOverOSPivotsWidth = 4;
drawer.rsiCrossedUnderOBPivotsWidth = 4;
drawer.cciCrossedOverOSPivotsWidth = 4;
drawer.cciCrossedUnderOBPivotsWidth = 4;
//
// Configure Colors ...
@@ -812,6 +934,10 @@ class XCXCAEASignaller : XCBase
drawer.trendLineBullishColor = clrMagenta;
drawer.pvFVGBullishPivotsColor = clrLime;
drawer.pvFVGBearishPivotsColor = clrRed;
drawer.rsiCrossedOverOSPivotsColor = clrAqua;
drawer.rsiCrossedUnderOBPivotsColor = clrMagenta;
drawer.cciCrossedOverOSPivotsColor = clrAqua;
drawer.cciCrossedUnderOBPivotsColor = clrMagenta;
//
// Configures Styles ...
@@ -829,6 +955,10 @@ class XCXCAEASignaller : XCBase
drawer.trendLineBullishWidth = STYLE_SOLID;
drawer.pvFVGBullishPivotsStyle = STYLE_DASHDOTDOT;
drawer.pvFVGBearishPivotsStyle = STYLE_DASHDOTDOT;
drawer.rsiCrossedOverOSPivotsStyle = STYLE_DASHDOTDOT;
drawer.rsiCrossedUnderOBPivotsStyle = STYLE_DASHDOTDOT;
drawer.cciCrossedOverOSPivotsStyle = STYLE_DASHDOTDOT;
drawer.cciCrossedUnderOBPivotsStyle = STYLE_DASHDOTDOT;
//
}