cleanup and prepare Signallers ...

This commit is contained in:
2025-05-05 20:10:10 +03:30
parent aa08c57413
commit 905ea76a16
4 changed files with 4174 additions and 1891 deletions
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+8 -231
View File
@@ -45,7 +45,6 @@ class XCXCAEASignaller : XCBase
XCAEAInputs inputs; XCAEAInputs inputs;
XBarTracker barTraker; XBarTracker barTraker;
XCXCAEAHelper *helper; XCXCAEAHelper *helper;
bool rfOnInvalidPivots;
XCXCAEAPOIDrawer *drawer; XCXCAEAPOIDrawer *drawer;
bool continuesRFTillTarget; bool continuesRFTillTarget;
XBoxZone unAvailableBoxes[]; XBoxZone unAvailableBoxes[];
@@ -86,7 +85,6 @@ class XCXCAEASignaller : XCBase
// //
useGuards = false; useGuards = false;
useTargets = true; useTargets = true;
rfOnInvalidPivots = false;
continuesRFTillTarget = false; continuesRFTillTarget = false;
// //
@@ -123,7 +121,7 @@ class XCXCAEASignaller : XCBase
inputs.x3maInputs.fastLength = 5; inputs.x3maInputs.fastLength = 5;
// //
inputs.x3maInputs.showFast = false; inputs.x3maInputs.showFast = true;
inputs.x3maInputs.showSlow = false; inputs.x3maInputs.showSlow = false;
inputs.x3maInputs.showMedium = false; inputs.x3maInputs.showMedium = false;
@@ -131,6 +129,7 @@ class XCXCAEASignaller : XCBase
inputs.caInputs.showMAH = true; inputs.caInputs.showMAH = true;
inputs.caInputs.showMAL = true; inputs.caInputs.showMAL = true;
inputs.caInputs.showMAC = true; inputs.caInputs.showMAC = true;
inputs.caInputs.showSar = true;
inputs.caInputs.showSwings = true; inputs.caInputs.showSwings = true;
inputs.caInputs.showFiboLevel1 = true; inputs.caInputs.showFiboLevel1 = true;
inputs.caInputs.showFiboLevel2 = true; inputs.caInputs.showFiboLevel2 = true;
@@ -142,7 +141,6 @@ class XCXCAEASignaller : XCBase
// //
inputs.caInputs.showKI = false; inputs.caInputs.showKI = false;
inputs.caInputs.showTKI = false; inputs.caInputs.showTKI = false;
inputs.caInputs.showSar = false;
inputs.caInputs.showVidya = false; inputs.caInputs.showVidya = false;
inputs.caInputs.showTrend = false; inputs.caInputs.showTrend = false;
inputs.caInputs.showPeakAndValeGolden = false; inputs.caInputs.showPeakAndValeGolden = false;
@@ -221,8 +219,8 @@ class XCXCAEASignaller : XCBase
detector.selectEngulfedFVGPivots = false; detector.selectEngulfedFVGPivots = false;
detector.validateFVGUsingManalyser = true; detector.validateFVGUsingManalyser = true;
detector.applyLastBarToFVGBoundary = false; detector.applyLastBarToFVGBoundary = false;
detector.selectOnlyFVGWhichHasIndirectionalLastBar = true; detector.selectOnlyFVGWhichHasIndirectionalLastBar = true;
// //
// Bullish ... // Bullish ...
detector.detectFVGBullishPivots = true; detector.detectFVGBullishPivots = true;
@@ -230,7 +228,7 @@ class XCXCAEASignaller : XCBase
// //
// Bearish ... // Bearish ...
detector.detectFVGBearishPivots = true; detector.detectFVGBearishPivots = true;
// //
// TREND ... // TREND ...
@@ -456,100 +454,14 @@ class XCXCAEASignaller : XCBase
// //
// Setup Conditions ... // Setup Conditions ...
double targets[];
XBoxZone pivots[];
XBoxZone pivotBox;
XBoxZone signalBox; XBoxZone signalBox;
int pivotsCount = 0;
bool hasTrend = false;
bool hasPivots = false;
double additionalSL = 0;
bool hasSignalBox = false; bool hasSignalBox = false;
XCAEAConditions conditions; XCAEAConditions conditions;
ENUM_X_DIRECTION trend = X_DIRECTION_NONE;
ENUM_X_DIRECTION signalBoxDir = X_DIRECTION_NONE; ENUM_X_DIRECTION signalBoxDir = X_DIRECTION_NONE;
// //
// Detecting Pivots ... // Checking Test Signal ...
// detector.Detect( hasSignalBox = TestDetectSignal(
// zIndex //
// );
//
// Validate Pivots ...
// detector.Validate(
// unAvailableBoxes,
// zIndex //
// );
//
// if (detector.pivotDetectionLoopbac > 100)
// {
// detector.pivotDetectionLoopbac = 100;
// }
//
// Draw Founded Pivots ...
// drawer.Draw(cTime);
//
// drawer.DrawPeakPivots(cTime);
// drawer.DrawValePivots(cTime);
// drawer.DrawFVGBullishPivots(cTime);
// drawer.DrawFVGBearishPivots(cTime);
// drawer.DrawTrendBullishPivots(cTime);
// drawer.DrawTrendBearishPivots(cTime);
//
// Retrieve Valid Pviots ...
// pivotsCount = detector.FillPivots(pivots);
// hasPivots = IsValidSize(pivotsCount);
//
// Filter UnAvailable Boxes ...
// if (hasPivots)
// {
// //
// // Remove UnAvailable Boxes ...
// has = HasChild(unAvailableBoxes);
// if (has)
// {
// //
// count = ArraySize(unAvailableBoxes);
// for (int i = 0; i < count; i++)
// {
// //
// XBoxZone iBox = unAvailableBoxes[i];
// //
// has = FindBoxIndex(
// idx,
// iBox,
// pivots //
// );
// if (has)
// {
// //
// ArrayRemove(
// pivots,
// idx,
// 1 //
// );
// }
// }
// }
// //
// hasPivots = HasChild(pivots);
// pivotsCount = ArraySize(pivots);
// }
//
//
//
//
TestDetectSignal(
helper, helper,
drawer, drawer,
signalBox, signalBox,
@@ -559,37 +471,9 @@ class XCXCAEASignaller : XCBase
loopback // loopback //
); );
// //
// // Detect Sinal Box ...
// hasSignalBox = DetectXCAEAConditions(
// drawer,
// trend,
// pivots,
// conditions,
// pivotBox,
// signalBox,
// targets,
// additionalSL,
// signalBoxDir,
// helper,
// zIndex,
// loopback //
// );
//
// Make Pivot Box UnAvailable ...
if (pivotBox.IsValid())
{
//
AddRef(
pivotBox,
unAvailableBoxes //
);
}
// //
// Make Signal Box UnAvailable ... // Make Signal Box UnAvailable ...
if (signalBox.IsValid()) if (hasSignalBox)
{ {
// //
AddRef( AddRef(
@@ -651,14 +535,6 @@ class XCXCAEASignaller : XCBase
isBullish isBullish
? signalBox.lower ? signalBox.lower
: signalBox.upper; : signalBox.upper;
if (additionalSL > 0)
{
//
sl =
isBullish
? sl - additionalSL
: sl + additionalSL;
}
// //
double risk = double risk =
@@ -710,12 +586,6 @@ class XCXCAEASignaller : XCBase
// Targets Preparing ... // Targets Preparing ...
if (useTargets) if (useTargets)
{ {
//
Copy(
targets,
mConditions.targets //
);
// //
// Select RF Rewards ... // Select RF Rewards ...
if (continuesRFTillTarget) if (continuesRFTillTarget)
@@ -759,104 +629,12 @@ class XCXCAEASignaller : XCBase
mConditions.targets // 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();
}
}
} }
} }
// //
// Cleanup Resource ... // Cleanup Resource ...
//
Clean(pivots);
// //
zBar.Clean(); zBar.Clean();
cBar.Clean(); cBar.Clean();
@@ -864,7 +642,6 @@ class XCXCAEASignaller : XCBase
pPBar.Clean(); pPBar.Clean();
// //
pivotBox.Clean();
signalBox.Clean(); signalBox.Clean();
conditions.Clean(); conditions.Clean();