Complete Fair Value Gaps Detetion ...

This commit is contained in:
2024-11-14 15:34:51 +03:30
parent 849fc73ee2
commit 53f3f94b75
7 changed files with 14382 additions and 126 deletions
+129 -3
View File
@@ -1109,7 +1109,7 @@ class XCPOIDrawer : public XCBase
*/
void BullishFVGFill(bool value)
{
mBearishFVGFill = value;
mBullishFVGFill = value;
}
/**
@@ -1352,13 +1352,13 @@ class XCPOIDrawer : public XCBase
BearishOrderBlockColor(clrRed);
//
BullishFVGFill(true);
BullishFVGFill(false);
BullishFVGWidth(1);
BullishFVGStyle(STYLE_DOT);
BullishFVGColor(clrLime);
//
BearishFVGFill(true);
BearishFVGFill(false);
BearishFVGWidth(1);
BearishFVGStyle(STYLE_DOT);
BearishFVGColor(clrRed);
@@ -2014,6 +2014,9 @@ class XCPOIDrawer : public XCBase
return result;
}
//
// Order Blocks ...
/**
* Create Bullish Order Block Object ...
*
@@ -2142,6 +2145,129 @@ class XCPOIDrawer : public XCBase
return result;
}
//
// Fair Value Gaps ...
/**
* Create Bullish Fair Value Gap Object ...
*
* @param zone: XCFVG instance ...
* @param object: XCBullishOrderBlockObject pointer ...
*
* @return ( bool )
*/
bool CreateBullishFairValueGap(
XCFVG &zone,
XCBullishFairValueGapObject *&object //
)
{
//
bool result = false;
//
result = zone.IsValid() &&
zone.IsBullish();
if (!result)
{
return result;
}
//
string prefix = Prefix();
long chartID = ChartIdentification();
int window = SubWindowIdentification();
//
bool fill = BullishFVGFill();
int width = BullishFVGWidth();
color crl = BullishFVGColor();
ENUM_LINE_STYLE style = BullishFVGStyle();
//
object = new XCBullishFairValueGapObject();
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 Fair Value Gap Object ...
*
* @param zone: XCFVG instance ...
* @param object: XCBearishOrderBlockObject pointer ...
*
* @return ( bool )
*/
bool CreateBearishFairValueGap(
XCFVG &zone,
XCBearishFairValueGapObject *&object //
)
{
//
bool result = false;
//
result = zone.IsValid() &&
zone.IsBearish();
if (!result)
{
return result;
}
//
string prefix = Prefix();
long chartID = ChartIdentification();
int window = SubWindowIdentification();
//
bool fill = BearishFVGFill();
int width = BearishFVGWidth();
color crl = BearishFVGColor();
ENUM_LINE_STYLE style = BearishFVGStyle();
//
object = new XCBearishFairValueGapObject();
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:
//