last works on Detecting Pivots ...

- Pivots Detection works Fine;
- Analyse Pivots Has some issues and i have to Fix them ...
This commit is contained in:
2025-09-23 16:36:53 +03:30
parent 1a948307f2
commit 3812246e5c
9 changed files with 1934 additions and 143 deletions
@@ -5218,7 +5218,8 @@ void AddIfNotExists(
void AddsIfNotExists(
double &source[],
double &dest[],
double smoothingPoint = 3)
double smoothingPoint = 3 //
)
{
//
double smoothingValue = smoothingPoint * GetPoints(_Symbol);
@@ -674,7 +674,7 @@ struct XPivotAnalysis
//
NotEmpty(peakTo) &&
NotEmpty(peakFrom) &&
HasDirection(peakDir) &&
// HasDirection(peakDir) &&
IsSpecifiedValid(toTime) &&
IsSpecifiedValid(fromTime)
//
@@ -702,7 +702,7 @@ struct XPivotAnalysis
//
NotEmpty(valeTo) &&
NotEmpty(valeFrom) &&
HasDirection(valeDir) &&
// HasDirection(valeDir) &&
IsSpecifiedValid(toTime) &&
IsSpecifiedValid(fromTime)
//
-95
View File
@@ -239,101 +239,6 @@ struct XPivot
return result;
}
/**
* Check Structure Exists in Specified Collection or not ...
*
* @param items: XPivot, reference Array ...
* @param index: int, reference to Holds Founded Index ...
*
* @return ( bool )
*/
bool IsExists(
XPivot &items[],
int &index //
)
{
//
bool result = false;
//
// Prepare ...
index = -1;
//
// Validate ...
result =
IsValid() &&
HasChild(items);
if (!result)
{
return result;
}
//
int count = ArraySize(items);
for (int i = 0; i < count; i++)
{
//
result = IsSameAs(items[i]);
if (result)
{
//
index = i;
//
break;
}
}
//
result =
result &&
IsValidIndex(index);
//
return result;
}
/**
* Add Structure to Specified Collection only if not Exists ...
*
* @param items: XPivot, reference Array ...
*/
void AddIfNotExists(XPivot &items[])
{
//
// Validate ...
if (!IsValid())
{
return;
}
//
if (!HasChild(items))
{
//
AddRef(
this,
items //
);
//
return;
}
//
int index = -1;
bool isExists = IsExists(items, index);
if (!isExists)
{
//
AddRef(
this,
items //
);
}
}
/**
* Calculate Pivot Age ...
*