This commit is contained in:
2025-06-08 10:59:45 +03:30
parent ad67a892c3
commit bf70c327d5
7 changed files with 2455 additions and 110 deletions
+6 -6
View File
@@ -1972,12 +1972,12 @@ class XCXCATBEAExpert : public XCBase
//
// Make Available all Requirement Buffers of XCATB indicator ...
iSignallerInputs.catbInputs.showPV = false;
iSignallerInputs.catbInputs.showKI = false;
iSignallerInputs.catbInputs.showSar = false;
iSignallerInputs.catbInputs.showTrend = false;
iSignallerInputs.catbInputs.showATRBand = false;
iSignallerInputs.catbInputs.showPVGolden = false;
iSignallerInputs.catbInputs.showPV = true;
iSignallerInputs.catbInputs.showKI = true;
iSignallerInputs.catbInputs.showSar = true;
iSignallerInputs.catbInputs.showTrend = true;
iSignallerInputs.catbInputs.showATRBand = true;
iSignallerInputs.catbInputs.showPVGolden = true;
//
// Signalling Configurations ...
+111 -77
View File
@@ -199,10 +199,10 @@ class XCXCATBEASignaller : XCBase
double slATRMultiplier; // SL ATR Multiplier ...
//
XBarTracker barTraker; // Bar Tracker ...
XCX121XCatbHelper *helper; // XCATB Helper Class instance ...
XCBarAnalyser *barAnalyser; // Bar Analyser ...
XCXCATBEAPOIDrawer *drawer; // POI Drawer ...
XBarTracker ticksBarTracker; // Bar Tracker ...
XTriggerBlockFilters filters; // Trigger Block Filters ...
XCXCATBEAPOIDetector *detector; // POI Detector ...
XTriggerBlockValidationRules validations; // Trigger Block Validations ...
@@ -295,6 +295,13 @@ class XCXCATBEASignaller : XCBase
barIndex //
);
//
// Check Bar Processing ...
if (!ticksBarTracker.CanProcessBar())
{
return;
}
//
// Check Triggered Conditions ...
has = HasChild(mConditionsCollection);
@@ -378,13 +385,6 @@ class XCXCATBEASignaller : XCBase
}
}
//
// Check Bar Processing ...
if (!barTraker.CanProcessBar())
{
return;
}
//
// Initialize Bar ...
bar.Init(
@@ -518,7 +518,7 @@ class XCXCATBEASignaller : XCBase
if (has)
{
//
barTraker.Waits();
ticksBarTracker.Waits();
//
AddConditionsIfNotExists();
@@ -1514,12 +1514,12 @@ class XCXCATBEASignaller : XCBase
.IsValidForTrigger(
cConditions.bars[0],
triggerDir,
false, // Allow Cond 1 ...
false, // Allow Cond 2 ...
false, // Allow Cond 3 ...
false, // Allow Cond 4 ...
false, // Allow Cond 5 ...
false, // Allow Cond 6 ...
true, // Allow Cond 1 ...
true, // Allow Cond 2 ...
true, // Allow Cond 3 ...
true, // Allow Cond 4 ...
true, // Allow Cond 5 ...
true, // Allow Cond 6 ...
true // Allow Cond 7 ...
//
);
@@ -1571,79 +1571,111 @@ class XCXCATBEASignaller : XCBase
DrawPivotZone(conditions.pivotZone);
//
// Check atleast 3 Bars Close Outside of applied Edge ...
// Check Current Bar is a Trigger Bar ...
// TODO: Complete this ...
//
// Checking Score ...
double bullishScore = 0;
double bearishScore = 0;
cConditions
.GenerateScore(
bullishScore,
bearishScore //
);
bool isScorePassed =
true;
// isBullish
// ? bullishScore > bearishScore
// : bearishScore > bullishScore;
//
// Check Bar is Inside Zone ...
bool isBarInside =
(isBullish
? (cConditions.bars[1].low < conditions.pivotZone.upper &&
cConditions.bars[1].low > conditions.pivotZone.lower)
: (cConditions.bars[1].high > conditions.pivotZone.lower &&
cConditions.bars[1].high < conditions.pivotZone.upper));
//
isBullish =
isBullish &&
isBarInside &&
isScorePassed &&
isBullishTriggerBar;
//
isBearish =
isBearish &&
isBarInside &&
isScorePassed &&
isBearishTriggerBar;
//
result = isBullish ||
isBearish;
if (result)
// Trigger on Detection Time ...
bool triggerPivotZonesOnSetupTime = true;
if (triggerPivotZonesOnSetupTime)
{
//
conditions.triggerTime = TimeCurrent();
}
else
{
//
// Check atleast 3 Bars Close Outside of applied Edge ...
// Check Current Bar is a Trigger Bar ...
// TODO: Complete this ...
//
// Check Bar is Touched Zone Middle or not ...
double mid = conditions.pivotZone.GetMid();
bool isMiddlePassed =
// Checking Score ...
double bullishScore = 0;
double bearishScore = 0;
cConditions
.GenerateScore(
bullishScore,
bearishScore //
);
bool isScorePassed =
isBullish
? (cConditions.bars[1].low < mid &&
cConditions.bars[1].GetDown() > mid)
: (cConditions.bars[1].high > mid &&
cConditions.bars[1].GetUp() < mid);
? bullishScore > bearishScore
: bearishScore > bullishScore;
// true;
//
result =
result &&
isMiddlePassed;
// Check Bar is Inside Zone ...
bool isBarInside =
(isBullish
? (cConditions.bars[1].low < conditions.pivotZone.upper &&
cConditions.bars[1].low > conditions.pivotZone.lower)
: (cConditions.bars[1].high > conditions.pivotZone.lower &&
cConditions.bars[1].high < conditions.pivotZone.upper));
//
// Checking Conditions Requirements ...
//
bool isConditionsBullishPowered =
//
// Trend ...
(cConditions.isTrendBullish ||
(!cConditions.isTrendBullish &&
!cConditions.isTrendBearish));
//
bool isConditionsBearishPowered =
//
// Trend ...
(cConditions.isTrendBearish ||
(!cConditions.isTrendBullish &&
!cConditions.isTrendBearish));
//
isBullish =
isBullish &&
isBarInside &&
isScorePassed &&
isBullishTriggerBar &&
isConditionsBullishPowered;
//
isBearish =
isBearish &&
isBarInside &&
isScorePassed &&
isBearishTriggerBar &&
isConditionsBearishPowered;
//
result = isBullish ||
isBearish;
result = false;
if (result)
{
//
Print("Trigger Bar Detected ...");
conditions.triggerTime = TimeCurrent();
// Check Bar is Touched Zone Middle or not ...
double mid = conditions.pivotZone.GetMid();
bool isMiddlePassed =
isBullish
? (cConditions.bars[1].low < mid &&
cConditions.bars[1].GetDown() > mid)
: (cConditions.bars[1].high > mid &&
cConditions.bars[1].GetUp() < mid);
//
// Ignore Box Middle Pass ...
// result =
// result &&
// isMiddlePassed;
//
if (result)
{
//
// Print("Trigger Bar Detected ...");
conditions.triggerTime = TimeCurrent();
}
}
}
//
}
//
@@ -1800,7 +1832,7 @@ class XCXCATBEASignaller : XCBase
//
// Initialize Bar Tracker ...
has = barTraker.Init(
has = ticksBarTracker.Init(
symbol,
period //
);
@@ -1809,6 +1841,8 @@ class XCXCATBEASignaller : XCBase
return;
}
//
//
// Initialize Bar Analyser ...
barAnalyser = new XCBarAnalyser();
@@ -1863,7 +1897,7 @@ class XCXCATBEASignaller : XCBase
ZeroMemory(barAnalyser);
//
barTraker.Clean();
ticksBarTracker.Clean();
}
/**