This commit is contained in:
2024-06-12 18:38:23 +03:30
parent 834090a2be
commit 0fa788d126
3 changed files with 40 additions and 55 deletions
+21
View File
@@ -729,6 +729,26 @@ public:
mReuiredSignalVerifications = value;
}
//
int MaxAllowedTrades()
{
return mMaxAllowedTrades;
}
//
void MaxAllowedTrades(int value)
{
//
if (value < 0)
{
value = 0;
}
//
mMaxAllowedTrades = value;
mTrader.SetMaxAllowedPositions(value);
}
//
bool IsEnable()
{
@@ -1489,6 +1509,7 @@ private:
double mSLPoint; // SL Point
bool mIgnoreTP; // Ignore Calculated TP
bool mIgnoreSL; // Ignore Calculated SL
int mMaxAllowedTrades; // Max Alloed Positions
bool mCloseOnOpposit; // Close all Positions on Opposit
int mReuiredSignalVerifications; // Required Verifications for Validate Signals
+13 -50
View File
@@ -605,12 +605,6 @@ public:
return mMagicNumber;
}
//
int GetManageInterval()
{
return mManageInterval;
}
//
double GetMaxAllowedSpread()
{
@@ -623,6 +617,19 @@ public:
return mMaxAllowedPositions;
}
//
void SetMaxAllowedPositions(int value)
{
//
if (value < 0)
{
value = 0;
}
//
mMaxAllowedPositions = value;
}
//
double GetMaxAllowedDrawdownFactor()
{
@@ -1062,46 +1069,6 @@ public:
return result;
}
//
// Manage ...
// this must be Call on OnTick for Manage
// Positions ...
// NOTE: Call this Before Checking IsNewBar ...
void Manage()
{
// //
// // All required Position Managements Actions implemented here ...
// datetime tmc = TimeCurrent();
// bool canManage = !IsValid(mLastManageOn)
// ? true
// : mLastManageOn + mManageInterval >= tmc;
// if (!canManage)
// {
// return;
// }
// //
// mLastManageOn = tmc;
//
// - [] Partial Close;
// - [] Risk Free;
// - [] Trail Stop;
// - [] SLS;
// - [] TPS;
//
// - [] Data Collector;
// - [] Profit Management;
//
// TODO: Implement them ...
//
// Implement Signal Collector Inside this Class
// and Manipulate Signals when SL/TP/Partial Close/Trail Stop/Profit/Close/ Modify and etc Happens ...
}
//
// Execute a Signal ...
bool ExecuteSignal(
@@ -3673,10 +3640,6 @@ private:
int mSlippage; // Slippage ...
ulong mMagicNumber; // Magic Number (Unique Identifier) ...
//
datetime mLastManageOn; // Last Manager Check
int mManageInterval; // Manager Check Intervals Seconds
//
double mMaxAllowedSpread; // Max Allowed Spred for Opening Trades
int mMaxAllowedPositions; // Max Allowed Same Positions