Implement Position Protector ...
need to test BE Hedge ...
This commit is contained in:
@@ -90,12 +90,31 @@ input double eaProtectorStartDistanceInPoint = 35; // Protector Start Distance i
|
||||
|
||||
//
|
||||
// Protector > Hedging Properties ...
|
||||
input group "Hedging";
|
||||
input bool eaAllowHedge = false; // Allow Protector to Hedge Positions
|
||||
input double eaHedgeMinVolumeStep = 0.01; // Minimum Volume Step For Hedge
|
||||
input int eaMinimumOpenPositionsForHEHedge = 2; // Minimum Open Positions For HE Hedge
|
||||
input double eaHedgeHEMinProfitPerVolumeStep = 0.2; // Minimum Required Profit For HE Hedge Per Volume Step
|
||||
input double eaHedgeBEMinProfitPerVolumeStep = 0.05; // Minimum Required Profit For BE Hedge Per Volume Step
|
||||
|
||||
//
|
||||
// Protector > In Profit Positions Protecting ...
|
||||
input group "In Profit Positions Protecting";
|
||||
input bool eaAllowTrailStopInProfits = true; // Allow Trail Stops for In Profit Positions
|
||||
input bool eaOnlyTrailUnprotectedPositions = true; // Only Trail UnProtected Positions
|
||||
input double eaTrailStopStepsInPoint = 10; // Trail Stop Steps in Point
|
||||
input int eaRmoveTPOnTrailStep = 0; // Remove Position TP if Trailed specific times
|
||||
input double eaPartialCloseOnSpecificPointOfProfit = 0; // Partial Close Position on Specific Points of Profit
|
||||
input double eaPartialCloseVolumeInProfit = 0; // Partial Close Volume
|
||||
|
||||
//
|
||||
// Protector > In Drawdown Positions Protecting ...
|
||||
input group "In Drawdown Positions Protecting";
|
||||
input bool eaAllowRecoverInDrawdowns = true; // Allow Recovery For In Drawdown Positions
|
||||
input double eaRecoveryMultiplier = 2; // Recovery Volume Multiplier
|
||||
input double eaPartialCloseOnSpecificPointOfDrawdown = 0; // Partial Close Position on Specific Points of Drawdown
|
||||
input double eaPartialCloseVolumeInDrawdown = 0; // Partial Close Volume
|
||||
|
||||
//
|
||||
// Alert ...
|
||||
input group "Alert";
|
||||
@@ -465,6 +484,23 @@ bool InitialEA()
|
||||
eaTradeHandler.HedgeMinVolumeStep(eaHedgeMinVolumeStep);
|
||||
eaTradeHandler.MinimumOpenPositionsForHEHedge(eaMinimumOpenPositionsForHEHedge);
|
||||
eaTradeHandler.HedgeHEMinProfitPerVolumeStep(eaHedgeHEMinProfitPerVolumeStep);
|
||||
eaTradeHandler.HedgeBEMinProfitPerVolumeStep(eaHedgeBEMinProfitPerVolumeStep);
|
||||
|
||||
//
|
||||
// In Profit Position Protecting ...
|
||||
eaTradeHandler.AllowTrailStopInProfits(eaAllowTrailStopInProfits);
|
||||
eaTradeHandler.OnlyTrailUnprotectedPositions(eaOnlyTrailUnprotectedPositions);
|
||||
eaTradeHandler.TrailStopStepsInPoint(eaTrailStopStepsInPoint);
|
||||
eaTradeHandler.RmoveTPOnTrailStep(eaRmoveTPOnTrailStep);
|
||||
eaTradeHandler.PartialCloseOnSpecificPointOfProfit(eaPartialCloseOnSpecificPointOfProfit);
|
||||
eaTradeHandler.PartialCloseVolumeInProfit(eaPartialCloseVolumeInProfit);
|
||||
|
||||
//
|
||||
// Protector > In Drawdown Positions Protecting ...
|
||||
eaTradeHandler.AllowRecoverInDrawdowns(eaAllowRecoverInDrawdowns);
|
||||
eaTradeHandler.RecoveryMultiplier(eaRecoveryMultiplier);
|
||||
eaTradeHandler.PartialCloseOnSpecificPointOfDrawdown(eaPartialCloseOnSpecificPointOfDrawdown);
|
||||
eaTradeHandler.PartialCloseVolumeInDrawdown(eaPartialCloseVolumeInDrawdown);
|
||||
|
||||
//
|
||||
// TODO: Implement ...
|
||||
|
||||
Reference in New Issue
Block a user