This commit is contained in:
2025-02-16 05:08:13 +03:30
parent 54c4fb7e3a
commit 62bfa7760c
7 changed files with 2450 additions and 78 deletions
+46
View File
@@ -6773,6 +6773,52 @@ double GetFibonacciLevel(
return result;
}
//
double GetFibonacciLevel(
double mUp,
double mDown,
ENUM_X_FIBO_LEVELS mLevel,
ENUM_X_DIRECTION mForDir //
)
{
//
double result = 0;
//
double levelValue = GetFiboLevelValue(mLevel);
//
bool isValid =
//
mUp > 0 &&
mDown > 0 &&
levelValue > 0 &&
mUp > mDown &&
HasDirection(mForDir)
//
;
if (!isValid)
{
return result;
}
//
bool isBullish = IsBullish(mForDir);
//
double ling = mUp - mDown;
double pLevel = (ling / 100) * (levelValue * 100);
//
result =
isBullish
? mUp - pLevel
: mDown + pLevel;
//
return result;
}
//
// Method 1
// Normalize between 1 and 0 ...