This commit is contained in:
2025-05-10 03:27:45 +03:30
parent f49231eeb2
commit c378ce4b4e
6 changed files with 1384 additions and 11 deletions
+119 -10
View File
@@ -591,6 +591,7 @@ class XCXCAEASignaller : XCBase
int ppIndex = pIndex + 1;
//
bool has = false;
int loopback = 10;
//
@@ -618,16 +619,87 @@ class XCXCAEASignaller : XCBase
double tp = 0;
ENUM_X_DIRECTION triggerDir = X_DIRECTION_NONE;
//
// Detect All Inside Directional FVGs ...
XBoxZone fvgs[];
int toIDX = conditions.decisionZone.ToIndex();
int fromIDX = conditions.decisionZone.FromIndex();
for (int i = fromIDX; i > toIDX; i--)
{
//
XOHCL iBar;
XBoxZone iFVG;
//
// Initialize iBar ...
has = iBar.Init(
conditions.symbol,
conditions.period,
i //
);
if (!has)
{
//
iFVG.Clean();
iBar.Clean();
//
continue;
}
//
// Check iBar has FVG ...
has = helper
.barAnalyser
.IsFVG(
iBar,
iFVG,
true //
);
if (!has)
{
//
iBar.Clean();
iFVG.Clean();
//
continue;
}
//
// Check FVG Direction and Placement ...
has =
iFVG.dir == conditions.decisionZone.dir &&
iFVG.upper < conditions.decisionZone.upper &&
iFVG.lower > conditions.decisionZone.lower;
if (has)
{
//
iFVG.to = cTime;
AddRef(
iFVG,
fvgs //
);
}
//
iBar.Clean();
iFVG.Clean();
}
bool hasFVGs = HasChild(fvgs);
int fvgsCount = ArraySize(fvgs);
//
// Checking Trigger Cond 0 ...
bool canTriggerCond0 = CanTriggerCond0(
helper,
conditions.decisionZone,
triggerDir,
sl,
tp,
barIndex //
);
bool canTriggerCond0 = false;
// CanTriggerCond0(
// helper,
// conditions.decisionZone,
// triggerDir,
// sl,
// tp,
// barIndex //
// );
//
// Checking Trigger Cond 1 ...
@@ -653,13 +725,25 @@ class XCXCAEASignaller : XCBase
// barIndex //
// );
//
// Checking Trigger Cond 3 ...
bool canTriggerCond3 = CanTriggerCond3(
helper,
conditions.decisionZone,
triggerDir,
sl,
tp,
barIndex //
);
//
// Update Signal Box To ...
conditions.decisionZone.to = cTime;
//
// Draw Decision Zone ...
XCBoxObject *iObj;
bool has = helper.poiDrawer.DrawBox(
has = helper.poiDrawer.DrawBox(
conditions.decisionZone,
iObj //
);
@@ -669,12 +753,37 @@ class XCXCAEASignaller : XCBase
}
ZeroMemory(iObj);
//
// Draw FVGs ...
if (hasFVGs)
{
//
for (int i = 0; i < fvgsCount; i++)
{
//
fvgs[i].to = cTime;
//
XCBoxObject *iObj;
has = helper.poiDrawer.DrawBox(
fvgs[i],
iObj //
);
if (has)
{
mObjects.Add(iObj);
}
ZeroMemory(iObj);
}
}
//
// Summarizing Result ...
result =
canTriggerCond0 ||
canTriggerCond1 ||
canTriggerCond2;
canTriggerCond2 ||
canTriggerCond3;
//
isBullish = result &&