last ...
This commit is contained in:
@@ -1912,6 +1912,36 @@ class XCX121XKIPOIDetector : public XCMarketPatternDetector
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
bool IsNearZone(
|
||||
double price,
|
||||
XBoxZone &zone,
|
||||
double threshold = 0 //
|
||||
)
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
result =
|
||||
zone.IsValid() &&
|
||||
NotEmptyZero(price);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
double points = GetPoints(zone.symbol);
|
||||
double distance = points * threshold;
|
||||
|
||||
//
|
||||
result = price >= zone.lower - distance &&
|
||||
price <= zone.upper + distance;
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
// #endregion
|
||||
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user