This commit is contained in:
2025-06-03 16:22:01 +03:30
parent 48123642b7
commit 078dc35ae0
9 changed files with 3005 additions and 45 deletions
+26 -6
View File
@@ -150,6 +150,20 @@ enum ENUM_X_POSITION_TYPES
X_POSITION_TYPE_SHORT = 3,
};
//
bool IsValid(ENUM_X_POSITION_TYPES value)
{
return value != X_POSITION_TYPE_NONE;
}
//
bool HasSpecifiedType(ENUM_X_POSITION_TYPES value)
{
//
return value == X_POSITION_TYPE_LONG ||
value == X_POSITION_TYPE_SHORT;
}
//
string ToString(ENUM_X_POSITION_TYPES value)
{
@@ -190,6 +204,12 @@ bool IsLong(ENUM_X_POSITION_TYPES value)
return value == X_POSITION_TYPE_LONG;
}
//
bool IsShort(ENUM_X_POSITION_TYPES value)
{
return value == X_POSITION_TYPE_SHORT;
}
//
bool ToPositionType(
ENUM_POSITION_TYPE &dest,
@@ -3096,7 +3116,7 @@ struct XSymbolPositions
if (isLong)
{
//
result = FindMaxInDrawdownIndex(
result = FindMaxDrawdownIndex(
longs //
);
@@ -3109,7 +3129,7 @@ struct XSymbolPositions
else
{
//
result = FindMaxInDrawdownIndex(
result = FindMaxDrawdownIndex(
shorts //
);
@@ -3150,7 +3170,7 @@ struct XSymbolPositions
if (isLong)
{
//
result = FindMinInDrawdownIndex(
result = FindMinDrawdownIndex(
longs //
);
@@ -3163,7 +3183,7 @@ struct XSymbolPositions
else
{
//
result = FindMinInDrawdownIndex(
result = FindMinDrawdownIndex(
shorts //
);
@@ -3755,7 +3775,7 @@ int ExtractInProfitPositions(
}
//
int FindMaxInDrawdownIndex(
int FindMaxDrawdownIndex(
XPosition &positions[] // Position Collection
)
{
@@ -3795,7 +3815,7 @@ int FindMaxInDrawdownIndex(
}
//
int FindMinInDrawdownIndex(
int FindMinDrawdownIndex(
XPosition &positions[] // Position Collection
)
{