Add Support for Sar Changes Detection ...
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user