cleanup repo ...
This commit is contained in:
@@ -136,6 +136,7 @@ int limit;
|
||||
int maxLength;
|
||||
|
||||
//
|
||||
int firstBarIndex;
|
||||
|
||||
//
|
||||
// Event Handlers ...
|
||||
@@ -418,9 +419,21 @@ void CalculateBuffers(
|
||||
int barsLimit = startCalculationForLastBars > 0
|
||||
? startCalculationForLastBars
|
||||
: 0;
|
||||
if (barsLimit == 0)
|
||||
{
|
||||
//
|
||||
barsLimit = ratesTotal;
|
||||
firstBarIndex = barsLimit - 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
//
|
||||
firstBarIndex = startCalculationForLastBars;
|
||||
}
|
||||
|
||||
//
|
||||
// bool canCalculate = true;
|
||||
bool canCalculate =
|
||||
barsLimit == 0 ||
|
||||
bar_index <= barsLimit;
|
||||
if (canCalculate)
|
||||
{
|
||||
@@ -487,6 +500,13 @@ void CalculateXHK(
|
||||
const double &low[] //
|
||||
)
|
||||
{
|
||||
//
|
||||
int lastBarIndex = bar_index + 1;
|
||||
bool isFirstBar =
|
||||
startCalculationForLastBars > 0
|
||||
? bar_index == startCalculationForLastBars
|
||||
: bar_index == firstBarIndex;
|
||||
|
||||
//
|
||||
double mPrevHKOpenValue;
|
||||
double mPrevHKCloseValue;
|
||||
|
||||
Reference in New Issue
Block a user