This commit is contained in:
2025-12-31 13:49:57 +03:30
parent b1731af03c
commit ad945b90b2
9 changed files with 246 additions and 7 deletions
+53
View File
@@ -1104,6 +1104,59 @@ struct XBoxZone
ZeroMemory(this);
}
bool Init(
string _symbol,
ENUM_TIMEFRAMES _period,
double _upper,
double _lower,
datetime _from,
datetime _to,
ENUM_X_DIRECTION _dir,
string _type = "",
datetime _at = NULL //
)
{
//
bool result = false;
//
// Validate ...
result = IsXValid(_symbol) &&
IsXValid(_period) &&
_upper > 0 &&
_lower > 0 &&
_upper > _lower &&
IsXValid(_from) &&
IsXValid(_to) &&
_from < _to &&
HasDirection(_dir);
if (!result)
{
return result;
}
//
this.to = _to;
this.at = _at;
this.dir = _dir;
this.from = _from;
this.type = _type;
this.lower = _lower;
this.upper = _upper;
this.symbol = _symbol;
this.period = _period;
//
result = IsValid();
if (!result)
{
Clean();
}
//
return result;
}
/**
* Clean Special Props ...
*/