This commit is contained in:
2024-05-30 11:58:40 +03:30
parent 2893b5247f
commit 9cfd0b7802
4 changed files with 41 additions and 100 deletions
+18 -34
View File
@@ -34,7 +34,6 @@ struct XBuffer
//
string title; // Buffer Title
double values[]; // Buffer Values
bool asSeries; // As Series Flag
//
// Constructor ...
@@ -46,8 +45,7 @@ struct XBuffer
//
// Tools ...
bool Init(
string mTitle, // Title
bool mAsSeries = true // As Series Flag
string mTitle // Title
)
{
//
@@ -76,10 +74,6 @@ struct XBuffer
//
result = IsValid();
//
asSeries = mAsSeries;
ArraySetAsSeries(values, mAsSeries);
//
return result;
}
@@ -163,9 +157,6 @@ struct XBuffer
return result;
}
//
ArraySetAsSeries(values, true);
//
int count = Count();
ArrayResize(
@@ -179,9 +170,6 @@ struct XBuffer
//
result = Count();
//
ArraySetAsSeries(values, asSeries);
//
return result;
}
@@ -189,8 +177,7 @@ struct XBuffer
//
// Get Specified Index Value ...
double Get(
int index, // Specified Index
bool reverse = false // Retrieve Reversal Index Value
int index // Specified Index
)
{
//
@@ -202,21 +189,9 @@ struct XBuffer
values //
);
//
if (reverse)
{
ArraySetAsSeries(values, !asSeries);
}
//
result = values[index];
//
if (reverse)
{
ArraySetAsSeries(values, asSeries);
}
//
return result;
}
@@ -409,7 +384,7 @@ public:
//
// Calculate Limit ...
// this means Required Bars for Calculation ...
int CalculateLimit()
int CountLimit()
{
//
int result = 0;
@@ -588,12 +563,21 @@ public:
Calculate();
//
for (int i = start; i < start + count - 1; i++)
{
//
result++;
buffer[i] = mBuffers[bufferIDX].values[i];
}
result = ArrayCopy(
buffer,
mBuffers[bufferIDX].values,
start,
start,
count //
);
//
// for (int i = start; i < start + count - 1; i++)
// {
// //
// result++;
// buffer[i] = mBuffers[bufferIDX].values[i];
// }
//
return result;