last works ...
This commit is contained in:
@@ -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 ...
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user