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)