last works ...
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user