try to cleanup unused items in indicator's Helper Classes ...

This commit is contained in:
2025-02-12 14:24:18 +03:30
parent 28eb1233b1
commit 9f21ad0dd8
10 changed files with 11240 additions and 138 deletions
+112 -21
View File
@@ -2069,6 +2069,14 @@ class XCX121XPVHelper : public XCBaseHelper
conditions.isNewValeUnderLast = isNewValeUnderLast;
conditions.isRejectedPrevVale = isRejectedPrevVale;
conditions.isBreakedDownPrevVale = isBreakedDownPrevVale;
//
Cleanup();
//
zBar.Clean();
cBar.Clean();
pBar.Clean();
//
return result;
@@ -2101,15 +2109,10 @@ class XCX121XPVHelper : public XCBaseHelper
double hLLBuffer[];
//
void Calculate()
void Calculate(
int maxRequiredBars = 100 //
)
{
//
int totalBars = CountBars();
if (totalBars > 1000)
{
totalBars = 1000;
}
//
// Buffers ...
@@ -2119,7 +2122,7 @@ class XCX121XPVHelper : public XCBaseHelper
mHandler,
X121_XPV_SAR_LINE,
0,
totalBars,
maxRequiredBars,
sarBuffer
//
);
@@ -2133,7 +2136,7 @@ class XCX121XPVHelper : public XCBaseHelper
mHandler,
X121_XPV_PEAK_LINE,
0,
totalBars,
maxRequiredBars,
peaksBuffer
//
);
@@ -2144,7 +2147,7 @@ class XCX121XPVHelper : public XCBaseHelper
mHandler,
X121_XPV_VALE_LINE,
0,
totalBars,
maxRequiredBars,
valesBuffer
//
);
@@ -2158,7 +2161,7 @@ class XCX121XPVHelper : public XCBaseHelper
mHandler,
X121_XPV_C_HH_LINE,
0,
totalBars,
maxRequiredBars,
cHHBuffer
//
);
@@ -2169,7 +2172,7 @@ class XCX121XPVHelper : public XCBaseHelper
mHandler,
X121_XPV_C_LL_LINE,
0,
totalBars,
maxRequiredBars,
cLLBuffer
//
);
@@ -2183,7 +2186,7 @@ class XCX121XPVHelper : public XCBaseHelper
mHandler,
X121_XPV_S_HH_LINE,
0,
totalBars,
maxRequiredBars,
sHHBuffer
//
);
@@ -2194,7 +2197,7 @@ class XCX121XPVHelper : public XCBaseHelper
mHandler,
X121_XPV_S_LL_LINE,
0,
totalBars,
maxRequiredBars,
sLLBuffer
//
);
@@ -2208,7 +2211,7 @@ class XCX121XPVHelper : public XCBaseHelper
mHandler,
X121_XPV_M_HH_LINE,
0,
totalBars,
maxRequiredBars,
mHHBuffer
//
);
@@ -2219,7 +2222,7 @@ class XCX121XPVHelper : public XCBaseHelper
mHandler,
X121_XPV_M_LL_LINE,
0,
totalBars,
maxRequiredBars,
mLLBuffer
//
);
@@ -2233,7 +2236,7 @@ class XCX121XPVHelper : public XCBaseHelper
mHandler,
X121_XPV_L_HH_LINE,
0,
totalBars,
maxRequiredBars,
lHHBuffer
//
);
@@ -2244,7 +2247,7 @@ class XCX121XPVHelper : public XCBaseHelper
mHandler,
X121_XPV_L_LL_LINE,
0,
totalBars,
maxRequiredBars,
lLLBuffer
//
);
@@ -2258,7 +2261,7 @@ class XCX121XPVHelper : public XCBaseHelper
mHandler,
X121_XPV_H_HH_LINE,
0,
totalBars,
maxRequiredBars,
hHHBuffer
//
);
@@ -2269,11 +2272,99 @@ class XCX121XPVHelper : public XCBaseHelper
mHandler,
X121_XPV_H_LL_LINE,
0,
totalBars,
maxRequiredBars,
hLLBuffer
//
);
}
//
void Cleanup(
int maxAllowed = 100 //
)
{
//
CleanupArray(
peaksBuffer,
maxAllowed //
);
//
CleanupArray(
valesBuffer,
maxAllowed //
);
//
CleanupArray(
sarBuffer,
maxAllowed //
);
//
CleanupArray(
cHHBuffer,
maxAllowed //
);
//
CleanupArray(
cLLBuffer,
maxAllowed //
);
//
CleanupArray(
sHHBuffer,
maxAllowed //
);
//
CleanupArray(
sLLBuffer,
maxAllowed //
);
//
CleanupArray(
mHHBuffer,
maxAllowed //
);
//
CleanupArray(
mLLBuffer,
maxAllowed //
);
//
CleanupArray(
lHHBuffer,
maxAllowed //
);
//
CleanupArray(
lLLBuffer,
maxAllowed //
);
//
CleanupArray(
hHHBuffer,
maxAllowed //
);
//
CleanupArray(
hLLBuffer,
maxAllowed //
);
//
}
//
};
//