This commit is contained in:
2025-05-26 09:00:28 +03:30
parent a113481dd0
commit 34ff9b1477
5 changed files with 2101 additions and 108 deletions
+94
View File
@@ -5923,3 +5923,97 @@ struct XBoxZone
};
//
struct XDirectionShift
{
//
// Props ...
string type;
datetime at;
double after;
double before;
string symbol;
ENUM_TIMEFRAMES period;
ENUM_X_DIRECTION shiftTo;
//
// Constructor ...
XDirectionShift()
{
Clean();
}
//
// Tools ...
//
// Cleanup ...
void Clean()
{
//
at = NULL;
after = 0;
before = 0;
type = NULL;
symbol = NULL;
period = NULL;
shiftTo = X_DIRECTION_NONE;
//
ZeroMemory(this);
}
//
// Validate ...
bool IsValid()
{
//
bool result = false;
//
result =
after > 0 &&
IsValid(at) &&
IsValid(type) &&
after != before &&
IsValid(symbol) &&
IsValid(period) &&
HasDirection(shiftTo);
//
return result;
}
//
// Check Same ...
bool IsSameAs(XDirectionShift &item)
{
//
bool result = false;
//
result = IsValid() &&
item.IsValid();
if (!result)
{
return result;
}
//
result =
//
at == item.at &&
type == item.type &&
after == item.after &&
before == item.before &&
symbol == item.symbol &&
period == item.period &&
shiftTo == item.shiftTo
//
;
//
return result;
}
};
//