Complete Support and Resistance POI ...
This commit is contained in:
@@ -1659,6 +1659,135 @@ class XCPOIDrawer : public XCBase
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// Support and Resistance ...
|
||||
|
||||
/**
|
||||
* Create Support Object ...
|
||||
*
|
||||
* @param zone: XCSupportZone instance ...
|
||||
* @param object: XCSupportZoneObject pointer ...
|
||||
*
|
||||
* @return ( bool )
|
||||
*/
|
||||
bool CreateSupportZone(
|
||||
XCSupportZone &zone,
|
||||
XCSupportZoneObject *&object //
|
||||
)
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
object = NULL;
|
||||
|
||||
//
|
||||
result =
|
||||
zone.IsValid();
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
string prefix = Prefix();
|
||||
long chartID = ChartIdentification();
|
||||
int window = SubWindowIdentification();
|
||||
|
||||
//
|
||||
bool fill = SupportZoneFill();
|
||||
int width = SupportZoneWidth();
|
||||
color crl = SupportZoneColor();
|
||||
ENUM_LINE_STYLE style = SupportZoneStyle();
|
||||
|
||||
//
|
||||
object = new XCSupportZoneObject();
|
||||
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 Resistance Object ...
|
||||
*
|
||||
* @param zone: XCResistanceZone instance ...
|
||||
* @param object: XCResistanceZoneObject pointer ...
|
||||
*
|
||||
* @return ( bool )
|
||||
*/
|
||||
bool CreateResistanceZone(
|
||||
XCResistanceZone &zone,
|
||||
XCResistanceZoneObject *&object //
|
||||
)
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
object = NULL;
|
||||
|
||||
//
|
||||
result =
|
||||
zone.IsValid();
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
string prefix = Prefix();
|
||||
long chartID = ChartIdentification();
|
||||
int window = SubWindowIdentification();
|
||||
|
||||
//
|
||||
bool fill = ResistanceZoneFill();
|
||||
int width = ResistanceZoneWidth();
|
||||
color crl = ResistanceZoneColor();
|
||||
ENUM_LINE_STYLE style = ResistanceZoneStyle();
|
||||
|
||||
//
|
||||
object = new XCResistanceZoneObject();
|
||||
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:
|
||||
//
|
||||
@@ -1705,13 +1834,13 @@ class XCPOIDrawer : public XCBase
|
||||
BearishRejectionBarColor(clrMagenta);
|
||||
|
||||
//
|
||||
SupportZoneFill(true);
|
||||
SupportZoneFill(false);
|
||||
SupportZoneWidth(1);
|
||||
SupportZoneStyle(STYLE_DOT);
|
||||
SupportZoneColor(clrLime);
|
||||
|
||||
//
|
||||
ResistanceZoneFill(true);
|
||||
ResistanceZoneFill(false);
|
||||
ResistanceZoneWidth(1);
|
||||
ResistanceZoneStyle(STYLE_DOT);
|
||||
ResistanceZoneColor(clrRed);
|
||||
|
||||
Reference in New Issue
Block a user