This commit is contained in:
2025-09-21 05:59:18 +03:30
parent 73a97a80b3
commit 98b62aba96
6 changed files with 3108 additions and 196 deletions
+65
View File
@@ -889,6 +889,71 @@ class XCPOIDrawer : public XCBase
return result;
}
/**
* Draw Specified Trend Line ...
*
* @param fromPrice: double, from Price ...
* @param fromTime: datetime, from Time ...
* @param toPrice: double, to Price ...
* @param toTime: datetime, to Time ...
* @param name: Object Name ...
* @param rayRight: bool, ray to Right ...
* @param rayLeft: boo, ray to Left ...
*
* @return ( bool )
*/
bool DrawTrendLine(
double fromPrice,
datetime fromTime,
double toPrice,
datetime toTime,
CChartObjectTrend *&object,
string name,
bool rayRight = false,
bool rayLeft = false //
)
{
//
bool result = false;
//
// Prepare ...
object = new CChartObjectTrend();
//
// Validate ...
result =
toPrice > 0 &&
fromPrice > 0 &&
IsSpecifiedValid(toTime) &&
IsSpecifiedValid(fromTime) &&
toTime > fromTime;
if (!result)
{
return result;
}
//
// Create Object ...
result = object.Create(
ChartIdentification(),
name,
SubWindowIdentification(),
fromTime,
fromPrice,
toTime,
toPrice //
);
if (result) {
//
object.RayLeft(rayLeft);
object.RayRight(rayRight);
}
//
return result;
}
/**
* Draw Trend Line based on Swings Points ...
*