try to cleanup unused items in indicator's Helper Classes ...
This commit is contained in:
@@ -1218,9 +1218,9 @@ class XCX121XHKHelper : public XCBaseHelper
|
||||
|
||||
//
|
||||
bool isSMHKSwitchedToBearish = isSMHKBearish &&
|
||||
!isSMHKBearishPrev;
|
||||
!isSMHKBearishPrev;
|
||||
bool isRawHKSwitchedToBearish = isRawHKBearish &&
|
||||
!isRawHKBearishPrev;
|
||||
!isRawHKBearishPrev;
|
||||
|
||||
//
|
||||
bool isClosedOverSMHK = cBar.close > smHKUp;
|
||||
@@ -1321,7 +1321,18 @@ class XCX121XHKHelper : public XCBaseHelper
|
||||
conditions.isRejectedDownSMHK = isRejectedDownSMHK;
|
||||
conditions.isRejectedDownRawHK = isRejectedDownRawHK;
|
||||
conditions.isRawHKBreakedDownSMHK = isRawHKBreakedDownSMHK;
|
||||
|
||||
//
|
||||
Cleanup();
|
||||
|
||||
//
|
||||
zBar.Clean();
|
||||
cBar.Clean();
|
||||
pBar.Clean();
|
||||
|
||||
//
|
||||
rawHKCBar.Clean();
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
@@ -1348,15 +1359,10 @@ class XCX121XHKHelper : public XCBaseHelper
|
||||
double xhkSMCloseBuffer[];
|
||||
|
||||
//
|
||||
void Calculate()
|
||||
void Calculate(
|
||||
int maxRequiredBars = 100 //
|
||||
)
|
||||
{
|
||||
//
|
||||
int totalBars = CountBars();
|
||||
if (totalBars > 1000)
|
||||
{
|
||||
totalBars = 1000;
|
||||
}
|
||||
|
||||
//
|
||||
// Buffers ...
|
||||
|
||||
@@ -1366,7 +1372,7 @@ class XCX121XHKHelper : public XCBaseHelper
|
||||
mHandler,
|
||||
X121_XHK_RAW_OPEN_LINE,
|
||||
0,
|
||||
totalBars,
|
||||
maxRequiredBars,
|
||||
xhkRawOpenBuffer
|
||||
//
|
||||
);
|
||||
@@ -1377,7 +1383,7 @@ class XCX121XHKHelper : public XCBaseHelper
|
||||
mHandler,
|
||||
X121_XHK_RAW_HIGH_LINE,
|
||||
0,
|
||||
totalBars,
|
||||
maxRequiredBars,
|
||||
xhkRawHighBuffer
|
||||
//
|
||||
);
|
||||
@@ -1388,7 +1394,7 @@ class XCX121XHKHelper : public XCBaseHelper
|
||||
mHandler,
|
||||
X121_XHK_RAW_LOW_LINE,
|
||||
0,
|
||||
totalBars,
|
||||
maxRequiredBars,
|
||||
xhkRawLowBuffer
|
||||
//
|
||||
);
|
||||
@@ -1399,7 +1405,7 @@ class XCX121XHKHelper : public XCBaseHelper
|
||||
mHandler,
|
||||
X121_XHK_RAW_CLOSE_LINE,
|
||||
0,
|
||||
totalBars,
|
||||
maxRequiredBars,
|
||||
xhkRawCloseBuffer
|
||||
//
|
||||
);
|
||||
@@ -1410,7 +1416,7 @@ class XCX121XHKHelper : public XCBaseHelper
|
||||
mHandler,
|
||||
X121_XHK_SM_OPEN_LINE,
|
||||
0,
|
||||
totalBars,
|
||||
maxRequiredBars,
|
||||
xhkSMOpenBuffer
|
||||
//
|
||||
);
|
||||
@@ -1421,7 +1427,7 @@ class XCX121XHKHelper : public XCBaseHelper
|
||||
mHandler,
|
||||
X121_XHK_SM_HIGH_LINE,
|
||||
0,
|
||||
totalBars,
|
||||
maxRequiredBars,
|
||||
xhkSMHighBuffer
|
||||
//
|
||||
);
|
||||
@@ -1432,7 +1438,7 @@ class XCX121XHKHelper : public XCBaseHelper
|
||||
mHandler,
|
||||
X121_XHK_SM_LOW_LINE,
|
||||
0,
|
||||
totalBars,
|
||||
maxRequiredBars,
|
||||
xhkSMLowBuffer
|
||||
//
|
||||
);
|
||||
@@ -1443,11 +1449,69 @@ class XCX121XHKHelper : public XCBaseHelper
|
||||
mHandler,
|
||||
X121_XHK_SM_CLOSE_LINE,
|
||||
0,
|
||||
totalBars,
|
||||
maxRequiredBars,
|
||||
xhkSMCloseBuffer
|
||||
//
|
||||
);
|
||||
}
|
||||
|
||||
//
|
||||
void Cleanup(
|
||||
int maxAllowed = 100 //
|
||||
)
|
||||
{
|
||||
//
|
||||
CleanupArray(
|
||||
xhkRawOpenBuffer,
|
||||
maxAllowed //
|
||||
);
|
||||
|
||||
//
|
||||
CleanupArray(
|
||||
xhkRawHighBuffer,
|
||||
maxAllowed //
|
||||
);
|
||||
|
||||
//
|
||||
CleanupArray(
|
||||
xhkRawLowBuffer,
|
||||
maxAllowed //
|
||||
);
|
||||
|
||||
//
|
||||
CleanupArray(
|
||||
xhkRawCloseBuffer,
|
||||
maxAllowed //
|
||||
);
|
||||
|
||||
//
|
||||
CleanupArray(
|
||||
xhkSMOpenBuffer,
|
||||
maxAllowed //
|
||||
);
|
||||
|
||||
//
|
||||
CleanupArray(
|
||||
xhkSMHighBuffer,
|
||||
maxAllowed //
|
||||
);
|
||||
|
||||
//
|
||||
CleanupArray(
|
||||
xhkSMLowBuffer,
|
||||
maxAllowed //
|
||||
);
|
||||
|
||||
//
|
||||
CleanupArray(
|
||||
xhkSMCloseBuffer,
|
||||
maxAllowed //
|
||||
);
|
||||
|
||||
//
|
||||
}
|
||||
|
||||
//
|
||||
};
|
||||
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user