Finish Order Blocks Detection ...

This commit is contained in:
2024-11-14 00:31:40 +03:30
parent a4fb541557
commit 849fc73ee2
4 changed files with 1048 additions and 95 deletions
+137 -3
View File
@@ -1136,7 +1136,8 @@ class XCResistanceZoneObject : public XCZoneObject
//
// Supply Zone ...
class XCSupplyZoneObject : public XCZoneObject {
class XCSupplyZoneObject : public XCZoneObject
{
//
public:
//
@@ -1200,7 +1201,8 @@ class XCSupplyZoneObject : public XCZoneObject {
//
// Demand Zone ...
class XCDemandZoneObject : public XCZoneObject {
class XCDemandZoneObject : public XCZoneObject
{
//
public:
//
@@ -1258,7 +1260,139 @@ class XCDemandZoneObject : public XCZoneObject {
*/
virtual ENUM_XCHARTOBJECTS Type()
{
return X_SUPPLY_ZONE_OBJ;
return X_DEMAND_ZONE_OBJ;
}
};
//
// Bullish Order Block ...
class XCBullishOrderBlockObject : public XCZoneObject
{
//
public:
//
/**
* Creator ...
*
* @param chart_id: Long, Specified Chart ID ...
* @param window: Integer, Specified Chart Window ID ...
* @param zone: XCOrderBlock instance ...
* @param prefix: String ...
*
* @return ( bool )
*/
bool Create(
long chart_id,
int window,
XCOrderBlock &zone,
string prefix = NULL //
)
{
//
bool result = false;
//
result = zone.IsValid() &&
zone.IsBullish();
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_BULLISH_ORDERBLOCK_OBJ;
}
};
//
// Bearish Order Block ...
class XCBearishOrderBlockObject : public XCZoneObject
{
//
public:
//
/**
* Creator ...
*
* @param chart_id: Long, Specified Chart ID ...
* @param window: Integer, Specified Chart Window ID ...
* @param zone: XCOrderBlock instance ...
* @param prefix: String ...
*
* @return ( bool )
*/
bool Create(
long chart_id,
int window,
XCOrderBlock &zone,
string prefix = NULL //
)
{
//
bool result = false;
//
result = zone.IsValid() &&
zone.IsBearish();
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_BULLISH_ORDERBLOCK_OBJ;
}
};