last works ...

This commit is contained in:
2025-08-28 01:04:57 +03:30
parent 068394f629
commit 69df921dd2
3 changed files with 109 additions and 16 deletions
+50 -1
View File
@@ -23,6 +23,7 @@
//
// Imports ...
#include "../../Libraries/x-saherelm.common.lib.mq5"
#include "../../Libraries/x-saherelm.x-poi.lib.mq5"
//
// Definitions ...
@@ -170,6 +171,7 @@ struct XOM1Zone
* @param _dir: Direction
* @param _reason: Creation Reason
* @param _from: Detection Time
* @param _to: Lifetime Time
*
* @return ( bool )
*/
@@ -182,7 +184,8 @@ struct XOM1Zone
double _price,
ENUM_X_DIRECTION _dir,
ENUM_XOM1_ZONE_REASON _reason,
datetime _from //
datetime _from,
datetime _to = NULL //
)
{
//
@@ -197,6 +200,11 @@ struct XOM1Zone
reason = _reason;
signaller = _signaller;
//
if (IsSpecifiedValid(_to)) {
to = _to;
}
//
bool result = IsValid();
if (!result)
@@ -346,6 +354,47 @@ struct XOM1Zone
return result;
}
/**
* Converts to Box ...
*
* @param box: Dest
*
* @return ( bool )
*/
bool ToBox(XBoxZone &box)
{
//
bool result = false;
//
box.Clean();
result = IsValid();
if (!result)
{
return result;
}
//
box.to = to;
box.dir = dir;
box.from = from;
box.upper = upper;
box.lower = lower;
box.symbol = symbol;
box.period = period;
box.type = signaller;
//
result = box.IsValid();
if (!result)
{
box.Clean();
}
//
return result;
}
/**
* Unique Identifier ...
*