last ...
This commit is contained in:
@@ -4387,11 +4387,13 @@ private:
|
||||
}
|
||||
|
||||
//
|
||||
double profit = SpecifiedCalculatePositionsProfit(positions);
|
||||
double profit = SpecifiedIsPositionsReadyForHedge(
|
||||
positions,
|
||||
0.15,
|
||||
0.01 //
|
||||
);
|
||||
result =
|
||||
hedgingProfit > 0
|
||||
? profit > 0 && profit > hedgingProfit
|
||||
: profit <= hedgingProfit;
|
||||
profit > hedgingProfit;
|
||||
if (!result)
|
||||
{
|
||||
return result;
|
||||
@@ -4528,22 +4530,22 @@ private:
|
||||
return;
|
||||
}
|
||||
|
||||
//
|
||||
isHedged = DoEQMForceClose(0.5);
|
||||
if (isHedged)
|
||||
{
|
||||
//
|
||||
ForceState(false);
|
||||
return;
|
||||
}
|
||||
// //
|
||||
// isHedged = DoEQMForceClose(0.5);
|
||||
// if (isHedged)
|
||||
// {
|
||||
// //
|
||||
// ForceState(false);
|
||||
// return;
|
||||
// }
|
||||
|
||||
isHedged = DoEQMForceClose(0.3);
|
||||
if (isHedged)
|
||||
{
|
||||
//
|
||||
ForceState(false);
|
||||
return;
|
||||
}
|
||||
// isHedged = DoEQMForceClose(0.3);
|
||||
// if (isHedged)
|
||||
// {
|
||||
// //
|
||||
// ForceState(false);
|
||||
// return;
|
||||
// }
|
||||
|
||||
//
|
||||
return;
|
||||
|
||||
@@ -73,27 +73,27 @@ input double x121EANextTrailPoint = 20; // Next Trailling Step
|
||||
|
||||
//
|
||||
input group "Supporting";
|
||||
input bool x121EAAllowSupport = false; // Allow Support Signals
|
||||
double x121EASupportDistance = 50; // Supporting Distance
|
||||
input int x121EAMaxNumberOfSupports = 1; // Max Number of Support Signals
|
||||
input double x121EASupportVolumeMultiplier = 2.0; // Support Signals Volume Multiplier
|
||||
input double x121EAMaxAllowedSupportVolume = 0.8; // Max Allowed Support Signals Volume
|
||||
input bool x121EAAllowSupport = false; // Allow Support Signals
|
||||
double x121EASupportDistance = 50; // Supporting Distance
|
||||
input int x121EAMaxNumberOfSupports = 1; // Max Number of Support Signals
|
||||
input double x121EASupportVolumeMultiplier = 2.0; // Support Signals Volume Multiplier
|
||||
input double x121EAMaxAllowedSupportVolume = 0.04; // Max Allowed Support Signals Volume
|
||||
|
||||
//
|
||||
input group "Grid";
|
||||
input bool x121EAAllowGrid = true; // Allow Grid Signals
|
||||
input int x121EAMaxNumberOfGrids = 5; // Max Number of Grid Signals
|
||||
input double x121EAGridDistance = 100; // Grid Distance
|
||||
input double x121EAGridVolumeMultiplier = 2.0; // Grid Volume Multiplier
|
||||
input double x121EAMaxAllowedGridVolume = 0.8; // Max Allowed Grid Signals Volume
|
||||
input bool x121EAAllowGrid = true; // Allow Grid Signals
|
||||
input int x121EAMaxNumberOfGrids = 5; // Max Number of Grid Signals
|
||||
input double x121EAGridDistance = 100; // Grid Distance
|
||||
input double x121EAGridVolumeMultiplier = 2.0; // Grid Volume Multiplier
|
||||
input double x121EAMaxAllowedGridVolume = 0.04; // Max Allowed Grid Signals Volume
|
||||
|
||||
//
|
||||
input group "Recovery";
|
||||
input bool x121EAAllowRecovery = true; // Allow Recovery Signals
|
||||
input int x121EAMaxNumberOfRecoveries = 3; // Max Number of Recovery Signals
|
||||
input double x121EARecoveryDistance = 100; // Recovery Distance
|
||||
input double x121EARecoveryVolumeMultiplier = 2; // Recovery Volume Multiplier
|
||||
input double x121EAMaxAllowedRecoveryVolume = 0.8; // Max Allowed Recovery Signals Volume
|
||||
input bool x121EAAllowRecovery = true; // Allow Recovery Signals
|
||||
input int x121EAMaxNumberOfRecoveries = 3; // Max Number of Recovery Signals
|
||||
input double x121EARecoveryDistance = 100; // Recovery Distance
|
||||
input double x121EARecoveryVolumeMultiplier = 2; // Recovery Volume Multiplier
|
||||
input double x121EAMaxAllowedRecoveryVolume = 0.08; // Max Allowed Recovery Signals Volume
|
||||
|
||||
//
|
||||
input group "Hedging";
|
||||
|
||||
Reference in New Issue
Block a user