This commit is contained in:
2024-07-21 17:37:34 +03:30
parent 608d387a92
commit a996143dd3
11 changed files with 3160 additions and 378 deletions
+42
View File
@@ -56,6 +56,8 @@ public:
bool _forceMaxTPSLAsPoint = false, // Force Max TP and SL by Provided Points
double _tpPoint = 0, // TP As Point
double _slPoint = 0, // SL As Point
bool _ignoreTP = false, // TP set to 0
bool _ignoreSL = false, // SL set to 0
bool _allowLong = true,
bool _allowShort = true,
int _maxAllowedLongs = 0,
@@ -70,6 +72,8 @@ public:
mPeriod = _period;
mTPPoint = _tpPoint;
mSLPoint = _slPoint;
mIgnoreTP = _ignoreTP;
mIgnoreSL = _ignoreSL;
mSlippage = _slippage;
mAllowLong = _allowLong;
mAllowShort = _allowShort;
@@ -343,6 +347,30 @@ public:
mSLPoint = value;
}
//
bool IgnoreTP()
{
return mIgnoreTP;
}
//
void IgnoreTP(bool value)
{
mIgnoreTP = value;
}
//
bool IgnoreSL()
{
return mIgnoreSL;
}
//
void IgnoreSL(bool value)
{
mIgnoreSL = value;
}
//
// Virtual Methods ...
@@ -560,6 +588,18 @@ public:
}
}
//
if (mIgnoreTP)
{
signal.tp = 0;
}
//
if (mIgnoreSL)
{
signal.sl = 0;
}
//
ENUM_X_SIGNAL_EXECUTION_RESULT state;
result = trader.ExecuteSignal(
@@ -616,6 +656,8 @@ protected:
bool mForceMaxTPSLAsPoint; // Force Max TP and SL by Provided Points
double mTPPoint; // TP As Point
double mSLPoint; // SL As Point
bool mIgnoreTP; // TP set to 0
bool mIgnoreSL; // SL set to 0
//
string mSymbol; // Trading Symbol ...