last ...
This commit is contained in:
@@ -299,16 +299,16 @@ class XC121SMCCycleHelper : public XCBase
|
||||
string symbol,
|
||||
ENUM_TIMEFRAMES period,
|
||||
X121Inputs &x121Inputs,
|
||||
int requiredPOIS = 50 //
|
||||
int requiredPOIs = 50 //
|
||||
)
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
if (requiredPOIS < 10)
|
||||
if (requiredPOIs < 10)
|
||||
{
|
||||
requiredPOIS = 10;
|
||||
requiredPOIs = 10;
|
||||
}
|
||||
|
||||
//
|
||||
@@ -341,8 +341,21 @@ class XC121SMCCycleHelper : public XCBase
|
||||
symbol,
|
||||
period //
|
||||
);
|
||||
mPOIDetector.MaxNumberOfPOIs(requiredPOIS);
|
||||
mPOIDetector.MaxNumberOfRequiredPOIs(requiredPOIS);
|
||||
mPOIDetector.MaxRequiredPOIs(requiredPOIs);
|
||||
|
||||
//
|
||||
int maxLoopbackBars = mPOIDetector.MaxAllowedLoopbackForInit();
|
||||
int periodSeconds = PeriodSeconds(period);
|
||||
if (periodSeconds > PeriodSeconds(PERIOD_M15)) {
|
||||
//
|
||||
int multiplier = periodSeconds / PeriodSeconds(PERIOD_M15);
|
||||
|
||||
//
|
||||
if (multiplier >= 1) {
|
||||
maxLoopbackBars *= 2;
|
||||
}
|
||||
}
|
||||
mPOIDetector.MaxAllowedLoopbackForInit(maxLoopbackBars);
|
||||
mPOIDetector.Init();
|
||||
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user