last ...
This commit is contained in:
@@ -3289,6 +3289,49 @@ public:
|
||||
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 ...
|
||||
|
||||
@@ -4456,6 +4499,7 @@ public:
|
||||
|
||||
//
|
||||
// Only Accept Next Same Type when Previous in Profit ...
|
||||
bool isSameTypeExists = false;
|
||||
if (isSignalValid)
|
||||
{
|
||||
//
|
||||
@@ -4523,7 +4567,9 @@ public:
|
||||
}
|
||||
|
||||
//
|
||||
if (IsValidSize(iSymbolsPositionsCount))
|
||||
bool acceptNewOnlyWhenLastInProfit = AcceptNextDirectionalSignalsWhenFirstInProfit();
|
||||
isSameTypeExists = IsValidSize(iSymbolsPositionsCount);
|
||||
if (isSameTypeExists && acceptNewOnlyWhenLastInProfit)
|
||||
{
|
||||
//
|
||||
XPosition youngest;
|
||||
@@ -4543,7 +4589,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
//
|
||||
// Multiply Signal Volume ...
|
||||
if (isSignalValid)
|
||||
{
|
||||
@@ -4586,11 +4632,13 @@ public:
|
||||
}
|
||||
|
||||
//
|
||||
IncreaseNextSignalsVolume
|
||||
|
||||
//
|
||||
// Ignore ...
|
||||
iSignal.volume = iSignal.volume * multiplier;
|
||||
bool canIncreaseVolume = IncreaseNextSignalsVolume();
|
||||
if (canIncreaseVolume)
|
||||
{
|
||||
//
|
||||
double volumeMultiplier = IncreaseNextSignalsVolumeMultiplier();
|
||||
iSignal.volume = iSignal.volume * (multiplier * volumeMultiplier);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
@@ -4606,11 +4654,14 @@ public:
|
||||
}
|
||||
|
||||
//
|
||||
// Cutom Signal Execution ...
|
||||
HandleSignals(eSignals);
|
||||
result = ArraySize(eSignals);
|
||||
|
||||
//
|
||||
result = ArraySize(signals);
|
||||
// Cutom Signal Execution ...
|
||||
if (IsValidSize(result))
|
||||
{
|
||||
HandleSignals(eSignals);
|
||||
}
|
||||
|
||||
//
|
||||
return result;
|
||||
@@ -4948,14 +4999,16 @@ private:
|
||||
|
||||
//
|
||||
// Risk Management ...
|
||||
double mVolume; // Volume
|
||||
double mTPPoint; // TP 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 mIgnoreSL; // Ignore Calculated SL
|
||||
double mVolume; // Volume
|
||||
double mTPPoint; // TP Point
|
||||
double mSLPoint; // SL Point
|
||||
bool mIgnoreTP; // Ignore Calculated TP
|
||||
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 ...
|
||||
@@ -4972,10 +5025,8 @@ private:
|
||||
// - Increase Volume Size of in Profit Positions;
|
||||
// - etc ...
|
||||
// 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
|
||||
bool mAllowSymbolHedgeOnForce; // Allow Symbol Hedging on Force States
|
||||
int mDelayBetweenTwoSignal; // Delay between two same signal
|
||||
double mMinFreeMargingForOpenTrades; // Min Free Margin for Open Trades
|
||||
|
||||
//
|
||||
@@ -5394,26 +5445,26 @@ private:
|
||||
//
|
||||
;
|
||||
|
||||
//
|
||||
AddRef(
|
||||
signal,
|
||||
signals //
|
||||
);
|
||||
//
|
||||
AddRef(
|
||||
signal,
|
||||
signals //
|
||||
);
|
||||
|
||||
//
|
||||
// Add new Signal Info ...
|
||||
mTradeHandler.Add(
|
||||
signal,
|
||||
pushers,
|
||||
canGrid,
|
||||
canRecover,
|
||||
canSupport,
|
||||
conditions[0],
|
||||
conditions[1],
|
||||
conditions[2],
|
||||
conditions[3],
|
||||
conditions[4] //
|
||||
);
|
||||
//
|
||||
// Add new Signal Info ...
|
||||
mTradeHandler.Add(
|
||||
signal,
|
||||
pushers,
|
||||
canGrid,
|
||||
canRecover,
|
||||
canSupport,
|
||||
conditions[0],
|
||||
conditions[1],
|
||||
conditions[2],
|
||||
conditions[3],
|
||||
conditions[4] //
|
||||
);
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user