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
+225 -92
View File
@@ -1269,6 +1269,103 @@ class XCPOIDrawer : public XCBase
mBearishFVGStyle = value;
}
//
// Virtuals ...
/**
* Apply Default Configurations ...
*/
virtual void Default()
{
//
// Apply Default Props ...
//
Prefix(NULL);
ChartIdentification(0);
SubWindowIdentification(0);
//
SwingLowWidth(3);
SwingLowArrow(108);
SwingLowColor(clrAqua);
//
SwingHighWidth(3);
SwingHighArrow(108);
SwingHighColor(clrMagenta);
//
BullishMomentumBarWidth(3);
BullishMomentumBarArrow(225);
BullishMomentumBarColor(clrAqua);
//
BearishMomentumBarWidth(3);
BearishMomentumBarArrow(226);
BearishMomentumBarColor(clrMagenta);
//
BullishRejectionBarWidth(3);
BullishRejectionBarArrow(217);
BullishRejectionBarColor(clrAqua);
//
BearishRejectionBarWidth(3);
BearishRejectionBarArrow(218);
BearishRejectionBarColor(clrMagenta);
//
SupportZoneFill(false);
SupportZoneWidth(1);
SupportZoneStyle(STYLE_DOT);
SupportZoneColor(clrLime);
//
ResistanceZoneFill(false);
ResistanceZoneWidth(1);
ResistanceZoneStyle(STYLE_DOT);
ResistanceZoneColor(clrRed);
//
SupplyZoneFill(false);
SupplyZoneWidth(1);
SupplyZoneStyle(STYLE_DOT);
SupplyZoneColor(clrRed);
//
DemandZoneFill(false);
DemandZoneWidth(1);
DemandZoneStyle(STYLE_DOT);
DemandZoneColor(clrGreen);
//
BullishOrderBlockFill(false);
BullishOrderBlockWidth(1);
BullishOrderBlockStyle(STYLE_DASHDOT);
BullishOrderBlockColor(clrLime);
//
BearishOrderBlockFill(false);
BearishOrderBlockWidth(1);
BearishOrderBlockStyle(STYLE_DASHDOT);
BearishOrderBlockColor(clrRed);
//
BullishFVGFill(true);
BullishFVGWidth(1);
BullishFVGStyle(STYLE_DOT);
BullishFVGColor(clrLime);
//
BearishFVGFill(true);
BearishFVGWidth(1);
BearishFVGStyle(STYLE_DOT);
BearishFVGColor(clrRed);
//
}
//
// Object Creators ...
@@ -1917,102 +2014,138 @@ class XCPOIDrawer : public XCBase
return result;
}
/**
* Create Bullish Order Block Object ...
*
* @param zone: XCOrderBlock instance ...
* @param object: XCBullishOrderBlockObject pointer ...
*
* @return ( bool )
*/
bool CreateBullishOrderBlock(
XCOrderBlock &zone,
XCBullishOrderBlockObject *&object //
)
{
//
bool result = false;
//
object = NULL;
//
result =
zone.IsValid() &&
zone.IsBullish();
if (!result)
{
return result;
}
//
string prefix = Prefix();
long chartID = ChartIdentification();
int window = SubWindowIdentification();
//
bool fill = BullishOrderBlockFill();
int width = BullishOrderBlockWidth();
color crl = BullishOrderBlockColor();
ENUM_LINE_STYLE style = BullishOrderBlockStyle();
//
object = new XCBullishOrderBlockObject();
result = object.Create(
chartID,
window,
zone,
prefix //
);
//
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: XCOrderBlock instance ...
* @param object: XCBearishOrderBlockObject pointer ...
*
* @return ( bool )
*/
bool CreateBearishOrderBlock(
XCOrderBlock &zone,
XCBearishOrderBlockObject *&object //
)
{
//
bool result = false;
//
object = NULL;
//
result =
zone.IsValid() &&
zone.IsBearish();
if (!result)
{
return result;
}
//
string prefix = Prefix();
long chartID = ChartIdentification();
int window = SubWindowIdentification();
//
bool fill = BearishOrderBlockFill();
int width = BearishOrderBlockWidth();
color crl = BearishOrderBlockColor();
ENUM_LINE_STYLE style = BearishOrderBlockStyle();
//
object = new XCBearishOrderBlockObject();
result = object.Create(
chartID,
window,
zone,
prefix //
);
//
if (!result)
{
return result;
}
//
object.ZoneFill(fill);
object.ZoneColor(crl);
object.ZoneWidth(width);
object.ZoneStyle(style);
//
return result;
}
//
protected:
//
//
void Default()
{
//
// Apply Default Props ...
//
Prefix(NULL);
ChartIdentification(0);
SubWindowIdentification(0);
//
SwingLowWidth(3);
SwingLowArrow(108);
SwingLowColor(clrAqua);
//
SwingHighWidth(3);
SwingHighArrow(108);
SwingHighColor(clrMagenta);
//
BullishMomentumBarWidth(3);
BullishMomentumBarArrow(225);
BullishMomentumBarColor(clrAqua);
//
BearishMomentumBarWidth(3);
BearishMomentumBarArrow(226);
BearishMomentumBarColor(clrMagenta);
//
BullishRejectionBarWidth(3);
BullishRejectionBarArrow(217);
BullishRejectionBarColor(clrAqua);
//
BearishRejectionBarWidth(3);
BearishRejectionBarArrow(218);
BearishRejectionBarColor(clrMagenta);
//
SupportZoneFill(false);
SupportZoneWidth(1);
SupportZoneStyle(STYLE_DOT);
SupportZoneColor(clrLime);
//
ResistanceZoneFill(false);
ResistanceZoneWidth(1);
ResistanceZoneStyle(STYLE_DOT);
ResistanceZoneColor(clrRed);
//
SupplyZoneFill(false);
SupplyZoneWidth(1);
SupplyZoneStyle(STYLE_DOT);
SupplyZoneColor(clrRed);
//
DemandZoneFill(false);
DemandZoneWidth(1);
DemandZoneStyle(STYLE_DOT);
DemandZoneColor(clrGreen);
//
BullishOrderBlockFill(true);
BullishOrderBlockWidth(1);
BullishOrderBlockStyle(STYLE_DOT);
BullishOrderBlockColor(clrLime);
//
BearishOrderBlockFill(true);
BearishOrderBlockWidth(1);
BearishOrderBlockStyle(STYLE_DOT);
BearishOrderBlockColor(clrRed);
//
BullishFVGFill(true);
BullishFVGWidth(1);
BullishFVGStyle(STYLE_DOT);
BullishFVGColor(clrLime);
//
BearishFVGFill(true);
BearishFVGWidth(1);
BearishFVGStyle(STYLE_DOT);
BearishFVGColor(clrRed);
//
}
//
private:
//