last ...
This commit is contained in:
@@ -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 ...
|
||||
|
||||
@@ -6023,7 +6023,7 @@ struct XBoxZone
|
||||
lower > 0 &&
|
||||
from < to &&
|
||||
IsValid(to) &&
|
||||
upper > lower &&
|
||||
upper >= lower &&
|
||||
IsValid(from) &&
|
||||
IsValid(symbol) &&
|
||||
IsValid(period)
|
||||
|
||||
Reference in New Issue
Block a user