cleanup x121 helper, apply all cleanup and buffers and conditions on helpers and try to complete x121 new helper ...

This commit is contained in:
2025-03-31 07:04:12 +03:30
parent 7619129c26
commit 53ad7b092a
28 changed files with 14572 additions and 6548 deletions
+55 -42
View File
@@ -245,7 +245,44 @@ struct X121XDELTAConditions
bearishScore = 0;
//
// TODO: Implement if Required ...
double score = 1;
double minScore = 0.5;
double highScore = 1.5;
//
if (isDeltaOverMa)
{
bullishScore += minScore;
}
if (isDeltaBullish)
{
bullishScore += minScore;
}
if (isDeltaCrossedOverMa)
{
bullishScore += score;
}
if (isDeltaSwitchedToBullish)
{
bullishScore += score;
}
if (isDeltaBearish)
{
bearishScore += minScore;
}
if (isDeltaUnderMa)
{
bearishScore += minScore;
}
if (isDeltaCrossedUnderMa)
{
bearishScore += score;
}
if (isDeltaSwitchedToBearish)
{
bearishScore += score;
}
}
/**
@@ -299,6 +336,17 @@ struct X121XDELTAConditions
//
string conditionsStr =
//
"-----------------------" + separator +
"XDELTA: " + separator +
"-----------------------" + separator +
ToString("isDeltaBullish", isDeltaBullish, ignoreFalseConditions, separator) +
ToString("isDeltaBearish", isDeltaBearish, ignoreFalseConditions, separator) +
ToString("isDeltaSwitchedToBullish", isDeltaSwitchedToBullish, ignoreFalseConditions, separator) +
ToString("isDeltaSwitchedToBearish", isDeltaSwitchedToBearish, ignoreFalseConditions, separator) +
ToString("isDeltaOverMa", isDeltaOverMa, ignoreFalseConditions, separator) +
ToString("isDeltaUnderMa", isDeltaUnderMa, ignoreFalseConditions, separator) +
ToString("isDeltaCrossedOverMa", isDeltaCrossedOverMa, ignoreFalseConditions, separator) +
ToString("isDeltaCrossedUnderMa", isDeltaCrossedUnderMa, ignoreFalseConditions, separator) +
//
""
//
@@ -607,6 +655,12 @@ class XCX121XDELTAHelper : public XCBaseHelper
);
}
//
void Free() override
{
Cleanup(10);
}
//
bool GetConditions(
X121XDELTAConditions &conditions, //
@@ -637,42 +691,6 @@ class XCX121XDELTAHelper : public XCBaseHelper
int pIndex = cIndex + 1;
int ppIndex = pIndex + 1;
//
XOHCL zBar;
result = zBar.Init(
mSymbol,
mPeriod,
zIndex //
);
if (!result)
{
return result;
}
//
XOHCL cBar;
result = cBar.Init(
mSymbol,
mPeriod,
cIndex //
);
if (!result)
{
return result;
}
//
XOHCL pBar;
result = pBar.Init(
mSymbol,
mPeriod,
pIndex //
);
if (!result)
{
return result;
}
//
// Buffers ...
@@ -744,11 +762,6 @@ class XCX121XDELTAHelper : public XCBaseHelper
//
Cleanup();
//
zBar.Clean();
cBar.Clean();
pBar.Clean();
//
return result;
}