last ...
This commit is contained in:
@@ -4479,7 +4479,7 @@ class XCPOIDrawer : public XCBase
|
||||
* @return ( int )
|
||||
*/
|
||||
int DrawFVGOrderBlock(
|
||||
XFVGOrderBlock &models[],
|
||||
XFVGOrderBlock &model,
|
||||
XCBaseObject *&drawnObjects[] //
|
||||
)
|
||||
{
|
||||
@@ -4490,115 +4490,88 @@ class XCPOIDrawer : public XCBase
|
||||
Clean(drawnObjects);
|
||||
|
||||
//
|
||||
int count = ArraySize(models);
|
||||
if (!IsValidSize(count))
|
||||
if (!model.IsValid())
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
for (int i = 0; i < count; i++)
|
||||
ENUM_X_DIRECTION iDir;
|
||||
result = model.GetDirection(iDir);
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
bool isBullish = IsBullish(iDir);
|
||||
if (isBullish)
|
||||
{
|
||||
//
|
||||
XFVGOrderBlock iModel = models[i];
|
||||
|
||||
//
|
||||
ENUM_X_DIRECTION iDir;
|
||||
bool hasDirection = iModel.GetDirection(iDir);
|
||||
if (!hasDirection)
|
||||
// Order Block ...
|
||||
XCBullishOrderBlockObject *iOBObj;
|
||||
bool isCreated = CreateBullishOrderBlock(
|
||||
model.orderBlock,
|
||||
iOBObj //
|
||||
);
|
||||
if (isCreated)
|
||||
{
|
||||
continue;
|
||||
//
|
||||
Add(
|
||||
(XCBaseObject *)iOBObj,
|
||||
drawnObjects //
|
||||
);
|
||||
}
|
||||
|
||||
//
|
||||
bool isBullish = IsBullish(iDir);
|
||||
|
||||
//
|
||||
if (isBullish)
|
||||
// FVG ...
|
||||
XCBullishFairValueGapObject *iFVGObj;
|
||||
isCreated = CreateBullishFairValueGap(
|
||||
model.fairValueGap,
|
||||
iFVGObj //
|
||||
);
|
||||
if (isCreated)
|
||||
{
|
||||
//
|
||||
// Order Block ...
|
||||
XCBullishOrderBlockObject *iOBObj;
|
||||
bool isCreated = CreateBullishOrderBlock(
|
||||
iModel.orderBlock,
|
||||
iOBObj //
|
||||
Add(
|
||||
(XCBaseObject *)iOBObj,
|
||||
drawnObjects //
|
||||
);
|
||||
if (isCreated)
|
||||
{
|
||||
//
|
||||
Add(
|
||||
(XCBaseObject *)iOBObj,
|
||||
drawnObjects //
|
||||
);
|
||||
}
|
||||
|
||||
//
|
||||
// FVG ...
|
||||
XCBullishFairValueGapObject *iFVGObj;
|
||||
isCreated = CreateBullishFairValueGap(
|
||||
iModel.fairValueGap,
|
||||
iFVGObj //
|
||||
);
|
||||
if (isCreated)
|
||||
{
|
||||
//
|
||||
Add(
|
||||
(XCBaseObject *)iOBObj,
|
||||
drawnObjects //
|
||||
);
|
||||
}
|
||||
}
|
||||
else
|
||||
}
|
||||
else
|
||||
{
|
||||
//
|
||||
// Order Block ...
|
||||
XCBearishOrderBlockObject *iOBObj;
|
||||
bool isCreated = CreateBearishOrderBlock(
|
||||
model.orderBlock,
|
||||
iOBObj //
|
||||
);
|
||||
if (isCreated)
|
||||
{
|
||||
//
|
||||
// Order Block ...
|
||||
XCBearishOrderBlockObject *iOBObj;
|
||||
bool isCreated = CreateBearishOrderBlock(
|
||||
iModel.orderBlock,
|
||||
iOBObj //
|
||||
Add(
|
||||
(XCBaseObject *)iOBObj,
|
||||
drawnObjects //
|
||||
);
|
||||
if (isCreated)
|
||||
{
|
||||
//
|
||||
Add(
|
||||
(XCBaseObject *)iOBObj,
|
||||
drawnObjects //
|
||||
);
|
||||
}
|
||||
|
||||
//
|
||||
// FVG ...
|
||||
XCBearishFairValueGapObject *iFVGObj;
|
||||
isCreated = CreateBearishFairValueGap(
|
||||
iModel.fairValueGap,
|
||||
iFVGObj //
|
||||
);
|
||||
if (isCreated)
|
||||
{
|
||||
//
|
||||
Add(
|
||||
(XCBaseObject *)iFVGObj,
|
||||
drawnObjects //
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Price Zone ...
|
||||
// XCBaseObject *stateZoneObjects[];
|
||||
// int stateZoneObjectsCount = DrawStateZones(
|
||||
// iModel.stateZones,
|
||||
// stateZoneObjects //
|
||||
// );
|
||||
// if (IsValidSize(stateZoneObjectsCount))
|
||||
// {
|
||||
// //
|
||||
// Copy(
|
||||
// stateZoneObjects,
|
||||
// drawnObjects,
|
||||
// false // Force Clean ...
|
||||
// );
|
||||
// }
|
||||
// FVG ...
|
||||
XCBearishFairValueGapObject *iFVGObj;
|
||||
isCreated = CreateBearishFairValueGap(
|
||||
model.fairValueGap,
|
||||
iFVGObj //
|
||||
);
|
||||
if (isCreated)
|
||||
{
|
||||
//
|
||||
Add(
|
||||
(XCBaseObject *)iFVGObj,
|
||||
drawnObjects //
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user