last uncompleted works on xind class ...

This commit is contained in:
2024-05-30 13:28:34 +03:30
parent ca5d23c43f
commit 065700550d
3 changed files with 15 additions and 104 deletions
+5 -45
View File
@@ -284,28 +284,14 @@ public:
int mainIDX = GetBufferIndex("XSCMid"); int mainIDX = GetBufferIndex("XSCMid");
// //
int start = 0; int start = prevCalculated;
if (start == totalBars) {
// // start-=1;
// if (prevCalculated == 0) }
// {
// //
// if (max > 0)
// {
// for (int i = 0; i < max; i++)
// {
// //
// for (int j = 0; j < CountBuffers(); j++)
// {
// mBuffers[j].Add(0);
// }
// }
// }
// }
// //
// Loop through Bars ... // Loop through Bars ...
for (int i = start; i < limit && !IsStopped(); i++) for (int i = start; i < totalBars - 1 && !IsStopped(); i++)
{ {
// //
// XOHCL iBar; // XOHCL iBar;
@@ -331,32 +317,6 @@ public:
} }
} }
// for (int i = totalBars - 1; i >= start && !IsStopped(); i--)
// {
// //
// XOHCL iBar;
// iBar.Init(
// mSymbol,
// mPeriod,
// i //
// );
// //
// double iValue = iBar.close;
// //
// // Print("BarIndex: " + ToString(i), ", iValue: ", iValue);
// //
// if (i > ArraySize(mBuffers[mainIDX].values) - 1)
// {
// ArrayResize(mBuffers[mainIDX].values, i + 1);
// }
// //
// mBuffers[mainIDX].values[i] = iValue;
// }
// //
// Prevent Double Calculation Same Bars ... // Prevent Double Calculation Same Bars ...
mCalculatedBars = totalBars; mCalculatedBars = totalBars;
-51
View File
@@ -578,57 +578,6 @@ public:
return result; return result;
} }
//
// int CopyBuffer(
// string mTitle, // Required Buffer Title
// double &buffer[], // Buffer Dest
// int start = 0, // Start
// int count = 0 // Count, if 0 Whole
// )
// {
// //
// int result = 0;
// //
// // Validate State ...
// if (!IsValid())
// {
// return result;
// }
// //
// // Clean(buffer);
// //
// int bufferIDX = GetBufferIndex(mTitle);
// if (bufferIDX < 0)
// {
// return result;
// }
// //
// Calculate();
// //
// bool asSeries = ArrayGetAsSeries(buffer);
// ArraySetAsSeries(buffer, false);
// //
// result = ArrayCopy(
// buffer,
// mBuffers[bufferIDX].values,
// start,
// start,
// count //
// );
// //
// ArraySetAsSeries(buffer, asSeries);
// //
// return result;
// }
// //
// Protected ... // Protected ...
protected: protected:
+10 -8
View File
@@ -114,7 +114,7 @@ int OnCalculate(
// //
int midCalculatedBars = mMid.GetCalculatedBars(); int midCalculatedBars = mMid.GetCalculatedBars();
if (midCalculatedBars < maxLength) if (midCalculatedBars < 0)
{ {
return prev_calculated; return prev_calculated;
} }
@@ -225,16 +225,18 @@ void SetIndicatorName()
void CalculateBuffers(int barIndex) void CalculateBuffers(int barIndex)
{ {
// //
// double iValue = mMid.GetBufferValue( double iValue = mMid.GetBufferValue(
// "XSCMid", "XSCMid",
barIndex //
);
//
// double iValue = iClose(
// _Symbol,
// _Period,
// barIndex // // barIndex //
// ); // );
// //
double iValue = iClose(
_Symbol,
_Period,
barIndex //
);
mainBuffer[barIndex] = iValue; mainBuffer[barIndex] = iValue;
} }