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
File diff suppressed because it is too large Load Diff
@@ -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;
}
}
//
+21 -11
View File
@@ -755,7 +755,7 @@ class XCX121SMCStrategy : public XCX121SMCBaseStrategy
//
x121Inputs.xatrInputs.atrMultiplier = 1.5;
x121Inputs.xatrInputs.atrSmoothingMode = X_MA_MODE_NONE;
x121Inputs.xatrInputs.atrSmoothingMode = X_MA_MODE_EMA;
x121Inputs.xpvInputs.goldenZoneLevel = X_FIBO_LEVEL_236;
//
@@ -768,6 +768,16 @@ class XCX121SMCStrategy : public XCX121SMCBaseStrategy
x121Inputs.x3maInputs.x3maMidMALength = 50;
x121Inputs.x3maInputs.x3maSlowMALength = 200;
//
// x121Inputs.xcheInputs.cheLength = 14;
// x121Inputs.xcheInputs.cheLoopback = 7;
// x121Inputs.xcheInputs.cheMultiplier1 = 1.5;
// x121Inputs.xcheInputs.cheMultiplier2 = 2;
//
// x121Inputs.xstrInputs.strLength = 14;
// x121Inputs.xstrInputs.strMultiplier = 1.5;
//
// x121Inputs.xccInputs.upColor = clrLime;
// x121Inputs.xccInputs.downColor = clrRed;
@@ -786,12 +796,12 @@ class XCX121SMCStrategy : public XCX121SMCBaseStrategy
//
// XPV ...
x121Inputs.xpvInputs.showSar = showAll || false;
x121Inputs.xpvInputs.showPeaks = showAll || false;
x121Inputs.xpvInputs.showVales = showAll || false;
x121Inputs.xpvInputs.showSar = showAll || true;
x121Inputs.xpvInputs.showPeaks = showAll || true;
x121Inputs.xpvInputs.showVales = showAll || true;
x121Inputs.xpvInputs.showSupports = showAll || false;
x121Inputs.xpvInputs.showResistances = showAll || false;
x121Inputs.xpvInputs.showGoldenZones = showAll || false;
x121Inputs.xpvInputs.showGoldenZones = showAll || true;
//
// XHK ...
@@ -804,9 +814,9 @@ class XCX121SMCStrategy : public XCX121SMCBaseStrategy
// XMAS ...
//
x121Inputs.xmasInputs.showUpper = showAll || false;
x121Inputs.xmasInputs.showMid = showAll || false;
x121Inputs.xmasInputs.showLower = showAll || false;
x121Inputs.xmasInputs.showUpper = showAll || true;
x121Inputs.xmasInputs.showMid = showAll || true;
x121Inputs.xmasInputs.showLower = showAll || true;
//
// XATR ...
@@ -835,9 +845,9 @@ class XCX121SMCStrategy : public XCX121SMCBaseStrategy
//
// XVWAP ...
x121Inputs.xvwapInputs.showVWapFast = showAll || true;
x121Inputs.xvwapInputs.showVWapMedium = showAll || true;
x121Inputs.xvwapInputs.showVWapSlow = showAll || true;
x121Inputs.xvwapInputs.showVWapFast = showAll || false;
x121Inputs.xvwapInputs.showVWapMedium = showAll || false;
x121Inputs.xvwapInputs.showVWapSlow = showAll || false;
//
// X3MA ...