last ...
This commit is contained in:
@@ -3289,6 +3289,49 @@ public:
|
|||||||
mIgnoreSL = value;
|
mIgnoreSL = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
bool IncreaseNextSignalsVolume()
|
||||||
|
{
|
||||||
|
return mIncreaseNextSignalsVolume;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
void IncreaseNextSignalsVolume(bool value)
|
||||||
|
{
|
||||||
|
mIncreaseNextSignalsVolume = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
double IncreaseNextSignalsVolumeMultiplier()
|
||||||
|
{
|
||||||
|
return mIncreaseNextSignalsVolumeMultiplier;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
void IncreaseNextSignalsVolumeMultiplier(double value)
|
||||||
|
{
|
||||||
|
//
|
||||||
|
if (value <= 0)
|
||||||
|
{
|
||||||
|
value = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
mIncreaseNextSignalsVolumeMultiplier = value;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
bool AcceptNextDirectionalSignalsWhenFirstInProfit()
|
||||||
|
{
|
||||||
|
return mAcceptNextDirectionalSignalsWhenFirstInProfit;
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
void AcceptNextDirectionalSignalsWhenFirstInProfit(bool value)
|
||||||
|
{
|
||||||
|
mAcceptNextDirectionalSignalsWhenFirstInProfit = value;
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Signalling ...
|
// Signalling ...
|
||||||
|
|
||||||
@@ -4456,6 +4499,7 @@ public:
|
|||||||
|
|
||||||
//
|
//
|
||||||
// Only Accept Next Same Type when Previous in Profit ...
|
// Only Accept Next Same Type when Previous in Profit ...
|
||||||
|
bool isSameTypeExists = false;
|
||||||
if (isSignalValid)
|
if (isSignalValid)
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
@@ -4523,7 +4567,9 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
if (IsValidSize(iSymbolsPositionsCount))
|
bool acceptNewOnlyWhenLastInProfit = AcceptNextDirectionalSignalsWhenFirstInProfit();
|
||||||
|
isSameTypeExists = IsValidSize(iSymbolsPositionsCount);
|
||||||
|
if (isSameTypeExists && acceptNewOnlyWhenLastInProfit)
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
XPosition youngest;
|
XPosition youngest;
|
||||||
@@ -4586,11 +4632,13 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
IncreaseNextSignalsVolume
|
bool canIncreaseVolume = IncreaseNextSignalsVolume();
|
||||||
|
if (canIncreaseVolume)
|
||||||
|
{
|
||||||
//
|
//
|
||||||
// Ignore ...
|
double volumeMultiplier = IncreaseNextSignalsVolumeMultiplier();
|
||||||
iSignal.volume = iSignal.volume * multiplier;
|
iSignal.volume = iSignal.volume * (multiplier * volumeMultiplier);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
@@ -4606,11 +4654,14 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Cutom Signal Execution ...
|
result = ArraySize(eSignals);
|
||||||
HandleSignals(eSignals);
|
|
||||||
|
|
||||||
//
|
//
|
||||||
result = ArraySize(signals);
|
// Cutom Signal Execution ...
|
||||||
|
if (IsValidSize(result))
|
||||||
|
{
|
||||||
|
HandleSignals(eSignals);
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
return result;
|
return result;
|
||||||
@@ -4951,11 +5002,13 @@ private:
|
|||||||
double mVolume; // Volume
|
double mVolume; // Volume
|
||||||
double mTPPoint; // TP Point
|
double mTPPoint; // TP Point
|
||||||
double mSLPoint; // SL Point
|
double mSLPoint; // SL Point
|
||||||
int mMaxAllowedTrades; // Max Alloed Positions
|
|
||||||
bool mIncreaseNextSignalsVolume; // Increase Next Signals Volume
|
|
||||||
bool mUseMaxAllowedPerDirection; // Use Max Allowed Positions Per Direction
|
|
||||||
bool mIgnoreTP; // Ignore Calculated TP
|
bool mIgnoreTP; // Ignore Calculated TP
|
||||||
bool mIgnoreSL; // Ignore Calculated SL
|
bool mIgnoreSL; // Ignore Calculated SL
|
||||||
|
int mMaxAllowedTrades; // Max Alloed Positions
|
||||||
|
bool mUseMaxAllowedPerDirection; // Use Max Allowed Positions Per Direction
|
||||||
|
bool mIncreaseNextSignalsVolume; // Increase Next Signals Volume
|
||||||
|
double mIncreaseNextSignalsVolumeMultiplier; // Increase Next Signals Volume Multiplier
|
||||||
|
bool mAcceptNextDirectionalSignalsWhenFirstInProfit; // Accept Same Symbol/Type Signal when Last in Profit
|
||||||
|
|
||||||
//
|
//
|
||||||
// Signalling ...
|
// Signalling ...
|
||||||
@@ -4972,10 +5025,8 @@ private:
|
|||||||
// - Increase Volume Size of in Profit Positions;
|
// - Increase Volume Size of in Profit Positions;
|
||||||
// - etc ...
|
// - etc ...
|
||||||
// bool mForceState; // Determine in Force State or not
|
// bool mForceState; // Determine in Force State or not
|
||||||
int mDelayBetweenTwoSignal; // Delay between two same signal
|
|
||||||
int mMaxPositionsForce; // Max Number of Positions For Guard Handling
|
|
||||||
double mMaxDrawdownForce; // Force Handling State on Drawdown for Guard
|
double mMaxDrawdownForce; // Force Handling State on Drawdown for Guard
|
||||||
bool mAllowSymbolHedgeOnForce; // Allow Symbol Hedging on Force States
|
int mDelayBetweenTwoSignal; // Delay between two same signal
|
||||||
double mMinFreeMargingForOpenTrades; // Min Free Margin for Open Trades
|
double mMinFreeMargingForOpenTrades; // Min Free Margin for Open Trades
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -60,12 +60,14 @@ input group "Risk Management";
|
|||||||
input double x121EAVolume = 0.01; // Static Volume
|
input double x121EAVolume = 0.01; // Static Volume
|
||||||
input double x121EATPPoint = 1000; // TP Point
|
input double x121EATPPoint = 1000; // TP Point
|
||||||
input double x121EASLPoint = 1000; // SL Point
|
input double x121EASLPoint = 1000; // SL Point
|
||||||
input int x121EAMaxAllowedTrades = 0; // Max Allowed Positions Per Symbol
|
|
||||||
input bool x121EAIncreaseNextSignalsVolume = false; // Increase Next Signals Volume
|
|
||||||
input int x121EAMinFreeMargingForOpenTrades = 900; // Min Margin For Opening Trades
|
|
||||||
input bool x121EAUseMaxAllowedPerDirection = true; // Use Max Allowed Positions Per Direction
|
|
||||||
input bool x121EAIgnoreSL = false; // Ignore Calculated SL
|
input bool x121EAIgnoreSL = false; // Ignore Calculated SL
|
||||||
input bool x121EAIgnoreTP = false; // Ignore Calculated TP
|
input bool x121EAIgnoreTP = false; // Ignore Calculated TP
|
||||||
|
input int x121EAMaxAllowedTrades = 0; // Max Allowed Positions Per Symbol
|
||||||
|
input int x121EAMinFreeMargingForOpenTrades = 900; // Min Margin For Opening Trades
|
||||||
|
input bool x121EAUseMaxAllowedPerDirection = true; // Use Max Allowed Positions Per Direction
|
||||||
|
input bool x121EAIncreaseNextSignalsVolume = false; // Increase Next Signals Volume
|
||||||
|
input double x121EAIncreaseNextSignalsVolumeMultiplier = 1; // Increase Next Signals Volume Multiplier
|
||||||
|
input bool x121EAAcceptNextDirectionalSignalsWhenFirstInProfit = true; // Accept Same Symbol/Type Signal when Last in Profit
|
||||||
|
|
||||||
//
|
//
|
||||||
// Protection ...
|
// Protection ...
|
||||||
@@ -329,6 +331,8 @@ bool InitialEA()
|
|||||||
x121EA.IncreaseNextSignalsVolume(x121EAIncreaseNextSignalsVolume);
|
x121EA.IncreaseNextSignalsVolume(x121EAIncreaseNextSignalsVolume);
|
||||||
x121EA.UseMaxAllowedPerDirection(x121EAUseMaxAllowedPerDirection);
|
x121EA.UseMaxAllowedPerDirection(x121EAUseMaxAllowedPerDirection);
|
||||||
x121EA.MinFreeMargingForOpenTrades(x121EAMinFreeMargingForOpenTrades);
|
x121EA.MinFreeMargingForOpenTrades(x121EAMinFreeMargingForOpenTrades);
|
||||||
|
x121EA.IncreaseNextSignalsVolumeMultiplier(x121EAIncreaseNextSignalsVolumeMultiplier);
|
||||||
|
x121EA.AcceptNextDirectionalSignalsWhenFirstInProfit(x121EAAcceptNextDirectionalSignalsWhenFirstInProfit);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Protection ...
|
// Protection ...
|
||||||
|
|||||||
Reference in New Issue
Block a user