This commit is contained in:
2025-03-02 04:28:20 +03:30
parent 4602169b1d
commit c9861773ec
9 changed files with 4999 additions and 2024 deletions
+247 -244
View File
@@ -1157,7 +1157,7 @@ class XCPOIDetector : public XCBaseAlert
//
iBar.Clean();
mLock = false;
mBarTracker.Waits();
// mBarTracker.Waits();
//
if (HasChild(events))
@@ -1332,251 +1332,8 @@ class XCPOIDetector : public XCBaseAlert
}
//
protected:
//
//
void CleanCollections()
{
//
Clean(mSwings);
Clean(mSwingLows);
Clean(mSwingHighs);
Clean(mDemandZones);
Clean(mSupplyZones);
Clean(mOrderBlocks);
Clean(mMomentumBars);
Clean(mSupportZones);
Clean(mRejectionBars);
Clean(mFairValueGaps);
Clean(mEventListeners);
Clean(mResistanceZones);
Clean(mBullishOrderBlocks);
Clean(mBearishOrderBlocks);
Clean(mConsolidationZones);
Clean(mBullishMomentumBars);
Clean(mBearishMomentumBars);
Clean(mBullishRejectionBars);
Clean(mBearishRejectionBars);
Clean(mBullishFairValueGaps);
Clean(mBearishFairValueGaps);
Clean(mBullishConsolidationZones);
Clean(mBearishConsolidationZones);
}
//
void ReverseCollections()
{
//
ArrayReverse(mSwings);
ArrayReverse(mSwingLows);
ArrayReverse(mSwingHighs);
ArrayReverse(mDemandZones);
ArrayReverse(mSupplyZones);
ArrayReverse(mOrderBlocks);
ArrayReverse(mMomentumBars);
ArrayReverse(mSupportZones);
ArrayReverse(mRejectionBars);
ArrayReverse(mFairValueGaps);
ArrayReverse(mEventListeners);
ArrayReverse(mResistanceZones);
ArrayReverse(mBullishOrderBlocks);
ArrayReverse(mBearishOrderBlocks);
ArrayReverse(mConsolidationZones);
ArrayReverse(mBullishMomentumBars);
ArrayReverse(mBearishMomentumBars);
ArrayReverse(mBullishRejectionBars);
ArrayReverse(mBearishRejectionBars);
ArrayReverse(mBullishFairValueGaps);
ArrayReverse(mBearishFairValueGaps);
ArrayReverse(mBullishConsolidationZones);
ArrayReverse(mBearishConsolidationZones);
}
//
void CleanupUnusedCollections(
int maxAllowed = 0 //
)
{
//
maxAllowed = MaxRequiredPOIs();
//
if (maxAllowed <= 0)
{
return;
}
//
CleanupArray(
mEventListeners,
maxAllowed //
);
//
CleanupArray(
mSwings,
maxAllowed //
);
//
CleanupArray(
mSwingLows,
maxAllowed //
);
//
CleanupArray(
mSwingHighs,
maxAllowed //
);
//
CleanupArray(
mMomentumBars,
maxAllowed //
);
//
CleanupArray(
mBullishMomentumBars,
maxAllowed //
);
//
CleanupArray(
mBearishMomentumBars,
maxAllowed //
);
//
CleanupArray(
mRejectionBars,
maxAllowed //
);
//
CleanupArray(
mBullishRejectionBars,
maxAllowed //
);
//
CleanupArray(
mBearishRejectionBars,
maxAllowed //
);
//
CleanupArray(
mSupportZones,
maxAllowed //
);
//
CleanupArray(
mDemandZones,
maxAllowed //
);
//
CleanupArray(
mSupplyZones,
maxAllowed //
);
//
CleanupArray(
mResistanceZones,
maxAllowed //
);
//
CleanupArray(
mFairValueGaps,
maxAllowed //
);
//
CleanupArray(
mBullishFairValueGaps,
maxAllowed //
);
//
CleanupArray(
mBearishFairValueGaps,
maxAllowed //
);
//
CleanupArray(
mOrderBlocks,
maxAllowed //
);
//
CleanupArray(
mBullishOrderBlocks,
maxAllowed //
);
//
CleanupArray(
mBearishOrderBlocks,
maxAllowed //
);
//
CleanupArray(
mConsolidationZones,
maxAllowed //
);
//
CleanupArray(
mBullishConsolidationZones,
maxAllowed //
);
//
CleanupArray(
mBearishConsolidationZones,
maxAllowed //
);
//
}
/**
* Notify Event Listeners ...
*
* @param event: ENUM_XPOI_EVENTS member, Specified Occured Event ...
* @param param: XCBasePOI implementation, Specified Event Object ...
*/
void NotifyEventListeners(
ENUM_XPOI_EVENTS event,
XCBasePOI *param //
)
{
//
int count = ArraySize(mEventListeners);
if (!IsValidSize(count))
{
return;
}
//
for (int i = 0; i < count; i++)
{
//
mEventListeners[i](
event,
param //
);
}
}
//
//
//
@@ -3253,6 +3010,252 @@ class XCPOIDetector : public XCBaseAlert
return result;
}
//
protected:
//
//
void CleanCollections()
{
//
Clean(mSwings);
Clean(mSwingLows);
Clean(mSwingHighs);
Clean(mDemandZones);
Clean(mSupplyZones);
Clean(mOrderBlocks);
Clean(mMomentumBars);
Clean(mSupportZones);
Clean(mRejectionBars);
Clean(mFairValueGaps);
Clean(mEventListeners);
Clean(mResistanceZones);
Clean(mBullishOrderBlocks);
Clean(mBearishOrderBlocks);
Clean(mConsolidationZones);
Clean(mBullishMomentumBars);
Clean(mBearishMomentumBars);
Clean(mBullishRejectionBars);
Clean(mBearishRejectionBars);
Clean(mBullishFairValueGaps);
Clean(mBearishFairValueGaps);
Clean(mBullishConsolidationZones);
Clean(mBearishConsolidationZones);
}
//
void ReverseCollections()
{
//
ArrayReverse(mSwings);
ArrayReverse(mSwingLows);
ArrayReverse(mSwingHighs);
ArrayReverse(mDemandZones);
ArrayReverse(mSupplyZones);
ArrayReverse(mOrderBlocks);
ArrayReverse(mMomentumBars);
ArrayReverse(mSupportZones);
ArrayReverse(mRejectionBars);
ArrayReverse(mFairValueGaps);
ArrayReverse(mEventListeners);
ArrayReverse(mResistanceZones);
ArrayReverse(mBullishOrderBlocks);
ArrayReverse(mBearishOrderBlocks);
ArrayReverse(mConsolidationZones);
ArrayReverse(mBullishMomentumBars);
ArrayReverse(mBearishMomentumBars);
ArrayReverse(mBullishRejectionBars);
ArrayReverse(mBearishRejectionBars);
ArrayReverse(mBullishFairValueGaps);
ArrayReverse(mBearishFairValueGaps);
ArrayReverse(mBullishConsolidationZones);
ArrayReverse(mBearishConsolidationZones);
}
//
void CleanupUnusedCollections(
int maxAllowed = 0 //
)
{
//
maxAllowed = MaxRequiredPOIs();
//
if (maxAllowed <= 0)
{
return;
}
//
CleanupArray(
mEventListeners,
maxAllowed //
);
//
CleanupArray(
mSwings,
maxAllowed //
);
//
CleanupArray(
mSwingLows,
maxAllowed //
);
//
CleanupArray(
mSwingHighs,
maxAllowed //
);
//
CleanupArray(
mMomentumBars,
maxAllowed //
);
//
CleanupArray(
mBullishMomentumBars,
maxAllowed //
);
//
CleanupArray(
mBearishMomentumBars,
maxAllowed //
);
//
CleanupArray(
mRejectionBars,
maxAllowed //
);
//
CleanupArray(
mBullishRejectionBars,
maxAllowed //
);
//
CleanupArray(
mBearishRejectionBars,
maxAllowed //
);
//
CleanupArray(
mSupportZones,
maxAllowed //
);
//
CleanupArray(
mDemandZones,
maxAllowed //
);
//
CleanupArray(
mSupplyZones,
maxAllowed //
);
//
CleanupArray(
mResistanceZones,
maxAllowed //
);
//
CleanupArray(
mFairValueGaps,
maxAllowed //
);
//
CleanupArray(
mBullishFairValueGaps,
maxAllowed //
);
//
CleanupArray(
mBearishFairValueGaps,
maxAllowed //
);
//
CleanupArray(
mOrderBlocks,
maxAllowed //
);
//
CleanupArray(
mBullishOrderBlocks,
maxAllowed //
);
//
CleanupArray(
mBearishOrderBlocks,
maxAllowed //
);
//
CleanupArray(
mConsolidationZones,
maxAllowed //
);
//
CleanupArray(
mBullishConsolidationZones,
maxAllowed //
);
//
CleanupArray(
mBearishConsolidationZones,
maxAllowed //
);
//
}
/**
* Notify Event Listeners ...
*
* @param event: ENUM_XPOI_EVENTS member, Specified Occured Event ...
* @param param: XCBasePOI implementation, Specified Event Object ...
*/
void NotifyEventListeners(
ENUM_XPOI_EVENTS event,
XCBasePOI *param //
)
{
//
int count = ArraySize(mEventListeners);
if (!IsValidSize(count))
{
return;
}
//
for (int i = 0; i < count; i++)
{
//
mEventListeners[i](
event,
param //
);
}
}
//
private:
//