This commit is contained in:
2024-12-25 21:11:54 +03:30
parent f20dbaea13
commit c1d35aed03
5 changed files with 1176 additions and 7 deletions
@@ -300,6 +300,17 @@ struct X121SMCStrategyXPVSUPDEMSignalConditions
return result;
}
/**
* Clean Active Zone ...
*/
void CleanActiveZone()
{
//
activeSupplyZone = NULL;
activeDemandZone = NULL;
activeZoneFoundedAt = NULL;
}
/**
* Check Ticks Zone is Initialized or not ...
* @return ( bool )
@@ -527,6 +538,22 @@ bool DetectX121SMCXPVSUPDEMSiganlSetup(
//
// Setup Conditions ...
//
// Detect Market Trend ...
ENUM_X_DIRECTION trend;
bool hasTrend = consolidationCycleHelper
.DetectTrend(trend);
bool hasBullishTrend = hasTrend &&
IsBullish(trend);
bool hasBearishTrend = hasTrend &&
IsBearish(trend);
result = hasBullishTrend ||
hasBearishTrend;
if (!result)
{
return result;
}
//
// Select Source State ...
XPOIState state = consolidationState;
@@ -703,6 +730,28 @@ bool DetectX121SMCXPVSUPDEMSiganlSetup(
//
// Now we Have to Calculate Active Zones Ticks ...
//
bool isValidDemandZone =
hasActiveZone &&
hasBullishTrend &&
IsBullish(activeZoneDir);
//
bool isValidSupplyZone =
hasActiveZone &&
hasBearishTrend &&
IsBearish(activeZoneDir);
//
result = isValidDemandZone ||
isValidSupplyZone;
if (!result)
{
//
conditions.CleanActiveZone();
return result;
}
//
// Select Active Zone ...
XCBarZone *activeZone = NULL;