Add Support for Sar Changes Detection ...

This commit is contained in:
2024-12-10 01:38:29 +03:30
parent 812e468151
commit b5cec1f52a
4 changed files with 453 additions and 119 deletions
+38 -2
View File
@@ -215,7 +215,7 @@ struct XTick
double bid; // Bid ...
double ask; // Ask ...
double spread; // Spread ...
long volume; // Volume ...
long volume; // Volume ...
//
// Constructor ...
@@ -10398,6 +10398,41 @@ bool RemoveLastItem(
return result;
}
template <typename T>
void CleanupArray(
T &buffer[], // Buffer to Cleanup ...
int maxAllowed = 0 // Max Allowed Number of items ...
)
{
//
if (maxAllowed <= 0)
{
return;
}
//
int count = ArraySize(buffer);
if (!IsValidSize(count) ||
count <= maxAllowed)
{
return;
}
//
int mustRemove = count - maxAllowed;
if (!IsValidSize(mustRemove))
{
return;
}
//
ArrayRemove(
buffer,
0,
mustRemove //
);
}
//
// Search Array For Specific Item ...
template <typename T>
@@ -10851,7 +10886,8 @@ void FindSames(
void AddIfNotExists(
double value,
double &values[],
double smoothingPoint = 3)
double smoothingPoint = 3 //
)
{
//
double smoothingValue = smoothingPoint * GetPoints(_Symbol);