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:
@@ -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
@@ -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 ...
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user