last works ...

This commit is contained in:
2025-02-04 10:42:35 +03:30
parent 7e32ebab82
commit 1f755d6ca3
6 changed files with 1684 additions and 322 deletions
+285
View File
@@ -7948,3 +7948,288 @@ int DrawFVGOrderBlock(
//
//
/**
* Check Price Above Specified Zone ...
*
* @param bar: XOHCL instance Reference ...
*
* @return ( bool )
*/
bool IsPriceAboveZone(
XOHCL &bar,
XCZone *zone //
)
{
//
bool result = false;
//
result =
zone != NULL &&
bar.IsValid() &&
zone.IsValidBoundary();
if (!result)
{
return result;
}
//
result =
//
bar.low > zone.Upper()
//
;
//
return result;
}
/**
* Check Price Above Specified Zone ...
*
* @return ( bool )
*/
bool IsPriceAboveZone(
double price,
XCZone *zone //
)
{
//
bool result = false;
//
result =
price > 0 &&
zone != NULL &&
zone.IsValidBoundary();
if (!result)
{
return result;
}
//
result =
//
price > zone.Upper()
//
;
//
return result;
}
/**
* Check Price Below Specified Zone ...
*
* @param bar: XOHCL instance Reference ...
*
* @return ( bool )
*/
bool IsPriceBelowZone(
XOHCL &bar,
XCZone *zone //
)
{
//
bool result = false;
//
result =
zone != NULL &&
bar.IsValid() &&
zone.IsValidBoundary();
if (!result)
{
return result;
}
//
result =
//
bar.high < zone.Lower()
//
;
//
return result;
}
/**
* Check Price Below Specified Zone ...
*
* @return ( bool )
*/
bool IsPriceBelowZone(
double price,
XCZone *zone //
)
{
//
bool result = false;
//
result =
price > 0 &&
zone != NULL &&
zone.IsValidBoundary();
if (!result)
{
return result;
}
//
result =
//
price < zone.Lower()
//
;
//
return result;
}
/**
* Check Price Inside Specified Zone ...
*
* @param bar: XOHCL instance Reference ...
*
* @return ( bool )
*/
bool IsPriceInsideZone(
XOHCL &bar,
XCZone *zone //
)
{
//
bool result = false;
//
result =
zone != NULL &&
bar.IsValid() &&
zone.IsValidBoundary();
if (!result)
{
return result;
}
//
result =
//
bar.low <= zone.Upper()
//
&&
//
bar.low >= zone.Lower()
//
;
//
return result;
}
bool IsPriceInsideZone(
XOHCL &bar,
double upper,
double lower //
)
{
//
bool result = false;
//
result =
upper > 0 &&
lower > 0 &&
upper > lower &&
bar.IsValid();
if (!result)
{
return result;
}
//
result =
//
bar.low <= upper
//
&&
//
bar.low >= lower
//
;
//
return result;
}
/**
* Check Price Inside Specified Zone ...
*
* @return ( bool )
*/
bool IsPriceInsideZone(
double price,
XCZone *zone //
)
{
//
bool result = false;
//
result =
price > 0 &&
zone != NULL &&
zone.IsValidBoundary();
if (!result)
{
return result;
}
//
result =
//
price <= zone.Upper()
//
&&
//
price >= zone.Lower()
//
;
//
return result;
}
bool IsPriceInsideZone(
double price,
double upper,
double lower //
)
{
//
bool result = false;
//
result =
price > 0 &&
upper > 0 &&
lower > 0 &&
upper > lower;
if (!result)
{
return result;
}
//
result =
//
price <= upper
//
&&
//
price >= lower
//
;
//
return result;
}