last works ...

Resolve all XPOI XPivot and XPivotAnalysis Refactoring Side Affects on XFIMA ...
This commit is contained in:
2025-09-23 01:47:54 +03:30
parent bb2aff17a9
commit 11811624d9
6 changed files with 244 additions and 2153 deletions
@@ -33,179 +33,6 @@ class XCXFIMAPOIDrawer : public XCPOIDrawer
public:
//
/**
* Draw Specified XZigZagMarketStyle on Chart ...
*
* @param object: XCZigZagAnalysisObject, pointer reference to Drawn Object ...
* @param model: XZigZagAnalysis, reference to Model ...
* @param numberOfPivots: int, required number of pivots for Draw Trends ...
* @param rayRight: bool, Ray To Right ...
* @param rayLeft: bool, Ray To Left ...
*
* @return ( bool )
*/
bool DrawZigZagMarketAnalysisByPV(
XCZigZagAnalysisObject *&object,
XZigZagAnalysis &model,
bool rayRight = false,
bool rayLeft = false,
int numberOfPivots = 2 //
)
{
//
bool result = false;
//
// Prepare ...
object = NULL;
//
// Validate ...
result = model.IsValid();
if (!result)
{
return result;
}
//
object = new XCZigZagAnalysisObject();
result = object.CreateByPV(
ChartIdentification(),
SubWindowIdentification(),
model //
);
if (result)
{
//
// Apply Style ...
bool isBullish = model.IsBullish();
//
XPOIStyle style;
if (isBullish)
{
style = defaultBullishStyle;
}
else
{
style = defaultBearishStyle;
}
//
ApplyZigZagMarketAnalysisStyle(
object,
style,
true, // Ray Right ...
false // Ray Left ...
);
}
//
return result;
}
/**
* Draw Specified XZigZagMarketStyle on Chart ...
*
* @param object: XCZigZagAnalysisObject, pointer reference to Drawn Object ...
* @param model: XZigZagAnalysis, reference to Model ...
* @param numberOfPivots: int, required number of pivots for Draw Trends ...
* @param rayRight: bool, Ray To Right ...
* @param rayLeft: bool, Ray To Left ...
*
* @return ( bool )
*/
bool DrawZigZagMarketAnalysisByRecent(
XCZigZagAnalysisObject *&object,
XZigZagAnalysis &model,
bool rayRight = false,
bool rayLeft = false,
int numberOfPivots = 2 //
)
{
//
bool result = false;
//
// Prepare ...
object = NULL;
//
// Validate ...
result = model.IsValid();
if (!result)
{
return result;
}
//
object = new XCZigZagAnalysisObject();
result = object.CreateByRecent(
ChartIdentification(),
SubWindowIdentification(),
model,
numberOfPivots //
);
if (result)
{
//
// Apply Style ...
bool isBullish = model.IsBullish();
//
XPOIStyle style;
if (isBullish)
{
style = defaultBullishStyle;
}
else
{
style = defaultBearishStyle;
}
//
ApplyZigZagMarketAnalysisStyle(
object,
style,
true, // Ray Right ...
false // Ray Left ...
);
}
//
return result;
}
/**
* Apply Specified Style to Object ...
*/
void ApplyZigZagMarketAnalysisStyle(
XCZigZagAnalysisObject *&object,
XPOIStyle &style,
bool rayRight = false,
bool rayLeft = false //
)
{
//
bool has = object != NULL;
if (!has)
{
return;
}
//
object.UpperColor(style.clr);
object.LowerColor(style.clr);
object.UpperWidth(style.width);
object.UpperRayLeft(rayLeft);
object.UpperRayRight(rayRight);
object.LowerWidth(style.width);
object.UpperStyle(style.style);
object.LowerStyle(style.style);
object.LowerRayLeft(rayLeft);
object.LowerRayRight(rayRight);
}
//
};