This commit is contained in:
2024-06-27 19:03:17 +03:30
parent 3fca0fb9c5
commit 8dfe216d82
3 changed files with 504 additions and 91 deletions
+49
View File
@@ -2797,6 +2797,9 @@ struct XSymbolPositions
XPosition shorts[];
XPosition positions[];
//
bool forceHedge;
//
XSymbolPositions()
{
@@ -2862,6 +2865,7 @@ struct XSymbolPositions
{
//
symbol = NULL;
forceHedge = false;
//
profit = 0;
@@ -2928,6 +2932,51 @@ struct XSymbolPositions
//
};
//
bool IsContainsSymbol(
string symbol,
int &_index,
XSymbolPositions &_items[] //
)
{
//
bool result = false;
//
_index = -1;
//
result = IsValid(symbol);
if (!result)
{
return result;
}
//
int itemsCount = ArraySize(_items);
result = IsValidSize(itemsCount);
if (!result)
{
return result;
}
//
for (int i = 0; i < itemsCount; i++)
{
//
result = _items[i].symbol == symbol;
if (result)
{
//
_index = i;
break;
}
}
//
return result;
}
//
// TypeDefs ...