last works ...

This commit is contained in:
2024-06-08 17:48:42 +03:30
parent 6a0f803c1a
commit 96bbe92630
9 changed files with 1314 additions and 102 deletions
+13
View File
@@ -5737,6 +5737,14 @@ bool NotEmpty(T value)
return value != EMPTY_VALUE;
}
//
// Check a Value Not Empty and Zero ...
template <typename T>
bool NotEmptyZero(T value)
{
return value != EMPTY_VALUE && value != 0;
}
//
// Add Specified Item to Array ...
template <typename T>
@@ -5836,6 +5844,11 @@ void Clean(T &buffer[])
ArrayFree(buffer);
ArrayResize(buffer, 0);
}
template <typename T>
void SpecificClean(T &buffer[])
{
Clean(buffer);
}
//
// Copy Whole Content of Source to Dest array ...
+88
View File
@@ -3819,6 +3819,94 @@ bool SpecifiedIsPositionsReadyForHedge(
return result;
}
//
// Extract a Collection of Positions SL ...
int ExtractSLs(
XPosition &positions[],
double &sls[] //
)
{
//
int result = 0;
//
Clean(sls);
//
int positionsCount = ArraySize(positions);
if (!IsValidSize(positionsCount))
{
return result;
}
//
for (int i = 0; i < positionsCount; i++)
{
//
XPosition iPosition = positions[i];
//
if (iPosition.sl > 0)
{
//
Add(
iPosition.sl,
sls //
);
}
}
//
result = ArraySize(sls);
//
return result;
}
//
// Extract a Colletion of Positions TP ...
int ExtractTPs(
XPosition &positions[],
double &tps[] //
)
{
//
int result = 0;
//
Clean(tps);
//
int positionsCount = ArraySize(positions);
if (!IsValidSize(positionsCount))
{
return result;
}
//
for (int i = 0; i < positionsCount; i++)
{
//
XPosition iPosition = positions[i];
//
if (iPosition.tp > 0)
{
//
Add(
iPosition.tp,
tps //
);
}
}
//
result = ArraySize(tps);
//
return result;
}
//
// Retrieve String Representation ...
string ToString(ENUM_X_SIGNAL_EXECUTION_RESULT value)