This commit is contained in:
2024-06-24 11:58:37 +03:30
parent d5658a8e27
commit 3acd8d355f
2 changed files with 71 additions and 37 deletions
+68 -34
View File
@@ -3732,14 +3732,14 @@ public:
mConditions,
otherConditions //
);
AddRef(
lConditions,
otherConditions //
);
AddRef(
hConditions,
otherConditions //
);
// AddRef(
// lConditions,
// otherConditions //
// );
// AddRef(
// hConditions,
// otherConditions //
// );
}
//
@@ -3757,14 +3757,14 @@ public:
mConditions,
otherConditions //
);
AddRef(
lConditions,
otherConditions //
);
AddRef(
hConditions,
otherConditions //
);
// AddRef(
// lConditions,
// otherConditions //
// );
// AddRef(
// hConditions,
// otherConditions //
// );
}
//
@@ -3775,11 +3775,11 @@ public:
//
AddRef(
cConditions,
sConditions,
otherConditions //
);
AddRef(
sConditions,
lConditions,
otherConditions //
);
}
@@ -3791,18 +3791,18 @@ public:
signal = lSignal;
//
AddRef(
cConditions,
otherConditions //
);
AddRef(
sConditions,
otherConditions //
);
// AddRef(
// cConditions,
// otherConditions //
// );
AddRef(
mConditions,
otherConditions //
);
AddRef(
hConditions,
otherConditions //
);
}
//
@@ -3820,6 +3820,18 @@ public:
sConditions,
otherConditions //
);
AddRef(
mConditions,
otherConditions //
);
AddRef(
lConditions,
otherConditions //
);
AddRef(
hConditions,
otherConditions //
);
}
//
@@ -5012,26 +5024,48 @@ private:
int setupIDX = FindSetupIndex(positions[maxInDIDX].symbol);
if (IsValidIndex(maxInDIDX) && IsValidIndex(setupIDX))
{
//
string iSymbol = positions[maxInDIDX].symbol;
ENUM_TIMEFRAMES iPeriod = mSetups[setupIDX].GetPeriod();
//
// Check Position Age ...
int age = GetAge(
positions[maxInDIDX],
mSetups[setupIDX].GetPeriod() //
iPeriod //
);
if (age >= 700)
{
//
string comment = XEQMSupportToken + " Close Max In D ...";
bool isClosed = mTrader.Close(
positions[maxInDIDX].ticket,
comment //
// Calculate Trend ...
XSCTrend *trend = new XSCTrend(
iSymbol,
iPeriod //
);
if (isClosed)
//
XSCTrendInput tInputs;
tInputs.Default();
bool canUseTrend = trend.Init(tInputs);
if (canUseTrend)
{
//
string message = XEQMSupportToken + " Close Position (" + ToString(positions[maxInDIDX].ticket) + ") Due Max In Drawdown ...";
Alert(message);
trend.Draw();
Print("UseTrend");
trend.Remove();
}
// string comment = XEQMSupportToken + " Close Max In D ...";
// bool isClosed = mTrader.Close(
// positions[maxInDIDX].ticket,
// comment //
// );
// if (isClosed)
// {
// //
// string message = XEQMSupportToken + " Close Position (" + ToString(positions[maxInDIDX].ticket) + ") Due Max In Drawdown ...";
// Alert(message);
// }
}
}
}