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
+77 -18
View File
@@ -1202,6 +1202,14 @@ class XCX121XDONHelper : public XCBaseHelper
conditions.isBreakedDonCloseLower = isBreakedDonCloseLower;
conditions.isRejectedDonCloseUpper = isRejectedDonCloseUpper;
conditions.isRejectedDonCloseLower = isRejectedDonCloseLower;
//
Cleanup();
//
zBar.Clean();
cBar.Clean();
pBar.Clean();
//
return result;
@@ -1229,24 +1237,17 @@ class XCX121XDONHelper : public XCBaseHelper
double donCloseLowerBuffer[];
//
void Calculate()
void Calculate(
int maxRequiredBars = 100 //
)
{
//
int totalBars = CountBars();
if (totalBars > 1000)
{
totalBars = 1000;
}
//
// OPEN ...
//
// Upper ...
CopyBuffer(
mHandler,
X121_XDON_OPEN_UPPER_LINE,
0,
totalBars,
maxRequiredBars,
donOpenUpperBuffer
//
);
@@ -1257,7 +1258,7 @@ class XCX121XDONHelper : public XCBaseHelper
mHandler,
X121_XDON_OPEN_LOWER_LINE,
0,
totalBars,
maxRequiredBars,
donOpenLowerBuffer
//
);
@@ -1271,7 +1272,7 @@ class XCX121XDONHelper : public XCBaseHelper
mHandler,
X121_XDON_CLOSE_UPPER_LINE,
0,
totalBars,
maxRequiredBars,
donCloseUpperBuffer
//
);
@@ -1282,7 +1283,7 @@ class XCX121XDONHelper : public XCBaseHelper
mHandler,
X121_XDON_CLOSE_LOWER_LINE,
0,
totalBars,
maxRequiredBars,
donCloseLowerBuffer
//
);
@@ -1296,7 +1297,7 @@ class XCX121XDONHelper : public XCBaseHelper
mHandler,
X121_XDON_HIGH_UPPER_LINE,
0,
totalBars,
maxRequiredBars,
donHighUpperBuffer
//
);
@@ -1307,7 +1308,7 @@ class XCX121XDONHelper : public XCBaseHelper
mHandler,
X121_XDON_HIGH_LOWER_LINE,
0,
totalBars,
maxRequiredBars,
donHighLowerBuffer
//
);
@@ -1321,7 +1322,7 @@ class XCX121XDONHelper : public XCBaseHelper
mHandler,
X121_XDON_LOW_UPPER_LINE,
0,
totalBars,
maxRequiredBars,
donLowUpperBuffer
//
);
@@ -1332,11 +1333,69 @@ class XCX121XDONHelper : public XCBaseHelper
mHandler,
X121_XDON_LOW_LOWER_LINE,
0,
totalBars,
maxRequiredBars,
donLowLowerBuffer
//
);
}
//
void Cleanup(
int maxAllowed = 100 //
)
{
//
CleanupArray(
donOpenUpperBuffer,
maxAllowed //
);
//
CleanupArray(
donOpenLowerBuffer,
maxAllowed //
);
//
CleanupArray(
donHighUpperBuffer,
maxAllowed //
);
//
CleanupArray(
donHighLowerBuffer,
maxAllowed //
);
//
CleanupArray(
donLowUpperBuffer,
maxAllowed //
);
//
CleanupArray(
donLowLowerBuffer,
maxAllowed //
);
//
CleanupArray(
donCloseUpperBuffer,
maxAllowed //
);
//
CleanupArray(
donCloseLowerBuffer,
maxAllowed //
);
//
}
//
};
//