This commit is contained in:
2025-02-22 01:13:26 +03:30
parent 627e9c4706
commit c371004b3b
10 changed files with 2701 additions and 4 deletions
+140 -1
View File
@@ -23,6 +23,7 @@
// Imports ...
#include "../Classes/x-saherelm.base.class.mq5"
#include "../Classes/x-saherelm.x-cobject.class.mq5"
#include "../Libraries/x-saherelm.x-poi.extensions.lib.mq5"
//
// Definitions ...
@@ -2872,6 +2873,66 @@ class XCPOIDrawer : public XCBase
return result;
}
/**
* Create Trend Line Object ...
*
* @param swings: XSwingPoint instance Collection ...
* @param useMinAsStart: Specified Min Value as Start ...
*
* @return ( bool )
*/
bool CreateTrend(
XPoint &swings[],
XCTrendObject *&object,
bool useMinAsStart = true //
)
{
//
bool result = false;
//
object = NULL;
//
result = ArraySize(swings) >= 2 &&
IsValidSize(ArraySize(swings));
if (!result)
{
return result;
}
//
string prefix = Prefix();
long chartID = ChartIdentification();
int window = SubWindowIdentification();
//
object = new XCTrendObject();
result = object.Create(
chartID,
window,
swings,
useMinAsStart,
prefix //
);
//
if (!result)
{
return result;
}
//
color clrTrend = useMinAsStart
? SwingLowColor()
: SwingHighColor();
object.TrendColor(clrTrend);
object.TrendRayRight(true);
//
return result;
}
/**
* Create Consolidation Zone Object ...
*
@@ -2929,7 +2990,7 @@ class XCPOIDrawer : public XCBase
/**
* Create Bar Object ...
*
* @param bar: XOHCL instance Reference ..
* @param bar: XOHCL instance Reference ...
* @param object: XCOHCLObject pointer Reference ..
* @param to: Datetime ...
*
@@ -3030,6 +3091,84 @@ class XCPOIDrawer : public XCBase
return result;
}
/**
* Create Bar Arrow Object ...
*
* @param bar: XOHCL instance Reference ...
* @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 CreateBarArrow(
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();
//
color mBullishColor = BarBullishColor();
color mBearishColor = BarBearishColor();
//
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);
}
//
return result;
}
/**
* Create Specific Box on Chart ...
*