This commit is contained in:
2026-01-04 16:00:35 +03:30
parent 3c26c9c418
commit 9fc8892c5d
5 changed files with 1181 additions and 278 deletions
@@ -925,6 +925,70 @@ class XCX121XKIHelperParser : XCBase
//
return result;
}
bool IsVolatilitySwitchdToHigh(int barIndex = 0)
{
//
bool result = false;
//
// Normalize ...
barIndex = NormalizeBarIndex(barIndex);
//
// Validate ...
result = IsValid();
if (!result)
{
return result;
}
//
double atr = helper.GetATR(barIndex);
double atrPrev = helper.GetATR(barIndex + 1);
double atrMa = helper.GetATRSmoothed(barIndex);
double atrMaPrev = helper.GetATRSmoothed(barIndex + 1);
//
result =
atr > atrMa &&
atrPrev <= atrMaPrev;
//
return result;
}
bool IsVolatilitySwitchdToLow(int barIndex = 0)
{
//
bool result = false;
//
// Normalize ...
barIndex = NormalizeBarIndex(barIndex);
//
// Validate ...
result = IsValid();
if (!result)
{
return result;
}
//
double atr = helper.GetATR(barIndex);
double atrPrev = helper.GetATR(barIndex + 1);
double atrMa = helper.GetATRSmoothed(barIndex);
double atrMaPrev = helper.GetATRSmoothed(barIndex + 1);
//
result =
atr < atrMa &&
atrPrev >= atrMaPrev;
//
return result;
}
// #endregion
// #region RSI ...
@@ -1251,7 +1315,7 @@ class XCX121XKIHelperParser : XCBase
// MA crossover bullish ...
double maFastNow = helper.GetMAFast(barIndex);
double maSlowNow = helper.GetMASlow(barIndex);
bool maOk = maFastNow > maSlowNow;
bool maOk = maFastNow > maSlowNow;
//
result = rsiFlip && (atrOk || maOk);