Apply Fix on Drawing Support and Resistance Zones ...

This commit is contained in:
2024-10-22 14:36:34 +03:30
parent 64cfece3eb
commit a6e4d625e4
+28 -4
View File
@@ -1894,14 +1894,14 @@ class XCPOI : public XSCBaseAlert
RejectionBarBearishColor(clrMagenta); RejectionBarBearishColor(clrMagenta);
// //
SupportZoneLoopBack(21); SupportZoneLoopBack(52);
SupportZoneWidth(1); SupportZoneWidth(1);
SupportZoneColor(clrLime); SupportZoneColor(clrLime);
SupportZoneStyle(STYLE_DOT); SupportZoneStyle(STYLE_DOT);
SupportZonePriceType(X_PRICE_CLOSE); SupportZonePriceType(X_PRICE_CLOSE);
// //
ResistanceZoneLoopBack(21); ResistanceZoneLoopBack(52);
ResistanceZoneWidth(1); ResistanceZoneWidth(1);
ResistanceZoneColor(clrRed); ResistanceZoneColor(clrRed);
ResistanceZoneStyle(STYLE_DOT); ResistanceZoneStyle(STYLE_DOT);
@@ -4363,6 +4363,18 @@ class XCPOI : public XSCBaseAlert
return; return;
} }
//
datetime cBarTime = TimeCurrent();
if (bar.Index() > 0)
{
//
cBarTime = iTime(
Symbol(),
Period(),
bar.Index() - 10 //
);
}
// //
XCSupportZoneObject *iObj; XCSupportZoneObject *iObj;
iObj = new XCSupportZoneObject(); iObj = new XCSupportZoneObject();
@@ -4371,7 +4383,7 @@ class XCPOI : public XSCBaseAlert
name, name,
Window(), Window(),
bar, bar,
TimeCurrent() // cBarTime //
); );
if (!isCreated) if (!isCreated)
{ {
@@ -4418,6 +4430,18 @@ class XCPOI : public XSCBaseAlert
return; return;
} }
//
datetime cBarTime = TimeCurrent();
if (bar.Index() > 0)
{
//
cBarTime = iTime(
Symbol(),
Period(),
bar.Index() - 10 //
);
}
// //
XCResistanceZoneObject *iObj; XCResistanceZoneObject *iObj;
iObj = new XCResistanceZoneObject(); iObj = new XCResistanceZoneObject();
@@ -4426,7 +4450,7 @@ class XCPOI : public XSCBaseAlert
name, name,
Window(), Window(),
bar, bar,
TimeCurrent() // cBarTime //
); );
if (!isCreated) if (!isCreated)
{ {