last works ...
This commit is contained in:
@@ -1557,7 +1557,61 @@ class XCPOIDrawer : public XCBase
|
||||
{
|
||||
//
|
||||
// Apply Style ...
|
||||
object.Color(clr);
|
||||
object.Color(clrTrend);
|
||||
object.Width(config.trendWidth);
|
||||
object.Style(config.trendStyle);
|
||||
|
||||
//
|
||||
// Save Object ...
|
||||
drawnObjects.Add(object);
|
||||
}
|
||||
|
||||
//
|
||||
ZeroMemory(object);
|
||||
}
|
||||
|
||||
void DrawTrendLine(
|
||||
XTrend &trend,
|
||||
XPOIDrawConfig &config,
|
||||
color clr = CLR_NONE //
|
||||
)
|
||||
{
|
||||
//
|
||||
// Validate ...
|
||||
bool has = trend.IsValid();
|
||||
if (!has)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//
|
||||
color trendColor =
|
||||
(clr != CLR_NONE)
|
||||
? clr
|
||||
: trend.IsBullish()
|
||||
? config.bullishColor
|
||||
: trend.IsBearish()
|
||||
? config.bearishColor
|
||||
: config.neuturalColor;
|
||||
string name = trend.GetObjectID();
|
||||
|
||||
//
|
||||
CChartObjectTrend *object;
|
||||
has = DrawTrendLine(
|
||||
trend.fromValue,
|
||||
trend.fromTime,
|
||||
trend.toValue,
|
||||
trend.toTime,
|
||||
object,
|
||||
name,
|
||||
config.trendRayRight,
|
||||
config.trendRayLeft //
|
||||
);
|
||||
if (has)
|
||||
{
|
||||
//
|
||||
// Apply Style ...
|
||||
object.Color(trendColor);
|
||||
object.Width(config.trendWidth);
|
||||
object.Style(config.trendStyle);
|
||||
|
||||
@@ -2528,23 +2582,26 @@ class XCPOIDrawer : public XCBase
|
||||
|
||||
/**
|
||||
* Draw a Collection of Pattern Analysis ...
|
||||
*
|
||||
*
|
||||
* @param analysises: XPatternAnalysis, collection reference to Data Source ...
|
||||
* @param config: XPatternAnalysisDrawConfig, reference to Specified Drawing Config ...
|
||||
*/
|
||||
void DrawPatternAnalysises(
|
||||
XPatternAnalysis &analysises[],
|
||||
XPatternAnalysisDrawConfig &config //
|
||||
) {
|
||||
)
|
||||
{
|
||||
//
|
||||
bool has = HasChild(analysises);
|
||||
if (!has) {
|
||||
if (!has)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//
|
||||
int count = ArraySize(analysises);
|
||||
for (int i = 0; i < count; i++) {
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
DrawPatternAnalysis(analysises[i], config);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user