Apply Refactoring Side Affects Resolving in Experts and Indicators ...
This commit is contained in:
@@ -240,8 +240,8 @@ class XCPOIDrawer : public XCBase
|
||||
ulong chartId = ChartIdentification();
|
||||
int window = SubWindowIdentification();
|
||||
to = IsSpecifiedValid(to)
|
||||
? to
|
||||
: ((datetime)((int)bar.time) + (PeriodSeconds(bar.period) - 1));
|
||||
? to
|
||||
: ((datetime)((int)bar.time) + (PeriodSeconds(bar.period) - 1));
|
||||
object = new XCOHCLObject();
|
||||
result = object.Create(
|
||||
chartId,
|
||||
@@ -262,6 +262,82 @@ class XCPOIDrawer : public XCBase
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Draw Bar Arrow Object ...
|
||||
*
|
||||
* @param bar: XOHCL instance Reference ...
|
||||
* @param object: XCBarArrowObject, pointer reference for Drawn Object ...
|
||||
* @param priceType: ENUM_X_PRICE member ...
|
||||
* @param arrow: int, Arrow Code ...
|
||||
* @param clr: color, Arro Color ...
|
||||
* @param width: int, Arrow Width ...
|
||||
* @param anchor: ENUM_ARROW_ANCHOR, anchor of Arrow ...
|
||||
* @param name: string, name of Arrow ...
|
||||
*
|
||||
* @return ( bool )
|
||||
*/
|
||||
bool DrawBarArrow(
|
||||
XOHCL &bar,
|
||||
XCBarArrowObject *&object,
|
||||
ENUM_X_PRICE priceType,
|
||||
int arrow = 159,
|
||||
color clr = clrYellow,
|
||||
int width = 3,
|
||||
ENUM_ARROW_ANCHOR anchor = ANCHOR_BOTTOM,
|
||||
string name = NULL //
|
||||
)
|
||||
{
|
||||
//
|
||||
bool result = false;
|
||||
|
||||
//
|
||||
object = NULL;
|
||||
|
||||
//
|
||||
result = bar.IsValid();
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
string barTag = bar.GetTag(name);
|
||||
|
||||
//
|
||||
string prefix = Prefix();
|
||||
long chartID = ChartIdentification();
|
||||
int window = SubWindowIdentification();
|
||||
|
||||
//
|
||||
prefix =
|
||||
(IsValid(prefix)
|
||||
? prefix + "_"
|
||||
: prefix) +
|
||||
barTag;
|
||||
|
||||
//
|
||||
object = new XCBarArrowObject();
|
||||
result = object
|
||||
.CreateByBar(
|
||||
chartID,
|
||||
prefix,
|
||||
window,
|
||||
arrow,
|
||||
bar,
|
||||
priceType //
|
||||
);
|
||||
if (result)
|
||||
{
|
||||
//
|
||||
object.ArrowColor(clr);
|
||||
object.ArrowWidth(width);
|
||||
object.ArrowAnchor(anchor);
|
||||
}
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Dar Specified Pivot ...
|
||||
@@ -943,7 +1019,131 @@ class XCPOIDrawer : public XCBase
|
||||
/**
|
||||
* Apply Specified Style to Specified Object ...
|
||||
*
|
||||
* @param object: CChartObject, pointer reference of Object ...
|
||||
* @param object: CChartObjectVLine, pointer reference of Object ...
|
||||
* @param style: XPOIStyle, Specifed Style to Apply ...
|
||||
*/
|
||||
void ApplyLineStyle(
|
||||
CChartObjectVLine *&object,
|
||||
XPOIStyle &style //
|
||||
)
|
||||
{
|
||||
//
|
||||
bool has = object != NULL;
|
||||
if (!has)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//
|
||||
object.Color(style.clr);
|
||||
object.Style(style.style);
|
||||
object.Width(style.width);
|
||||
}
|
||||
|
||||
/**
|
||||
* Apply Specified Style to Specified Object ...
|
||||
*
|
||||
* @param object: CChartObjectVLine, pointer reference of Object ...
|
||||
* @param forDir: ENUM_X_DIRECTION, Specified Direction ...
|
||||
*/
|
||||
void ApplyLineStyle(
|
||||
CChartObjectVLine *&object,
|
||||
ENUM_X_DIRECTION forDir //
|
||||
)
|
||||
{
|
||||
//
|
||||
bool has = object != NULL;
|
||||
if (!has)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//
|
||||
has = HasDirection(forDir);
|
||||
if (!has)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//
|
||||
XPOIStyle style;
|
||||
GetStyle(style, forDir);
|
||||
|
||||
//
|
||||
object.Color(style.clr);
|
||||
object.Style(style.style);
|
||||
object.Width(style.width);
|
||||
|
||||
//
|
||||
style.Clean();
|
||||
}
|
||||
|
||||
/**
|
||||
* Apply Specified Style to Specified Object ...
|
||||
*
|
||||
* @param object: CChartObjectHLine, pointer reference of Object ...
|
||||
* @param style: XPOIStyle, Specifed Style to Apply ...
|
||||
*/
|
||||
void ApplyLineStyle(
|
||||
CChartObjectHLine *&object,
|
||||
XPOIStyle &style //
|
||||
)
|
||||
{
|
||||
//
|
||||
bool has = object != NULL;
|
||||
if (!has)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//
|
||||
object.Color(style.clr);
|
||||
object.Style(style.style);
|
||||
object.Width(style.width);
|
||||
}
|
||||
|
||||
/**
|
||||
* Apply Specified Style to Specified Object ...
|
||||
*
|
||||
* @param object: CChartObjectHLine, pointer reference of Object ...
|
||||
* @param forDir: ENUM_X_DIRECTION, Specified Direction ...
|
||||
*/
|
||||
void ApplyLineStyle(
|
||||
CChartObjectHLine *&object,
|
||||
ENUM_X_DIRECTION forDir //
|
||||
)
|
||||
{
|
||||
//
|
||||
bool has = object != NULL;
|
||||
if (!has)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//
|
||||
has = HasDirection(forDir);
|
||||
if (!has)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//
|
||||
XPOIStyle style;
|
||||
GetStyle(style, forDir);
|
||||
|
||||
//
|
||||
object.Color(style.clr);
|
||||
object.Style(style.style);
|
||||
object.Width(style.width);
|
||||
|
||||
//
|
||||
style.Clean();
|
||||
}
|
||||
|
||||
/**
|
||||
* Apply Specified Style to Specified Object ...
|
||||
*
|
||||
* @param object: CChartObjectTrend, pointer reference of Object ...
|
||||
* @param forDir: ENUM_X_DIRECTION, Specified Direction ...
|
||||
*/
|
||||
void ApplyTrendLineStyle(
|
||||
|
||||
Reference in New Issue
Block a user