This commit is contained in:
2024-05-27 09:06:04 +03:30
parent c1aa4fe888
commit 30dd2f1aaf
13 changed files with 2337 additions and 368 deletions
+41
View File
@@ -2763,6 +2763,47 @@ ENUM_X_MARKET_CYCLES NormalizeCycle(ENUM_X_MARKET_CYCLES value)
return value;
}
//
// Validate a Buffer Size for Looping or etc ...
bool IsValidSize(int size)
{
//
bool result = size > 0;
//
return result;
}
//
// Normalize Index Based On Specified Buffer ...
template <typename T>
void NormalizeIndex(
int &index,
T &buffer[] //
)
{
//
int bufferSize = ArraySize(buffer);
//
if (bufferSize <= 0)
{
index = 0;
}
//
if (index <= 0)
{
index = 0;
}
//
if (index > bufferSize - 1)
{
index = bufferSize - 1;
}
}
//
// Normalize a give Volume ...
double NormalizeVolume(