This commit is contained in:
2025-03-25 21:46:48 +03:30
parent 9c034fce4f
commit a5511f2f69
8 changed files with 4933 additions and 788 deletions
@@ -190,87 +190,87 @@ class XCX121SMCXWZSignalDetector : public XCBase
//
// First We Have to Has Working Zone ...
bool hasWorkingZone = workingZone.IsValid();
if (!hasWorkingZone)
{
//
hasWorkingZone = workingZone.Init(
symbol,
period,
zIndex,
provider //
);
}
// bool hasWorkingZone = workingZone.IsValid();
// if (!hasWorkingZone)
// {
// //
// hasWorkingZone = workingZone.Init(
// symbol,
// period,
// zIndex,
// provider //
// );
// }
//
// Update Working Zone ...
if (hasWorkingZone)
{
//
// Reset POI Detector Required POI(s) ...
provider.MaxRequiredPOIs(50);
// //
// // Update Working Zone ...
// if (hasWorkingZone)
// {
// //
// // Reset POI Detector Required POI(s) ...
// provider.MaxRequiredPOIs(50);
//
// Reset POI Detector Allowed Loopback ...
provider.MaxAllowedLoopbackForInit(578);
// //
// // Reset POI Detector Allowed Loopback ...
// provider.MaxAllowedLoopbackForInit(578);
//
// Check Working Zone Has Trend ...
hasTrend = workingZone.DetectTreand(
X_CYCLE_CONSOLIDATION,
trend,
provider,
zIndex //
);
// //
// // Check Working Zone Has Trend ...
// hasTrend = workingZone.DetectTreand(
// X_CYCLE_CONSOLIDATION,
// trend,
// provider,
// zIndex //
// );
//
// Detectiong Signal Boxes ...
hasWaitingBoxes = workingZone
.DetectWaitingBoxes(
X_CYCLE_ANALYSE,
X_CYCLE_DECISION,
provider,
zIndex //
);
if (hasWaitingBoxes)
{
//
// Validate Working Zone Waiting Boxes ...
workingZone.ValidateWaitingBoxes(zIndex);
// //
// // Detectiong Signal Boxes ...
// // hasWaitingBoxes = workingZone
// // .DetectWaitingBoxes(
// // X_CYCLE_ANALYSE,
// // X_CYCLE_DECISION,
// // provider,
// // zIndex //
// // );
// if (hasWaitingBoxes)
// {
// //
// // Validate Working Zone Waiting Boxes ...
// workingZone.ValidateWaitingBoxes(zIndex);
//
// Double Check Has Waiting Boxes or not ...
hasWaitingBoxes = workingZone.HasWaitingBoxes();
}
// //
// // Double Check Has Waiting Boxes or not ...
// hasWaitingBoxes = workingZone.HasWaitingBoxes();
// }
//
// Checking Working Zone Destory or not ...
bool isWorkingZoneDestroyed = workingZone.IsDestroyed(
zIndex,
period //
);
// //
// // Checking Working Zone Destory or not ...
// bool isWorkingZoneDestroyed = workingZone.IsDestroyed(
// zIndex,
// period //
// );
//
// Cleanup WorkingZone and ignore all conditions ...
if (isWorkingZoneDestroyed)
{
//
result = false;
workingZone.Clean();
hasWorkingZone = false;
// //
// // Cleanup WorkingZone and ignore all conditions ...
// if (isWorkingZoneDestroyed)
// {
// //
// result = false;
// workingZone.Clean();
// hasWorkingZone = false;
//
// Cleanup Resources ...
provider.Clean();
// //
// // Cleanup Resources ...
// provider.Clean();
//
mConditions.Clean();
consolidationZBar.Clean();
// //
// mConditions.Clean();
// consolidationZBar.Clean();
//
return result;
}
}
// //
// return result;
// }
// }
//
// Update Models To Time ...
@@ -290,7 +290,7 @@ class XCX121SMCXWZSignalDetector : public XCBase
//
// Detect Signal Box ...
hasSignalBox =
hasWorkingZone &&
// hasWorkingZone &&
workingZone.DetectSignalConditions(
signalBox,
signalBoxDir,
@@ -377,25 +377,25 @@ class XCX121SMCXWZSignalDetector : public XCBase
//
// Check Priority Exists ...
hasPriority =
hasWorkingZone &&
workingZone
.DetectPriority(
priority,
signalBoxDir,
zIndex,
period //
);
// hasPriority =
// hasWorkingZone &&
// workingZone
// .DetectPriority(
// priority,
// signalBoxDir,
// zIndex,
// period //
// );
//
// Check Price Reward and Amount Exists ...
hasRewardAmount =
hasWorkingZone &&
CalculateRiskReward(
priority,
reward,
amountPercent //
);
// hasRewardAmount =
// hasWorkingZone &&
// CalculateRiskReward(
// priority,
// reward,
// amountPercent //
// );
//
// Check Signal Conditions ...
@@ -839,9 +839,10 @@ class XCX121SMCXWZSignalDetector : public XCBase
//
// Summarize Results ...
result = hasPriority &&
hasSignalBox &&
hasRewardAmount;
// result = hasPriority &&
// hasSignalBox &&
// hasRewardAmount;
result = hasSignalBox;
//
if (result)
+31 -5
View File
@@ -31,6 +31,7 @@
enum ENUM_X121SMC_XWZ_PROVIDERS
{
X121SMC_XWZ_PROVIDER_NONE,
X121SMC_XWZ_PROVIDER_XWPVZ,
X121SMC_XWZ_PROVIDER_XFVGMA,
X121SMC_XWZ_PROVIDER_XBREAKED_BOX,
X121SMC_XWZ_PROVIDER_XREJECTED_BOX,
@@ -1929,7 +1930,7 @@ struct X121SMCStrategyXWZWorkingZone
// ---------------------------------------------
// Rejected Box ...
// ---------------------------------------------
bool useSenario1 = true;
bool useSenario1 = false;
bool isSenario1Happend = false;
bool isSenario1Bullish = false;
bool isSenario1Bearish = false;
@@ -1967,7 +1968,7 @@ struct X121SMCStrategyXWZWorkingZone
// ---------------------------------------------------
// Activated Box ...
// ---------------------------------------------------
bool useSenario2 = true;
bool useSenario2 = false;
bool isSenario2Happend = false;
bool isSenario2Bullish = false;
bool isSenario2Bearish = false;
@@ -2006,7 +2007,7 @@ struct X121SMCStrategyXWZWorkingZone
// ---------------------------------------------------
// Breaked Box ...
// ---------------------------------------------------
bool useSenario3 = true;
bool useSenario3 = false;
bool isSenario3Happend = false;
bool isSenario3Bullish = false;
bool isSenario3Bearish = false;
@@ -2046,7 +2047,7 @@ struct X121SMCStrategyXWZWorkingZone
// -----------------------------------------------
// Detect Signal Box Based On FVG Conditions ...
// -----------------------------------------------
bool useSenario4 = true;
bool useSenario4 = false;
bool isSenario4Happend = false;
bool isSenario4Bullish = false;
bool isSenario4Bearish = false;
@@ -2085,8 +2086,9 @@ struct X121SMCStrategyXWZWorkingZone
//
// Senario 5:
// ---------------------------------------------
// XWPVZ ...
// ---------------------------------------------
bool useSenario5 = false;
bool useSenario5 = true;
bool isSenario5Happend = false;
bool isSenario5Bullish = false;
bool isSenario5Bearish = false;
@@ -2096,6 +2098,30 @@ struct X121SMCStrategyXWZWorkingZone
!isSenario4Happend &&
useSenario5)
{
//
isSenario5Happend = cParser.HasXWPVZConditions(
X_CYCLE_DECISION,
box,
dir,
provider,
barIndex //
);
//
isSenario5Bullish =
isSenario5Happend &&
IsBullish(dir);
//
isSenario5Bearish =
isSenario5Happend &&
IsBearish(dir);
//
if (isSenario5Happend)
{
signalProvider = X121SMC_XWZ_PROVIDER_XWPVZ;
}
}
//