This commit is contained in:
2025-05-12 18:32:47 +03:30
parent a02bf1ba13
commit c927f50934
3 changed files with 258 additions and 46 deletions
+42 -33
View File
@@ -1253,6 +1253,7 @@ bool CanTriggerCond0(
ENUM_X_DIRECTION &dir,
double &sl,
double &tp,
CArrayObj *drawns,
int barIndex = 0,
int loopback = 5,
double scorePassMultiplier = 1 //
@@ -1519,6 +1520,7 @@ bool CanTriggerCond1(
ENUM_X_DIRECTION &dir,
double &sl,
double &tp,
CArrayObj *drawns,
int barIndex = 0,
int loopback = 10 //
)
@@ -1625,13 +1627,15 @@ bool CanTriggerCond1(
//
// Detect Trigger Based On Decision Zone's
// Box Starts With FVG ...
// Using OB inside Boxes ...
bool CanTriggerCond2(
XCXCAEAHelper *helper,
XBoxZone &box,
XBoxZone &decisionZone,
XBoxZone &decisionPivots[],
ENUM_X_DIRECTION &dir,
double &sl,
double &tp,
CArrayObj *drawns,
int barIndex = 0,
int loopback = 10 //
)
@@ -1649,7 +1653,7 @@ bool CanTriggerCond2(
//
// Validate Decision Box ...
result = box.IsValid() &&
result = decisionZone.IsValid() &&
helper != NULL;
if (!result)
{
@@ -1657,40 +1661,33 @@ bool CanTriggerCond2(
}
//
XBoxZone activatedFVG;
bool hasActivatedFVG = IsBoxHasActivatedFVG(
helper,
box,
activatedFVG,
barIndex,
loopback //
);
bool has = false;
bool hasPivots = HasChild(decisionPivots);
int pivotsCount = ArraySize(decisionPivots);
//
bool hasBullishActivatedFVG =
hasActivatedFVG &&
activatedFVG.IsBullish();
//
bool hasBearishActivatedFVG =
hasActivatedFVG &&
activatedFVG.IsBearish();
//
if (hasActivatedFVG)
// Draw Decision Pivots ...
if (hasPivots)
{
//
// Preparing TP and SL ...
for (int i = 0; i < pivotsCount; i++)
{
//
XCBoxObject *iObj;
//
sl = hasBullishActivatedFVG
? box.lower // activatedFVG.lower
: box.upper; // activatedFVG.upper;
//
has = helper.poiDrawer.DrawBox(
decisionPivots[i],
iObj //
);
if (has)
{
drawns.Add(iObj);
}
//
// Since Here TP Must Calculated
// Using R2R we Ignore Target ...
tp = 0;
//
ZeroMemory(iObj);
}
}
//
@@ -1698,11 +1695,11 @@ bool CanTriggerCond2(
//
bool canTriggerLong =
hasBullishActivatedFVG;
false;
//
bool canTriggerShort =
hasBearishActivatedFVG;
false;
//
result = canTriggerLong ||
@@ -1713,6 +1710,18 @@ bool CanTriggerCond2(
dir = canTriggerLong
? X_DIRECTION_BULLISH
: X_DIRECTION_BEARISH;
//
// Preparing TP and SL ...
//
sl = canTriggerLong
? decisionZone.lower // activatedFVG.lower
: decisionZone.upper; // activatedFVG.upper;
//
// Since Here TP Must Calculated
// Using R2R we Ignore Target ...
tp = 0;
}
//