last ...
This commit is contained in:
@@ -1848,96 +1848,6 @@ struct XOHCL
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// Check Bar Breaked Up ...
|
||||
bool IsBreakeUp(double value)
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
result =
|
||||
value > 0 &&
|
||||
IsValid();
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
XOHCL pBar;
|
||||
result = GetPreviousBar(pBar);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
result =
|
||||
//
|
||||
low > value &&
|
||||
(
|
||||
//
|
||||
(pBar.low < value &&
|
||||
pBar.high > value)
|
||||
//
|
||||
||
|
||||
//
|
||||
(pBar.high < value)
|
||||
//
|
||||
)
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// Check Bar Breaked Down ...
|
||||
bool IsBreakeDown(double value)
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
result =
|
||||
value > 0 &&
|
||||
IsValid();
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
XOHCL pBar;
|
||||
result = GetPreviousBar(pBar);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
result =
|
||||
//
|
||||
high < value &&
|
||||
(
|
||||
//
|
||||
(pBar.high > value &&
|
||||
pBar.low < value)
|
||||
//
|
||||
||
|
||||
//
|
||||
(pBar.low > value)
|
||||
//
|
||||
)
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// Other ...
|
||||
string GetTag(string prefix = "")
|
||||
@@ -6462,6 +6372,94 @@ double GetSlope(
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// Check Bar Reject Specified Value ...
|
||||
bool IsBarReject(
|
||||
double value,
|
||||
ENUM_X_DIRECTION dir,
|
||||
XOHCL &bar //
|
||||
)
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
result = value > 0 &&
|
||||
bar.IsValid() &&
|
||||
HasDirection(dir);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
bool isUp = IsBullish(dir);
|
||||
bool isDown = IsBearish(dir);
|
||||
|
||||
//
|
||||
result =
|
||||
isUp
|
||||
? bar.low < value &&
|
||||
bar.GetDown() > value
|
||||
: isDown
|
||||
? bar.high > value &&
|
||||
bar.GetUp() < value
|
||||
: false;
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// Check Bar Break Specified Value ...
|
||||
bool IsBarBreak(
|
||||
double value,
|
||||
ENUM_X_DIRECTION dir,
|
||||
XOHCL &bar //
|
||||
)
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
result = value > 0 &&
|
||||
bar.IsValid() &&
|
||||
HasDirection(dir);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
XOHCL pBar;
|
||||
result = bar.GetPreviousBar(pBar);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
bool isUp = IsBullish(dir);
|
||||
bool isDown = IsBearish(dir);
|
||||
|
||||
//
|
||||
result =
|
||||
isUp
|
||||
? (bar.GetDown() < value &&
|
||||
bar.GetUp() > value) ||
|
||||
(bar.close > value &&
|
||||
pBar.close < value)
|
||||
: isDown
|
||||
? (bar.GetUp() > value &&
|
||||
bar.GetDown() < value) ||
|
||||
(bar.close < value &&
|
||||
pBar.close > value)
|
||||
: false;
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// Calculate Fib Level ...
|
||||
double GetFibonacciLevel(
|
||||
|
||||
Reference in New Issue
Block a user