last ...
This commit is contained in:
@@ -960,6 +960,119 @@ struct XOHCL
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
bool HasFiboPressure(
|
||||
ENUM_X_DIRECTION forDir,
|
||||
ENUM_X_FIBO_LEVELS level = X_FIBO_LEVEL_382 //
|
||||
)
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
result = IsValid() &&
|
||||
HasDirection(forDir);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
bool isBullish = IsBullish(forDir);
|
||||
bool isBearish = IsBearish(forDir);
|
||||
|
||||
//
|
||||
double fiboLevelValue = GetFibonacciLevel(
|
||||
high,
|
||||
low,
|
||||
level,
|
||||
forDir //
|
||||
);
|
||||
|
||||
//
|
||||
isBullish =
|
||||
isBullish &&
|
||||
GetDown() > fiboLevelValue;
|
||||
isBearish =
|
||||
isBearish &&
|
||||
GetUp() < fiboLevelValue;
|
||||
|
||||
//
|
||||
result = isBullish ||
|
||||
isBearish;
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
bool IsRejected(
|
||||
double price,
|
||||
ENUM_X_DIRECTION forDir,
|
||||
bool forceType = false,
|
||||
bool forcePressure = false //
|
||||
)
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
result = IsValid() &&
|
||||
price > 0 &&
|
||||
HasDirection(forDir);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
bool isBullish =
|
||||
IsBullish(forDir) &&
|
||||
low < price &&
|
||||
GetDown() > price;
|
||||
|
||||
//
|
||||
bool isBearish =
|
||||
IsBearish(forDir) &&
|
||||
high > price &&
|
||||
GetUp() < price;
|
||||
|
||||
//
|
||||
if (forceType)
|
||||
{
|
||||
//
|
||||
isBullish =
|
||||
isBullish &&
|
||||
IsBullish();
|
||||
|
||||
//
|
||||
isBearish =
|
||||
isBearish &&
|
||||
IsBearish();
|
||||
}
|
||||
|
||||
//
|
||||
if (forcePressure)
|
||||
{
|
||||
//
|
||||
isBullish =
|
||||
isBullish &&
|
||||
HasFiboPressure(forDir);
|
||||
|
||||
//
|
||||
isBearish =
|
||||
isBearish &&
|
||||
HasFiboPressure(forDir);
|
||||
}
|
||||
|
||||
//
|
||||
result = isBullish ||
|
||||
isBearish;
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// Find Highest Bar Index ...
|
||||
int FindHighestIndex(
|
||||
|
||||
Reference in New Issue
Block a user