Last ...
This commit is contained in:
@@ -26,7 +26,7 @@
|
||||
|
||||
//
|
||||
// Definitions ...
|
||||
class XPOIDrawer : public XSCBase
|
||||
class XCPOIDrawer : public XSCBase
|
||||
{
|
||||
//
|
||||
public:
|
||||
@@ -34,7 +34,7 @@ class XPOIDrawer : public XSCBase
|
||||
|
||||
//
|
||||
// Constructor ...
|
||||
void XPOIDrawer()
|
||||
void XCPOIDrawer()
|
||||
{
|
||||
//
|
||||
Default();
|
||||
@@ -42,7 +42,7 @@ class XPOIDrawer : public XSCBase
|
||||
|
||||
//
|
||||
// Deconstructor ...
|
||||
void ~XPOIDrawer()
|
||||
void ~XCPOIDrawer()
|
||||
{
|
||||
}
|
||||
|
||||
@@ -1273,11 +1273,970 @@ class XPOIDrawer : public XSCBase
|
||||
// Object Creators ...
|
||||
|
||||
//
|
||||
// Swings ...
|
||||
|
||||
/**
|
||||
* Create Swing High Object ...
|
||||
*
|
||||
* @param swing: XOHCL instance ...
|
||||
*
|
||||
* @return ( bool )
|
||||
*/
|
||||
bool CreateSwingHigh(
|
||||
XOHCL &swing,
|
||||
XCSwingHighObject *&object //
|
||||
)
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
object = NULL;
|
||||
|
||||
//
|
||||
result = swing.IsValid();
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
long chartID = ChartIdentification();
|
||||
int window = SubWindowIdentification();
|
||||
|
||||
//
|
||||
string name = swing.GetTag(ToString(X_POI_SWING_HIGH));
|
||||
|
||||
//
|
||||
int arrow = SwingHighArrow();
|
||||
int width = SwingHighWidth();
|
||||
color crl = SwingHighColor();
|
||||
|
||||
//
|
||||
object = new XCSwingHighObject();
|
||||
result = object.CreateBySwing(
|
||||
chartID,
|
||||
name,
|
||||
window,
|
||||
swing,
|
||||
(char)arrow //
|
||||
);
|
||||
|
||||
//
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
object.ArrowColor(crl);
|
||||
object.ArrowWidth(width);
|
||||
object.ArrowAnchor(ANCHOR_BOTTOM);
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create Swing Low Object ...
|
||||
*
|
||||
* @param swing: XOHCL instance ...
|
||||
*
|
||||
* @return ( bool )
|
||||
*/
|
||||
bool CreateSwingLow(
|
||||
XOHCL &swing,
|
||||
XCSwingLowObject *&object //
|
||||
)
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
object = NULL;
|
||||
|
||||
//
|
||||
result = swing.IsValid();
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
long chartID = ChartIdentification();
|
||||
int window = SubWindowIdentification();
|
||||
|
||||
//
|
||||
string name = swing.GetTag(ToString(X_POI_SWING_LOW));
|
||||
|
||||
//
|
||||
int arrow = SwingLowArrow();
|
||||
int width = SwingLowWidth();
|
||||
color crl = SwingLowColor();
|
||||
|
||||
//
|
||||
object = new XCSwingLowObject();
|
||||
result = object.CreateBySwing(
|
||||
chartID,
|
||||
name,
|
||||
window,
|
||||
swing,
|
||||
(char)arrow //
|
||||
);
|
||||
|
||||
//
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
object.ArrowColor(crl);
|
||||
object.ArrowWidth(width);
|
||||
object.ArrowAnchor(ANCHOR_TOP);
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// Momentum Bars ...
|
||||
|
||||
/**
|
||||
* Create Bullish Momentum Bar Object ...
|
||||
*
|
||||
* @param bar: XOHCL instance ...
|
||||
*
|
||||
* @return ( bool )
|
||||
*/
|
||||
bool CreateBullishMomentumBar(
|
||||
XOHCL &bar,
|
||||
XCBullishMomentumBarObject *&object //
|
||||
)
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
object = NULL;
|
||||
|
||||
//
|
||||
result = bar.IsValid();
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
long chartID = ChartIdentification();
|
||||
int window = SubWindowIdentification();
|
||||
|
||||
//
|
||||
string name = bar.GetTag(ToString(X_POI_MOMENTUM_BAR));
|
||||
|
||||
//
|
||||
int arrow = BullishMomentumBarArrow();
|
||||
int width = BullishMomentumBarWidth();
|
||||
color crl = BullishMomentumBarColor();
|
||||
|
||||
//
|
||||
object = new XCBullishMomentumBarObject();
|
||||
result = object.CreateByBar(
|
||||
chartID,
|
||||
name,
|
||||
window,
|
||||
bar,
|
||||
(char)arrow //
|
||||
);
|
||||
|
||||
//
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
object.ArrowColor(crl);
|
||||
object.ArrowWidth(width);
|
||||
object.ArrowAnchor(ANCHOR_TOP);
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create Bearish Momentum Bar Object ...
|
||||
*
|
||||
* @param bar: XOHCL instance ...
|
||||
*
|
||||
* @return ( bool )
|
||||
*/
|
||||
bool CreateBearishMomentumBar(
|
||||
XOHCL &bar,
|
||||
XCBearishMomentumBarObject *&object //
|
||||
)
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
object = NULL;
|
||||
|
||||
//
|
||||
result = bar.IsValid();
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
long chartID = ChartIdentification();
|
||||
int window = SubWindowIdentification();
|
||||
|
||||
//
|
||||
string name = bar.GetTag(ToString(X_POI_MOMENTUM_BAR));
|
||||
|
||||
//
|
||||
int arrow = BearishMomentumBarArrow();
|
||||
int width = BearishMomentumBarWidth();
|
||||
color crl = BearishMomentumBarColor();
|
||||
|
||||
//
|
||||
object = new XCBearishMomentumBarObject();
|
||||
result = object.CreateByBar(
|
||||
chartID,
|
||||
name,
|
||||
window,
|
||||
bar,
|
||||
(char)arrow //
|
||||
);
|
||||
|
||||
//
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
object.ArrowColor(crl);
|
||||
object.ArrowWidth(width);
|
||||
object.ArrowAnchor(ANCHOR_TOP);
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// Rejection Bars ...
|
||||
|
||||
/**
|
||||
* Create Bullish Rejection Bar Object ...
|
||||
*
|
||||
* @param bar: XOHCL instance ...
|
||||
*
|
||||
* @return ( bool )
|
||||
*/
|
||||
bool CreateBullishRejectionBar(
|
||||
XOHCL &bar,
|
||||
XCBullishRejectionBarObject *&object //
|
||||
)
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
object = NULL;
|
||||
|
||||
//
|
||||
result = bar.IsValid();
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
long chartID = ChartIdentification();
|
||||
int window = SubWindowIdentification();
|
||||
|
||||
//
|
||||
string name = bar.GetTag(ToString(X_POI_REJECTION_BAR));
|
||||
|
||||
//
|
||||
int arrow = BullishRejectionBarArrow();
|
||||
int width = BullishRejectionBarWidth();
|
||||
color crl = BullishRejectionBarColor();
|
||||
|
||||
//
|
||||
object = new XCBullishRejectionBarObject();
|
||||
result = object.CreateByBar(
|
||||
chartID,
|
||||
name,
|
||||
window,
|
||||
bar,
|
||||
(char)arrow //
|
||||
);
|
||||
|
||||
//
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
object.ArrowColor(crl);
|
||||
object.ArrowWidth(width);
|
||||
object.ArrowAnchor(ANCHOR_TOP);
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create Bearish Rejection Bar Object ...
|
||||
*
|
||||
* @param bar: XOHCL instance ...
|
||||
*
|
||||
* @return ( bool )
|
||||
*/
|
||||
bool CreateBearishRejectionBar(
|
||||
XOHCL &bar,
|
||||
XCBearishRejectionBarObject *&object //
|
||||
)
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
object = NULL;
|
||||
|
||||
//
|
||||
result = bar.IsValid();
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
long chartID = ChartIdentification();
|
||||
int window = SubWindowIdentification();
|
||||
|
||||
//
|
||||
string name = bar.GetTag(ToString(X_POI_REJECTION_BAR));
|
||||
|
||||
//
|
||||
int arrow = BearishRejectionBarArrow();
|
||||
int width = BearishRejectionBarWidth();
|
||||
color crl = BearishRejectionBarColor();
|
||||
|
||||
//
|
||||
object = new XCBearishRejectionBarObject();
|
||||
result = object.CreateByBar(
|
||||
chartID,
|
||||
name,
|
||||
window,
|
||||
bar,
|
||||
(char)arrow //
|
||||
);
|
||||
|
||||
//
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
object.ArrowColor(crl);
|
||||
object.ArrowWidth(width);
|
||||
object.ArrowAnchor(ANCHOR_TOP);
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// Support and Resistance Zones ...
|
||||
|
||||
/**
|
||||
* Create Support Zone Object ...
|
||||
*
|
||||
* @param bar: XOHCL instance ...
|
||||
*
|
||||
* @return ( bool )
|
||||
*/
|
||||
bool CreateSupportZone(
|
||||
XOHCL &bar,
|
||||
XCSupportZoneObject *&object //
|
||||
)
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
object = NULL;
|
||||
|
||||
//
|
||||
result = bar.IsValid();
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
long chartID = ChartIdentification();
|
||||
int window = SubWindowIdentification();
|
||||
|
||||
//
|
||||
string name = bar.GetTag(ToString(X_POI_SUPPORT_ZONE));
|
||||
|
||||
//
|
||||
datetime time2 = (datetime)((int)bar.time + (PeriodSeconds(bar.period) * 5));
|
||||
|
||||
//
|
||||
bool fill = SupportZoneFill();
|
||||
int width = SupportZoneWidth();
|
||||
color crl = SupportZoneColor();
|
||||
ENUM_LINE_STYLE style = SupportZoneStyle();
|
||||
|
||||
//
|
||||
object = new XCSupportZoneObject();
|
||||
result = object.CreateBySupport(
|
||||
chartID,
|
||||
name,
|
||||
window,
|
||||
bar,
|
||||
time2,
|
||||
true //
|
||||
);
|
||||
|
||||
//
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
object.ZoneFill(fill);
|
||||
object.ZoneColor(crl);
|
||||
object.ZoneWidth(width);
|
||||
object.ZoneStyle(style);
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create Resistance Zone Object ...
|
||||
*
|
||||
* @param bar: XOHCL instance ...
|
||||
*
|
||||
* @return ( bool )
|
||||
*/
|
||||
bool CreateResistanceZone(
|
||||
XOHCL &bar,
|
||||
XCResistanceZoneObject *&object //
|
||||
)
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
object = NULL;
|
||||
|
||||
//
|
||||
result = bar.IsValid();
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
long chartID = ChartIdentification();
|
||||
int window = SubWindowIdentification();
|
||||
|
||||
//
|
||||
string name = bar.GetTag(ToString(X_POI_RESISTANCE_ZONE));
|
||||
|
||||
//
|
||||
datetime time2 = (datetime)((int)bar.time + (PeriodSeconds(bar.period) * 5));
|
||||
|
||||
//
|
||||
bool fill = ResistanceZoneFill();
|
||||
int width = ResistanceZoneWidth();
|
||||
color crl = ResistanceZoneColor();
|
||||
ENUM_LINE_STYLE style = ResistanceZoneStyle();
|
||||
|
||||
//
|
||||
object = new XCResistanceZoneObject();
|
||||
result = object.CreateByResistance(
|
||||
chartID,
|
||||
name,
|
||||
window,
|
||||
bar,
|
||||
time2,
|
||||
true //
|
||||
);
|
||||
|
||||
//
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
object.ZoneFill(fill);
|
||||
object.ZoneColor(crl);
|
||||
object.ZoneWidth(width);
|
||||
object.ZoneStyle(style);
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// Supply and Demand Zones ...
|
||||
|
||||
/**
|
||||
* Create Supply Zone Object ...
|
||||
*
|
||||
* @param zone: XZone instance ...
|
||||
*
|
||||
* @return ( bool )
|
||||
*/
|
||||
bool CreateSupplyZone(
|
||||
XZone &zone,
|
||||
XCSupplyZoneObject *&object //
|
||||
)
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
object = NULL;
|
||||
|
||||
//
|
||||
result = zone.IsValid();
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
long chartID = ChartIdentification();
|
||||
int window = SubWindowIdentification();
|
||||
|
||||
//
|
||||
string name = zone.GetTag();
|
||||
result = Contains(
|
||||
ToString(X_POI_SUPPLY_ZONE),
|
||||
name //
|
||||
);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
bool fill = SupplyZoneFill();
|
||||
int width = SupplyZoneWidth();
|
||||
color crl = SupplyZoneColor();
|
||||
ENUM_LINE_STYLE style = SupplyZoneStyle();
|
||||
|
||||
//
|
||||
object = new XCSupplyZoneObject();
|
||||
result = object.CreateByZone(
|
||||
chartID,
|
||||
name,
|
||||
window,
|
||||
zone,
|
||||
NULL,
|
||||
true //
|
||||
);
|
||||
|
||||
//
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
object.ZoneFill(fill);
|
||||
object.ZoneColor(crl);
|
||||
object.ZoneWidth(width);
|
||||
object.ZoneStyle(style);
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create Demand Zone Object ...
|
||||
*
|
||||
* @param zone: XZone instance ...
|
||||
*
|
||||
* @return ( bool )
|
||||
*/
|
||||
bool CreateDemandZone(
|
||||
XZone &zone,
|
||||
XCDemandZoneObject *&object //
|
||||
)
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
object = NULL;
|
||||
|
||||
//
|
||||
result = zone.IsValid();
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
long chartID = ChartIdentification();
|
||||
int window = SubWindowIdentification();
|
||||
|
||||
//
|
||||
string name = zone.GetTag();
|
||||
result = Contains(
|
||||
ToString(X_POI_DEMAND_ZONE),
|
||||
name //
|
||||
);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
bool fill = DemandZoneFill();
|
||||
int width = DemandZoneWidth();
|
||||
color crl = DemandZoneColor();
|
||||
ENUM_LINE_STYLE style = DemandZoneStyle();
|
||||
|
||||
//
|
||||
object = new XCDemandZoneObject();
|
||||
result = object.CreateByZone(
|
||||
chartID,
|
||||
name,
|
||||
window,
|
||||
zone,
|
||||
NULL,
|
||||
true //
|
||||
);
|
||||
|
||||
//
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
object.ZoneFill(fill);
|
||||
object.ZoneColor(crl);
|
||||
object.ZoneWidth(width);
|
||||
object.ZoneStyle(style);
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// Order Blocks ...
|
||||
|
||||
/**
|
||||
* Create Bullish Order Block Object ...
|
||||
*
|
||||
* @param zone: XZone instance ...
|
||||
*
|
||||
* @return ( bool )
|
||||
*/
|
||||
bool CreateBullishOrderBlock(
|
||||
XZone &zone,
|
||||
XCBullishOrderBlockObject *&object //
|
||||
)
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
object = NULL;
|
||||
|
||||
//
|
||||
result = zone.IsValid();
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
long chartID = ChartIdentification();
|
||||
int window = SubWindowIdentification();
|
||||
|
||||
//
|
||||
string name = zone.GetTag();
|
||||
result = Contains(
|
||||
ToString(X_POI_BULLISH_ORDERBLOCK),
|
||||
name //
|
||||
);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
bool fill = BullishOrderBlockFill();
|
||||
int width = BullishOrderBlockWidth();
|
||||
color crl = BullishOrderBlockColor();
|
||||
ENUM_LINE_STYLE style = BullishOrderBlockStyle();
|
||||
|
||||
//
|
||||
object = new XCBullishOrderBlockObject();
|
||||
result = object.CreateByZone(
|
||||
chartID,
|
||||
name,
|
||||
window,
|
||||
zone,
|
||||
NULL,
|
||||
true //
|
||||
);
|
||||
|
||||
//
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
object.ZoneFill(fill);
|
||||
object.ZoneColor(crl);
|
||||
object.ZoneWidth(width);
|
||||
object.ZoneStyle(style);
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create Bearish Order Block Object ...
|
||||
*
|
||||
* @param zone: XZone instance ...
|
||||
*
|
||||
* @return ( bool )
|
||||
*/
|
||||
bool CreateBearishOrderBlock(
|
||||
XZone &zone,
|
||||
XCBearishOrderBlockObject *&object //
|
||||
)
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
object = NULL;
|
||||
|
||||
//
|
||||
result = zone.IsValid();
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
long chartID = ChartIdentification();
|
||||
int window = SubWindowIdentification();
|
||||
|
||||
//
|
||||
string name = zone.GetTag();
|
||||
result = Contains(
|
||||
ToString(X_POI_BEARISH_ORDERBLOCK),
|
||||
name //
|
||||
);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
bool fill = BearishOrderBlockFill();
|
||||
int width = BearishOrderBlockWidth();
|
||||
color crl = BearishOrderBlockColor();
|
||||
ENUM_LINE_STYLE style = BearishOrderBlockStyle();
|
||||
|
||||
//
|
||||
object = new XCBearishOrderBlockObject();
|
||||
result = object.CreateByZone(
|
||||
chartID,
|
||||
name,
|
||||
window,
|
||||
zone,
|
||||
NULL,
|
||||
true //
|
||||
);
|
||||
|
||||
//
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
object.ZoneFill(fill);
|
||||
object.ZoneColor(crl);
|
||||
object.ZoneWidth(width);
|
||||
object.ZoneStyle(style);
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// Order Blocks ...
|
||||
|
||||
/**
|
||||
* Create Bullish FVG Object ...
|
||||
*
|
||||
* @param zone: XZone instance ...
|
||||
*
|
||||
* @return ( bool )
|
||||
*/
|
||||
bool CreateBullishFVG(
|
||||
XZone &zone,
|
||||
XCBullishFVGObject *&object //
|
||||
)
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
object = NULL;
|
||||
|
||||
//
|
||||
result = zone.IsValid();
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
long chartID = ChartIdentification();
|
||||
int window = SubWindowIdentification();
|
||||
|
||||
//
|
||||
string name = zone.GetTag();
|
||||
result = Contains(
|
||||
ToString(X_POI_BULLISH_FVG),
|
||||
name //
|
||||
);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
bool fill = BullishFVGFill();
|
||||
int width = BullishFVGWidth();
|
||||
color crl = BullishFVGColor();
|
||||
ENUM_LINE_STYLE style = BullishFVGStyle();
|
||||
|
||||
//
|
||||
object = new XCBullishFVGObject();
|
||||
result = object.CreateByZone(
|
||||
chartID,
|
||||
name,
|
||||
window,
|
||||
zone,
|
||||
NULL,
|
||||
true //
|
||||
);
|
||||
|
||||
//
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
object.ZoneFill(fill);
|
||||
object.ZoneColor(crl);
|
||||
object.ZoneWidth(width);
|
||||
object.ZoneStyle(style);
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create Bearish FVG Object ...
|
||||
*
|
||||
* @param zone: XZone instance ...
|
||||
*
|
||||
* @return ( bool )
|
||||
*/
|
||||
bool CreateBearishFVG(
|
||||
XZone &zone,
|
||||
XCBearishFVGObject *&object //
|
||||
)
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
object = NULL;
|
||||
|
||||
//
|
||||
result = zone.IsValid();
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
long chartID = ChartIdentification();
|
||||
int window = SubWindowIdentification();
|
||||
|
||||
//
|
||||
string name = zone.GetTag();
|
||||
result = Contains(
|
||||
ToString(X_POI_BEARISH_ORDERBLOCK),
|
||||
name //
|
||||
);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
bool fill = BearishFVGFill();
|
||||
int width = BearishFVGWidth();
|
||||
color crl = BearishFVGColor();
|
||||
ENUM_LINE_STYLE style = BearishFVGStyle();
|
||||
|
||||
//
|
||||
object = new XCBearishFVGObject();
|
||||
result = object.CreateByZone(
|
||||
chartID,
|
||||
name,
|
||||
window,
|
||||
zone,
|
||||
NULL,
|
||||
true //
|
||||
);
|
||||
|
||||
//
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
object.ZoneFill(fill);
|
||||
object.ZoneColor(crl);
|
||||
object.ZoneWidth(width);
|
||||
object.ZoneStyle(style);
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user