This commit is contained in:
2025-01-06 06:09:50 +03:30
parent 6f61bc6d30
commit 9d4b2ee578
21 changed files with 17827 additions and 4044 deletions
+88 -90
View File
@@ -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(