l
This commit is contained in:
@@ -305,23 +305,28 @@ public:
|
||||
|
||||
//
|
||||
// Loop through Bars ...
|
||||
for (int i = start; i< totalBars; i++) {
|
||||
for (int i = start; i < limit && !IsStopped(); i++)
|
||||
{
|
||||
//
|
||||
XOHCL iBar;
|
||||
iBar.Init(
|
||||
mSymbol,
|
||||
mPeriod,
|
||||
i //
|
||||
);
|
||||
// XOHCL iBar;
|
||||
// iBar.Init(
|
||||
// mSymbol,
|
||||
// mPeriod,
|
||||
// i //
|
||||
// );
|
||||
|
||||
//
|
||||
double iValue = iBar.close;
|
||||
double iValue = iClose(mSymbol, mPeriod, i);
|
||||
// Print("BarIndex: " + ToString(i), ", iValue: ", iValue);
|
||||
|
||||
//
|
||||
int count = mBuffers[mainIDX].Count();
|
||||
if (count > 0 && i == count - 1) {
|
||||
if (count > 0 && i == count - 1)
|
||||
{
|
||||
mBuffers[mainIDX].Set(i, iValue);
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
mBuffers[mainIDX].Add(iValue);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3143,13 +3143,13 @@ public:
|
||||
if (isPrepared)
|
||||
{
|
||||
//
|
||||
mSignal = sSignal;
|
||||
|
||||
// //
|
||||
// AddRef(
|
||||
// sSignal,
|
||||
// mSignal.supports //
|
||||
// );
|
||||
// mSignal = sSignal;
|
||||
|
||||
//
|
||||
AddRef(
|
||||
sSignal,
|
||||
mSignal.supports //
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -546,15 +546,13 @@ public:
|
||||
}
|
||||
|
||||
//
|
||||
int CopyBuffer(
|
||||
string mTitle, // Required Buffer Title
|
||||
double &buffer[], // Buffer Dest
|
||||
int start = 0, // Start
|
||||
int count = 0 // Count, if 0 Whole
|
||||
double GetBufferValue(
|
||||
string mTitle, // Required Buffer Title
|
||||
int index // Bar Index
|
||||
)
|
||||
{
|
||||
//
|
||||
int result = 0;
|
||||
double result = EMPTY_VALUE;
|
||||
|
||||
//
|
||||
// Validate State ...
|
||||
@@ -563,9 +561,6 @@ public:
|
||||
return result;
|
||||
}
|
||||
|
||||
//
|
||||
// Clean(buffer);
|
||||
|
||||
//
|
||||
int bufferIDX = GetBufferIndex(mTitle);
|
||||
if (bufferIDX < 0)
|
||||
@@ -577,25 +572,63 @@ public:
|
||||
Calculate();
|
||||
|
||||
//
|
||||
bool asSeries = ArrayGetAsSeries(buffer);
|
||||
ArraySetAsSeries(buffer, false);
|
||||
|
||||
//
|
||||
result = ArrayCopy(
|
||||
buffer,
|
||||
mBuffers[bufferIDX].values,
|
||||
start,
|
||||
start,
|
||||
count //
|
||||
);
|
||||
|
||||
//
|
||||
ArraySetAsSeries(buffer, asSeries);
|
||||
result = mBuffers[bufferIDX].Get(index);
|
||||
|
||||
//
|
||||
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:
|
||||
|
||||
Reference in New Issue
Block a user