This commit is contained in:
2025-01-11 19:09:20 +03:30
parent c6cfd9b115
commit 83694f54ff
9 changed files with 2184 additions and 427 deletions
+53
View File
@@ -743,6 +743,59 @@ class XCX121XSTRHelper : public XCBaseHelper
);
}
//
double GetLastSTR(
ENUM_X_DIRECTION dir,
int barIndex = 0 //
)
{
//
double result = 0;
//
if (barIndex < 0)
{
barIndex = 0;
}
//
if (!HasDirection(dir))
{
return result;
}
//
int index = barIndex;
bool isBullish = IsBullish(dir);
//
bool canContinue = true;
while (canContinue)
{
//
double iStr = GetSTR(index);
double iState = GetSTRState(index);
//
canContinue =
isBullish
? iState < 0
: iState > 0;
if (!canContinue)
{
//
result = iStr;
break;
}
//
index++;
}
//
return result;
}
//
bool GetConditions(
X121XSTRConditions &conditions, //