last ...
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -43,15 +43,16 @@ string x121EASymbols = "EURUSDb"; // Symbols
|
||||
// Signals ...
|
||||
bool x121EAAllowLong = true; // Allow Long Trades
|
||||
bool x121EAAllowShort = true; // Allow Short Trades
|
||||
int x121EAReuiredSignalVerifications = 3; // Required Verifications for Signals
|
||||
int x121EAReuiredSignalVerifications = 5; // Required Verifications for Signals
|
||||
|
||||
//
|
||||
// Risk Management ...
|
||||
double x121EAVolume = 0.01; // Static Volume
|
||||
double x121EATPPoint = 30; // TP Point
|
||||
double x121EASLPoint = 300; // SL Point
|
||||
double x121EAVolume = 0.01; // Static Volume
|
||||
double x121EATPPoint = 50; // TP Point
|
||||
double x121EASLPoint = 500; // SL Point
|
||||
int x121EAMaxAllowedTrades = 1; // Max Allowed Positions
|
||||
bool x121EAIgnoreSL = false; // Ignore Calculated SL
|
||||
bool x121EAIgnoreTP = false; // Ignore Calculated TP
|
||||
bool x121EAIgnoreTP = false; // Ignore Calculated TP
|
||||
bool x121EACloseOnOpposit = false; // Close all Positions on Opposit
|
||||
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user