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:
@@ -2271,6 +2271,7 @@ void SortBar(
|
||||
//+------------------------------------------------------------------+
|
||||
//| Extraction |
|
||||
//+------------------------------------------------------------------+
|
||||
|
||||
/**
|
||||
* Extract Specific Types of Pivots From a Collection ...
|
||||
*
|
||||
@@ -2329,6 +2330,61 @@ int ExtractPivots(
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Extract Same Time Pivots ...
|
||||
*
|
||||
* @param item: XPivot, reference to Specified Pivot for Detect Same Times ...
|
||||
* @param dest: XPivot, collection reference to holds Same Times Pivots ...
|
||||
* @param source: XPivot, collection reference to Provide Data Source ...
|
||||
*
|
||||
* @return ( int )
|
||||
*/
|
||||
int ExtractSameTimePivots(
|
||||
XPivot &item,
|
||||
XPivot &dest[],
|
||||
XPivot &source[] //
|
||||
)
|
||||
{
|
||||
//
|
||||
int result = 0;
|
||||
|
||||
//
|
||||
// Prepare ...
|
||||
XClean(dest);
|
||||
|
||||
//
|
||||
// Validate ...
|
||||
bool has = HasChild(source) &&
|
||||
item.IsValid();
|
||||
if (!has)
|
||||
{
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// Do ...
|
||||
int count = ArraySize(source);
|
||||
for (int i = 0; i < count; i++)
|
||||
{
|
||||
//
|
||||
has = item.time == source[i].time;
|
||||
if (has)
|
||||
{
|
||||
AddIfNotExists(source[i], dest);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Add item as a Child ...
|
||||
AddIfNotExists(item, dest);
|
||||
|
||||
//
|
||||
result = ArraySize(dest);
|
||||
|
||||
//
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Extract Pivots Data for Linear Regression Calculations ...
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user