This commit is contained in:
2025-02-26 01:44:21 +03:30
parent 22298e8bab
commit 727888d783
19 changed files with 19179 additions and 9414 deletions
+55 -27
View File
@@ -233,7 +233,7 @@ class XCBarArrowObject : public XCBaseObject
//
result =
//
//
bar.IsValid() &&
IsValid(name)
//
@@ -1845,25 +1845,36 @@ class XCSignalObject : public XCBaseObject
//
// TARGET ...
if (signal.target > 0)
bool hasTargets = HasChild(signal.targets);
if (hasTargets)
{
//
string targetName = ToString(X_TARGET) + "_" + nameMD5;
result = mTargetTrend.Create(
chart_id,
targetName,
window,
time1,
signal.target,
time2,
signal.target //
);
if (!result)
int targetsCount = ArraySize(signal.targets);
for (int i = 0; i < targetsCount; i++)
{
//
mTPTrend.Delete();
mSLTrend.Delete();
return result;
string targetName = ToString(X_TARGET) + "_" + ToString(i) + "_" + nameMD5;
CChartObjectTrend *mTargetTrend;
mTargetTrend = new CChartObjectTrend();
result = mTargetTrend.Create(
chart_id,
targetName,
window,
time1,
signal.targets[i],
time2,
signal.targets[i] //
);
if (!result)
{
//
mTPTrend.Delete();
mSLTrend.Delete();
break;
}
//
mTargetTrends.Add(mTargetTrend);
}
}
@@ -1884,7 +1895,7 @@ class XCSignalObject : public XCBaseObject
//
mTPTrend.Delete();
mSLTrend.Delete();
mTargetTrend.Delete();
mTargetTrends.Clear();
return result;
}
@@ -1996,7 +2007,12 @@ class XCSignalObject : public XCBaseObject
}
//
mTargetTrend.Width(value);
for (int i = 0; i < mTargetTrends.Total(); i++)
{
//
CChartObjectTrend *iTrend = (CChartObjectTrend *)mTargetTrends.At(i);
iTrend.Width(value);
}
}
/**
@@ -2006,7 +2022,13 @@ class XCSignalObject : public XCBaseObject
*/
void TargetColor(color value)
{
mTargetTrend.Color(value);
//
for (int i = 0; i < mTargetTrends.Total(); i++)
{
//
CChartObjectTrend *iTrend = (CChartObjectTrend *)mTargetTrends.At(i);
iTrend.Color(value);
}
}
/**
@@ -2016,7 +2038,13 @@ class XCSignalObject : public XCBaseObject
*/
void TargetStyle(ENUM_LINE_STYLE value)
{
mTargetTrend.Style(value);
//
for (int i = 0; i < mTargetTrends.Total(); i++)
{
//
CChartObjectTrend *iTrend = (CChartObjectTrend *)mTargetTrends.At(i);
iTrend.Style(value);
}
}
//
@@ -2077,7 +2105,7 @@ class XCSignalObject : public XCBaseObject
CChartObjectTrend mTPTrend;
CChartObjectTrend mSLTrend;
CChartObjectTrend mEntryTrend;
CChartObjectTrend mTargetTrend;
CArrayObj mTargetTrends;
};
class XCOHCLObject : public XCBaseObject
@@ -2985,19 +3013,19 @@ class XCTrendObject : public XCBaseObject
? first <= second
: first >= second) &&
IsSpecifiedValid(firstTime) &&
IsSpecifiedValid(secondTime)
IsSpecifiedValid(secondTime)
//
;
if (!result)
{
return result;
}
//
ENUM_X_DIRECTION dir =
useMinAsStart
? X_DIRECTION_BULLISH
: X_DIRECTION_BEARISH;
ENUM_X_DIRECTION dir =
useMinAsStart
? X_DIRECTION_BULLISH
: X_DIRECTION_BEARISH;
//
string name = "XTRND" + ToString(dir) + "_" + ToString(first) + "_" + ToString(second);
File diff suppressed because it is too large Load Diff
+5 -187
View File
@@ -3093,7 +3093,7 @@ class XCPOIDrawer : public XCBase
/**
* Create Bar Arrow Object ...
*
*
* @param bar: XOHCL instance Reference ...
* @param priceType: ENUM_X_PRICE member ...
* @param arrow: int, Arrow Code ...
@@ -3101,7 +3101,7 @@ class XCPOIDrawer : public XCBase
* @param width: int, Arrow Width ...
* @param anchor: ENUM_ARROW_ANCHOR, anchor of Arrow ...
* @param name: string, name of Arrow ...
*
*
* @return ( bool )
*/
bool CreateBarArrow(
@@ -3141,10 +3141,10 @@ class XCPOIDrawer : public XCBase
color mBearishColor = BarBearishColor();
//
prefix =
prefix =
(IsValid(prefix)
? prefix + "_"
: prefix) +
? prefix + "_"
: prefix) +
barTag;
//
@@ -3924,24 +3924,6 @@ class XCPOIDrawer : public XCBase
}
}
//
if (drawTicksZone && state.ticksZone != NULL)
{
//
XCTicksZoneObject *iObj;
bool isCreated = CreateTicksZone(
state.ticksZone,
iObj //
);
if (isCreated)
{
Add(
(XCBaseObject *)iObj,
drawnObjects //
);
}
}
//
result = ArraySize(drawnObjects);
@@ -4629,170 +4611,6 @@ class XCPOIDrawer : public XCBase
}
}
//
// Supply Zones ...
has = item.HasSupplyZones();
if (has &&
drawSupplyZones)
{
//
Clean(tmpObjects);
count = item.CountSupplyZones();
for (int i = 0; i < count; i++)
{
//
XCSupplyZoneObject *iZoneObj;
has = CreateSupplyZone(
item.supplyZones[i],
iZoneObj //
);
if (has)
{
//
Add(
(XCBaseObject *)iZoneObj,
tmpObjects //
);
}
}
//
count = ArraySize(tmpObjects);
has = IsValidSize(count);
if (has)
{
//
Copy(
tmpObjects,
objects,
false //
);
}
}
//
// Demand Zones ...
has = item.HasDemandZones();
if (has &&
drawDemandZones)
{
//
Clean(tmpObjects);
count = item.CountDemandZones();
for (int i = 0; i < count; i++)
{
//
XCDemandZoneObject *iZoneObj;
has = CreateDemandZone(
item.demandZones[i],
iZoneObj //
);
if (has)
{
//
Add(
(XCBaseObject *)iZoneObj,
tmpObjects //
);
}
}
//
count = ArraySize(tmpObjects);
has = IsValidSize(count);
if (has)
{
//
Copy(
tmpObjects,
objects,
false //
);
}
}
//
// Support Zones ...
has = item.HasSupportZones();
if (has &&
drawSupportZones)
{
//
Clean(tmpObjects);
count = item.CountSupportZones();
for (int i = 0; i < count; i++)
{
//
XCSupportZoneObject *iZoneObj;
has = CreateSupportZone(
item.supportZones[i],
iZoneObj //
);
if (has)
{
//
Add(
(XCBaseObject *)iZoneObj,
tmpObjects //
);
}
}
//
count = ArraySize(tmpObjects);
has = IsValidSize(count);
if (has)
{
//
Copy(
tmpObjects,
objects,
false //
);
}
}
//
// Resistance Zones ...
has = item.HasResistanceZones();
if (has &&
drawResistanceZones)
{
//
Clean(tmpObjects);
count = item.CountResistanceZones();
for (int i = 0; i < count; i++)
{
//
XCResistanceZoneObject *iZoneObj;
has = CreateResistanceZone(
item.resistanceZones[i],
iZoneObj //
);
if (has)
{
//
Add(
(XCBaseObject *)iZoneObj,
tmpObjects //
);
}
}
//
count = ArraySize(tmpObjects);
has = IsValidSize(count);
if (has)
{
//
Copy(
tmpObjects,
objects,
false //
);
}
}
//
Clean(tmpObjects);