add support for Trigger Bar Detection in bar analyser class ...

This commit is contained in:
2025-06-04 20:33:14 +03:30
parent f726043c56
commit 44889780aa
4 changed files with 2001 additions and 1004 deletions
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
@@ -1484,6 +1484,17 @@ class XCXCATBEASignaller : XCBase
bool isBasedOnPivotZone = conditions.pivotZone.IsValid(); bool isBasedOnPivotZone = conditions.pivotZone.IsValid();
bool isBasedOnTriggerBlock = conditions.triggerBlock.IsValid(); bool isBasedOnTriggerBlock = conditions.triggerBlock.IsValid();
//
// Reading Current Market Conditions ...
X121XCatbConditions cConditions;
result =
result &&
helper.GetConditions(
cConditions,
barIndex,
10 //
);
// //
// Validate Direction of Setuped Conditions ... // Validate Direction of Setuped Conditions ...
result = result =
@@ -1491,6 +1502,31 @@ class XCXCATBEASignaller : XCBase
(isBullish || (isBullish ||
isBearish); isBearish);
//
// Detecting Trigger Bar ...
//
ENUM_X_DIRECTION triggerDir;
bool isTriggerBar = barAnalyser
.IsValidForTrigger(
bar,
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 7 ...
//
);
bool isBullishTriggerBar =
isTriggerBar &&
IsBullish(triggerDir);
bool isBearishTriggerBar =
isTriggerBar &&
IsBearish(triggerDir);
// //
// Do Triggering Senario based on Trigger Block ... // Do Triggering Senario based on Trigger Block ...
if (result && if (result &&
@@ -1543,6 +1579,10 @@ class XCXCATBEASignaller : XCBase
} }
// //
// Check atleast 3 Bars Close Outside of applied Edge ...
// Check Current Bar is a Trigger Bar ...
// TODO: Complete this ...
//
} }
// //