This commit is contained in:
2024-11-19 22:03:44 +03:30
parent ee9ea11b6a
commit a345aa52c1
7 changed files with 1003 additions and 43 deletions
+194 -7
View File
@@ -1372,6 +1372,139 @@ class XCPOIDrawer : public XCBase
BearishFVGStyle(STYLE_DOT);
BearishFVGColor(clrRed);
//
// Add Default TickZone Specs ...
bool isSpecsInited = false;
bool fillTickZone = false;
XTickZoneLevelSpecs specs10;
isSpecsInited = specs10.Init(
10,
clrWhite,
clrWhite,
fillTickZone //
);
if (isSpecsInited)
{
AddTickZoneLevelSpecs(specs10);
}
//
XTickZoneLevelSpecs specs20;
isSpecsInited = specs20.Init(
20,
clrOrange,
clrOrange,
fillTickZone //
);
if (isSpecsInited)
{
AddTickZoneLevelSpecs(specs20);
}
//
XTickZoneLevelSpecs specs30;
isSpecsInited = specs30.Init(
30,
clrOrange,
clrOrange,
fillTickZone //
);
if (isSpecsInited)
{
AddTickZoneLevelSpecs(specs30);
}
//
XTickZoneLevelSpecs specs40;
isSpecsInited = specs40.Init(
40,
clrOrange,
clrOrange,
fillTickZone //
);
if (isSpecsInited)
{
AddTickZoneLevelSpecs(specs40);
}
//
XTickZoneLevelSpecs specs50;
isSpecsInited = specs50.Init(
50,
clrYellow,
clrYellow,
fillTickZone //
);
if (isSpecsInited)
{
AddTickZoneLevelSpecs(specs50);
}
//
XTickZoneLevelSpecs specs60;
isSpecsInited = specs60.Init(
60,
clrYellow,
clrYellow,
fillTickZone //
);
if (isSpecsInited)
{
AddTickZoneLevelSpecs(specs60);
}
//
XTickZoneLevelSpecs specs70;
isSpecsInited = specs70.Init(
70,
clrYellow,
clrYellow,
fillTickZone //
);
if (isSpecsInited)
{
AddTickZoneLevelSpecs(specs70);
}
//
XTickZoneLevelSpecs specs80;
isSpecsInited = specs80.Init(
80,
clrRed,
clrRed,
fillTickZone //
);
if (isSpecsInited)
{
AddTickZoneLevelSpecs(specs80);
}
//
XTickZoneLevelSpecs specs90;
isSpecsInited = specs90.Init(
90,
clrRed,
clrRed,
fillTickZone //
);
if (isSpecsInited)
{
AddTickZoneLevelSpecs(specs90);
}
//
XTickZoneLevelSpecs specs100;
isSpecsInited = specs100.Init(
100,
clrRed,
clrRed,
fillTickZone //
);
if (isSpecsInited)
{
AddTickZoneLevelSpecs(specs100);
}
//
}
@@ -2280,9 +2413,64 @@ class XCPOIDrawer : public XCBase
//
// Ticks Zone ...
/**
* Add Tick Zone Draw Specifications ...
*
* @param specs: XTickZoneLevelSpecs instance ...
*/
void AddTickZoneLevelSpecs(
XTickZoneLevelSpecs &specs //
)
{
//
if (!specs.IsValid())
{
return;
}
//
bool isExists = false;
int count = ArraySize(mTicksZoneSpecs);
if (IsValidSize(count))
{
//
for (int i = 0; i < count; i++)
{
//
XTickZoneLevelSpecs iSpec = mTicksZoneSpecs[i];
//
isExists = specs.percent == iSpec.percent;
if (isExists)
{
break;
}
}
}
if (isExists)
{
return;
}
//
AddRef(
specs,
mTicksZoneSpecs //
);
}
/**
* Draw Specified Ticker Zone ...
*
* @param zone: XCTicksZone instance Specified Ticker Zone ...
* @param object: XCTicksZoneObject pointer ...
*
* @return ( bool )
*/
bool CreateTicksZone(
XCTicksZone &zone,
XCTicksZoneObject *&object)
XCTicksZoneObject *&object //
)
{
//
bool result = false;
@@ -2311,6 +2499,7 @@ class XCPOIDrawer : public XCBase
chartID,
window,
zone,
mTicksZoneSpecs,
prefix //
);
@@ -2320,12 +2509,6 @@ class XCPOIDrawer : public XCBase
return result;
}
//
// object.ZoneFill(fill);
// object.ZoneColor(crl);
// object.ZoneWidth(width);
// object.ZoneStyle(style);
//
return result;
}
@@ -2438,5 +2621,9 @@ class XCPOIDrawer : public XCBase
color mBearishFVGColor; // Bearish FVG Color ...
ENUM_LINE_STYLE mBearishFVGStyle; // Bearish FVG Style ...
//
// Ticks Zone ...
XTickZoneLevelSpecs mTicksZoneSpecs[]; // Zone Draw Specifications ...
//
};