Files
xMQL5/BKPS/14030823/BKPs/14030802-X121/Classes/x-saherelm.zone.class.mq5
T
2024-11-15 10:50:11 +03:30

80 lines
1.4 KiB
Plaintext

///////////////////////////////////////////////////////
//
// SaherElm IT Center MQL5 Class Library
// ----------------------------------------------
// Name: XSCZone
// Description: provides all Zone requirements ...
//
//
// Maintainer:
// ------------
// Hadi Khazaee Asl (hadi_khazaee_asl@yahoo.com)
//
//////////////////////////////////////////////////////
//
// Global Properties ...
#property library
#property copyright "Copyright 2023, SaherElm IT Center"
#property link "https://www.saherelm.ir"
#property version "1.00"
#property strict
//
// Imports ...
#include <Arrays/ArrayObj.mqh>
#include "../Libraries/x-saherelm.common.lib.mq5"
//
// Specific Zone ...
class XSCZone : public CObject
{
//
// Public ...
public:
//
// Props ...
double high;
double low;
int ticks;
double percent;
//
ENUM_TIMEFRAMES period;
datetime start;
datetime end;
//
// Compare Two Zone With Each Other ...
virtual int Compare(
const CObject *node,
const int mode = 0 //
) const
{
//
const XSCZone *other = (XSCZone *)node;
//
return other.ticks - ticks;
}
//
// Props ...
string GetTag() {
//
string result = "";
//
result = "XZ_" + ToString(period) + "_" + ToString(start);
//
return result;
}
//
// Protected ...
protected:
//
// Private ...
private:
};