cleanup repo ...

This commit is contained in:
2025-05-23 06:37:48 +03:30
parent 71fe9abf12
commit 0adca23cff
6 changed files with 77 additions and 2473 deletions
+21 -1
View File
@@ -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;