last ...
This commit is contained in:
@@ -1910,6 +1910,7 @@ public:
|
||||
}
|
||||
|
||||
//
|
||||
data[infoIDX].volume = signal.volume;
|
||||
data[infoIDX].ticket = signal.positionId;
|
||||
|
||||
//
|
||||
@@ -1948,10 +1949,14 @@ public:
|
||||
//
|
||||
// Here we Prepare Handler Structure for
|
||||
// Next Grid Position ...
|
||||
data[infoIDX].PrepareNextGrid(
|
||||
GridDistance(),
|
||||
GridVolumeMultiplier() //
|
||||
);
|
||||
if (data[infoIDX].allowGrid)
|
||||
{
|
||||
//
|
||||
data[infoIDX].PrepareNextGrid(
|
||||
GridDistance(),
|
||||
GridVolumeMultiplier() //
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
@@ -1959,11 +1964,15 @@ public:
|
||||
if (EnableRecovery())
|
||||
{
|
||||
//
|
||||
data[infoIDX].PrepareNextRecovery(
|
||||
GridDistance(),
|
||||
GridVolumeMultiplier(),
|
||||
signal.type //
|
||||
);
|
||||
if (data[infoIDX].allowRecover)
|
||||
{
|
||||
//
|
||||
data[infoIDX].PrepareNextRecovery(
|
||||
GridDistance(),
|
||||
GridVolumeMultiplier(),
|
||||
signal.type //
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3770,19 +3779,23 @@ public:
|
||||
}
|
||||
|
||||
//
|
||||
double MaxAllowedDrawdownPercent() {
|
||||
double MaxAllowedDrawdownPercent()
|
||||
{
|
||||
return mMaxAllowedDrawdownPercent;
|
||||
}
|
||||
|
||||
//
|
||||
void MaxAllowedDrawdownPercent(double value) {
|
||||
void MaxAllowedDrawdownPercent(double value)
|
||||
{
|
||||
//
|
||||
if (value < 0) {
|
||||
if (value < 0)
|
||||
{
|
||||
value = 0;
|
||||
}
|
||||
|
||||
//
|
||||
if (value > 50) {
|
||||
if (value > 50)
|
||||
{
|
||||
value = 50;
|
||||
}
|
||||
|
||||
@@ -4153,6 +4166,7 @@ public:
|
||||
if (cHasSignal)
|
||||
{
|
||||
//
|
||||
signal.Clean();
|
||||
signal = cSignal;
|
||||
|
||||
//
|
||||
@@ -4170,6 +4184,7 @@ public:
|
||||
if (sHasSignal)
|
||||
{
|
||||
//
|
||||
signal.Clean();
|
||||
signal = sSignal;
|
||||
|
||||
//
|
||||
@@ -4187,6 +4202,7 @@ public:
|
||||
if (mHasSignal)
|
||||
{
|
||||
//
|
||||
signal.Clean();
|
||||
signal = mSignal;
|
||||
|
||||
//
|
||||
@@ -4204,6 +4220,7 @@ public:
|
||||
if (lHasSignal)
|
||||
{
|
||||
//
|
||||
signal.Clean();
|
||||
signal = lSignal;
|
||||
|
||||
//
|
||||
@@ -4221,6 +4238,7 @@ public:
|
||||
if (hHasSignal)
|
||||
{
|
||||
//
|
||||
signal.Clean();
|
||||
signal = hSignal;
|
||||
|
||||
//
|
||||
|
||||
@@ -1102,7 +1102,10 @@ public:
|
||||
//
|
||||
// Prepare Signal Comment ...
|
||||
string mSComment = mSignal.GenerateComment();
|
||||
mSignal.comment += mSComment;
|
||||
if (!Contains(mSComment, mSignal.comment))
|
||||
{
|
||||
mSignal.comment += mSComment;
|
||||
}
|
||||
|
||||
//
|
||||
// Handle Market Execution ...
|
||||
@@ -1841,12 +1844,12 @@ public:
|
||||
//
|
||||
// Close Specified Positions ...
|
||||
int Close(
|
||||
string comment = NULL, // Close Position By Specific Comment
|
||||
string symbol = NULL, // Trading Symbol
|
||||
string provider = NULL, // Signal Provider
|
||||
ENUM_TIMEFRAMES period = NULL, // Trading Period
|
||||
string comment = NULL, // Close Position By Specific Comment
|
||||
string symbol = NULL, // Trading Symbol
|
||||
string provider = NULL, // Signal Provider
|
||||
ENUM_TIMEFRAMES period = NULL, // Trading Period
|
||||
ENUM_X_POSITION_TYPES type = NULL, // Long (Buy) or Short (Sell)
|
||||
bool filterByMagic = true // Get Only Self Open Positions
|
||||
bool filterByMagic = true // Get Only Self Open Positions
|
||||
)
|
||||
{
|
||||
//
|
||||
@@ -2031,11 +2034,11 @@ public:
|
||||
//
|
||||
// Calculate Positions Profit ...
|
||||
double Profit(
|
||||
string symbol = NULL, // Trading Symbol
|
||||
string provider = NULL, // Signal Provider
|
||||
ENUM_TIMEFRAMES period = NULL, // Trading Period
|
||||
string symbol = NULL, // Trading Symbol
|
||||
string provider = NULL, // Signal Provider
|
||||
ENUM_TIMEFRAMES period = NULL, // Trading Period
|
||||
ENUM_X_POSITION_TYPES type = NULL, // Long (Buy) or Short (Sell)
|
||||
bool filterByMagic = true // Get Only Self Open Positions
|
||||
bool filterByMagic = true // Get Only Self Open Positions
|
||||
)
|
||||
{
|
||||
//
|
||||
@@ -2095,13 +2098,13 @@ public:
|
||||
//
|
||||
// Retrieve Positions ...
|
||||
int GetPositions(
|
||||
XPosition &result[], // Hold's Result
|
||||
string symbol = NULL, // Trading Symbol
|
||||
string provider = NULL, // Signal Provider
|
||||
ENUM_TIMEFRAMES period = NULL, // Trading Period
|
||||
XPosition &result[], // Hold's Result
|
||||
string symbol = NULL, // Trading Symbol
|
||||
string provider = NULL, // Signal Provider
|
||||
ENUM_TIMEFRAMES period = NULL, // Trading Period
|
||||
ENUM_X_POSITION_TYPES type = NULL, // Long (Buy) or Short (Sell)
|
||||
bool filterByMagic = true, // Get Only Self Open Positions
|
||||
bool forceClean = true // Clean Result Array
|
||||
bool filterByMagic = true, // Get Only Self Open Positions
|
||||
bool forceClean = true // Clean Result Array
|
||||
)
|
||||
{
|
||||
//
|
||||
@@ -2215,7 +2218,7 @@ public:
|
||||
string symbol = NULL, // Trading Symbol
|
||||
string provider = NULL, // Signal Provider
|
||||
ENUM_TIMEFRAMES period = NULL, // Trading Period
|
||||
ENUM_X_POSITION_TYPES type = NULL, // Long (Buy) or Short (Sell)
|
||||
ENUM_X_POSITION_TYPES type = NULL, // Long (Buy) or Short (Sell)
|
||||
ENUM_X_POSITION_SELECT_METHODS method = NULL, // Selection Method
|
||||
bool filterByMagic = true, // Get Only Self Open Positions
|
||||
bool forceClean = true // Clean Result Array
|
||||
@@ -2346,7 +2349,7 @@ public:
|
||||
string symbol = NULL, // Trading Symbol
|
||||
string provider = NULL, // Signal Provider
|
||||
ENUM_TIMEFRAMES period = NULL, // Trading Period
|
||||
ENUM_X_POSITION_TYPES type = NULL, // Long (Buy) or Short (Sell)
|
||||
ENUM_X_POSITION_TYPES type = NULL, // Long (Buy) or Short (Sell)
|
||||
ENUM_X_POSITION_SELECT_METHODS method = NULL, // Selection Method
|
||||
bool filterByMagic = true, // Get Only Self Open Positions
|
||||
bool forceClean = true // Clean Result Array
|
||||
@@ -2563,14 +2566,14 @@ public:
|
||||
//
|
||||
// Retrieve All Orders ...
|
||||
int GetOrders(
|
||||
XOrder &result[], // Hold's Result
|
||||
string symbol = NULL, // Trading Symbol
|
||||
string provider = NULL, // Signal Provider
|
||||
ENUM_TIMEFRAMES period = NULL, // Trading Period
|
||||
XOrder &result[], // Hold's Result
|
||||
string symbol = NULL, // Trading Symbol
|
||||
string provider = NULL, // Signal Provider
|
||||
ENUM_TIMEFRAMES period = NULL, // Trading Period
|
||||
ENUM_X_POSITION_TYPES type = NULL, // Long (Buy) or Short (Sell)
|
||||
ENUM_ORDER_STATE state = NULL, // Order State
|
||||
bool filterByMagic = true, // Get Only Self Open Positions
|
||||
bool forceClean = true // Clean Result Array
|
||||
ENUM_ORDER_STATE state = NULL, // Order State
|
||||
bool filterByMagic = true, // Get Only Self Open Positions
|
||||
bool forceClean = true // Clean Result Array
|
||||
)
|
||||
{
|
||||
//
|
||||
@@ -2645,16 +2648,16 @@ public:
|
||||
//
|
||||
// Retrieve Historical Orders ...
|
||||
int GetOrders(
|
||||
XOrder &result[], // Hold's Result
|
||||
string symbol = NULL, // Trading Symbol
|
||||
string provider = NULL, // Signal Provider
|
||||
ENUM_TIMEFRAMES period = NULL, // Trading Period
|
||||
XOrder &result[], // Hold's Result
|
||||
string symbol = NULL, // Trading Symbol
|
||||
string provider = NULL, // Signal Provider
|
||||
ENUM_TIMEFRAMES period = NULL, // Trading Period
|
||||
ENUM_X_POSITION_TYPES type = NULL, // Long (Buy) or Short (Sell)
|
||||
ENUM_ORDER_STATE state = NULL, // Order State
|
||||
datetime startDate = NULL, // Specify Start Date
|
||||
datetime endDate = NULL, // Specify End Date
|
||||
bool filterByMagic = true, // Get Only Self Open Positions
|
||||
bool forceClean = true // Clean Result Array
|
||||
ENUM_ORDER_STATE state = NULL, // Order State
|
||||
datetime startDate = NULL, // Specify Start Date
|
||||
datetime endDate = NULL, // Specify End Date
|
||||
bool filterByMagic = true, // Get Only Self Open Positions
|
||||
bool forceClean = true // Clean Result Array
|
||||
)
|
||||
{
|
||||
//
|
||||
|
||||
@@ -41,8 +41,8 @@ input int x121EASlippage = 10; // Slippgae
|
||||
// Symbols ...
|
||||
input group "Symbol(s)";
|
||||
input string x121EASymbols = "EURUSDb,USDCHFb,EURCHFb,USDJPYb,EURJPYb,GBPUSDb,EURGBPb,XAUUSDb,XAGUSDb,AUDUSDb,EURAUDb,USDCADb,EURCADb,NZDUSDb,EURNZDb"; // Symbols
|
||||
input bool x121EAUseAllSymbols = false; // Use All Available Symbols
|
||||
input bool x121EAUseAllWatchListSymbols = false; // Use All Watch List Symbols
|
||||
input bool x121EAUseAllSymbols = false; // Use All Available Symbols
|
||||
input bool x121EAUseAllWatchListSymbols = false; // Use All Watch List Symbols
|
||||
|
||||
//
|
||||
// Signals ...
|
||||
@@ -83,13 +83,13 @@ input double x121EANextTrailDistance = 50; // Next Trailling Distance
|
||||
input double x121EANextTrailPoint = 25; // Next Trailling Step
|
||||
|
||||
//
|
||||
input group "Supporting";
|
||||
input bool x121EAAllowSupport = false; // Allow Support Signals
|
||||
input bool x121EASupportOnlyForces = false; // Support Only Force Signals
|
||||
double x121EASupportDistance = 0; // Supporting Distance
|
||||
input int x121EAMaxNumberOfSupports = 0; // Max Number of Support Signals
|
||||
input double x121EASupportVolumeMultiplier = 0; // Support Signals Volume Multiplier
|
||||
input double x121EAMaxAllowedSupportVolume = 0; // Max Allowed Support Signals Volume
|
||||
// input group "Supporting";
|
||||
// input bool x121EAAllowSupport = false; // Allow Support Signals
|
||||
// input bool x121EASupportOnlyForces = false; // Support Only Force Signals
|
||||
// double x121EASupportDistance = 0; // Supporting Distance
|
||||
// input int x121EAMaxNumberOfSupports = 0; // Max Number of Support Signals
|
||||
// input double x121EASupportVolumeMultiplier = 0; // Support Signals Volume Multiplier
|
||||
// input double x121EAMaxAllowedSupportVolume = 0; // Max Allowed Support Signals Volume
|
||||
|
||||
//
|
||||
input group "Grid";
|
||||
@@ -349,14 +349,14 @@ bool InitialEA()
|
||||
x121EA.FirstTrailDistance(x121EAFirstTrailDistance);
|
||||
x121EA.DisableTrailingWhenOpposit(x121EADisableTrailingWhenOpposit);
|
||||
|
||||
//
|
||||
// Supporting ...
|
||||
x121EA.AllowSupport(x121EAAllowSupport);
|
||||
x121EA.SupportOnlyForces(x121EASupportOnlyForces);
|
||||
x121EA.SupportDistance(x121EASupportDistance);
|
||||
x121EA.MaxNumberOfSupports(x121EAMaxNumberOfSupports);
|
||||
x121EA.SupportVolumeMultiplier(x121EASupportVolumeMultiplier);
|
||||
x121EA.MaxAllowedSupportVolume(x121EAMaxAllowedSupportVolume);
|
||||
// //
|
||||
// // Supporting ...
|
||||
// x121EA.AllowSupport(x121EAAllowSupport);
|
||||
// x121EA.SupportOnlyForces(x121EASupportOnlyForces);
|
||||
// x121EA.SupportDistance(x121EASupportDistance);
|
||||
// x121EA.MaxNumberOfSupports(x121EAMaxNumberOfSupports);
|
||||
// x121EA.SupportVolumeMultiplier(x121EASupportVolumeMultiplier);
|
||||
// x121EA.MaxAllowedSupportVolume(x121EAMaxAllowedSupportVolume);
|
||||
|
||||
//
|
||||
// Grid ...
|
||||
|
||||
Reference in New Issue
Block a user