complete supply and demand zones ...

This commit is contained in:
2024-11-13 18:42:16 +03:30
parent 797917e30a
commit a4fb541557
4 changed files with 794 additions and 28 deletions
+128
View File
@@ -1134,4 +1134,132 @@ class XCResistanceZoneObject : public XCZoneObject
}
};
//
// Supply Zone ...
class XCSupplyZoneObject : public XCZoneObject {
//
public:
//
/**
* Creator ...
*
* @param chart_id: Long, Specified Chart ID ...
* @param window: Integer, Specified Chart Window ID ...
* @param zone: XCSupplyZone instance ...
* @param prefix: String ...
*
* @return ( bool )
*/
bool Create(
long chart_id,
int window,
XCSupplyZone &zone,
string prefix = NULL //
)
{
//
bool result = false;
//
result = zone.IsValid();
if (!result)
{
return result;
}
//
string name = zone.GetTag();
//
result = CreateByZone(
chart_id,
name,
window,
zone,
prefix //
);
//
return result;
}
//
// Virtual ...
/**
* Retrieve Object Type ...
*
* @return ( ENUM_XCHARTOBJECTS )
*/
virtual ENUM_XCHARTOBJECTS Type()
{
return X_SUPPLY_ZONE_OBJ;
}
};
//
// Demand Zone ...
class XCDemandZoneObject : public XCZoneObject {
//
public:
//
/**
* Creator ...
*
* @param chart_id: Long, Specified Chart ID ...
* @param window: Integer, Specified Chart Window ID ...
* @param zone: XCDemandZone instance ...
* @param prefix: String ...
*
* @return ( bool )
*/
bool Create(
long chart_id,
int window,
XCDemandZone &zone,
string prefix = NULL //
)
{
//
bool result = false;
//
result = zone.IsValid();
if (!result)
{
return result;
}
//
string name = zone.GetTag();
//
result = CreateByZone(
chart_id,
name,
window,
zone,
prefix //
);
//
return result;
}
//
// Virtual ...
/**
* Retrieve Object Type ...
*
* @return ( ENUM_XCHARTOBJECTS )
*/
virtual ENUM_XCHARTOBJECTS Type()
{
return X_SUPPLY_ZONE_OBJ;
}
};
//