refactor all requirements for draw and detect pois and also add Fima Helper, Parser Class Implementations for Separation of Concerns ...

This commit is contained in:
2025-10-24 05:03:31 +03:30
parent d63c5596fc
commit 0b0cd70049
21 changed files with 25191 additions and 8447 deletions
+26 -26
View File
@@ -513,6 +513,32 @@ class XCBaseHelper : public XCBase
return result;
}
/**
* Normalizing Bar Index ...
*
* @param barIndex: int, Provided Bar Index ...
*
* @return ( int )
*/
int NormalizeBarIndex(int barIndex)
{
//
int result = barIndex;
//
if (!IsValid())
{
return result;
}
//
int count = CountBars() - 1;
result = NormalizeInt(result, 0, count - 1);
//
return result;
}
//
// Protected ...
protected:
@@ -635,32 +661,6 @@ class XCBaseHelper : public XCBase
return result;
}
/**
* Normalizing Bar Index ...
*
* @param barIndex: int, Provided Bar Index ...
*
* @return ( int )
*/
int NormalizeBarIndex(int barIndex)
{
//
int result = barIndex;
//
if (!IsValid())
{
return result;
}
//
int count = CountBars() - 1;
result = NormalizeInt(result, 0, count - 1);
//
return result;
}
//
// Private ...
private:
File diff suppressed because it is too large Load Diff
+43
View File
@@ -1460,6 +1460,49 @@ class XCPOIDrawer : public XCBase
}
}
/**
* Draw Pivots ...
*
* @param pivots: XPivot, collection reference to Draw ...
* @param config: XPOIDrawConfig, reference to Specified Draw Style ...
*/
void DrawPivots(
XPivot &pivots[],
XPOIDrawConfig &config //
)
{
//
// Validate ...
bool has = HasChild(pivots);
if (!has)
{
return;
}
//
XPivot tmps[];
int count = ArraySize(pivots);
for (int i = 0; i < count; i++)
{
//
XClean(tmps);
int sameCounts = ExtractSameTimePivots(pivots[i], tmps, pivots);
has = IsValidSize(sameCounts);
if (has)
{
//
for (int j = 0; j < sameCounts; j++)
{
DrawPivot(tmps[j], config, j + 1);
}
}
}
//
// Cleanup ...
XClean(tmps);
}
/**
* Draw Specified Pattern info ...
*