implement all props ...
This commit is contained in:
@@ -41,22 +41,40 @@ input group "Symbols";
|
||||
input bool eaMultiSymbol = false; // Use Multi Symbol
|
||||
input string eaSymbols = "EURUSDb,GBPUSDb,USDJPYb,USDCHFb"; // Trading Symbols
|
||||
|
||||
//
|
||||
// Volume ...
|
||||
input group "Volume";
|
||||
input double eaR2R = 3.0; // Risk to Reward Ratio
|
||||
input bool eaUseDynamicVolume = false; // Use Dynamic Volume
|
||||
input double eaDynamicVolumeStep = 0.01; // Increase Volume Step
|
||||
input double eaDynamicVolumeBalanceFactor = 200; // Balance Factor for Generate Dynamic Volume
|
||||
input double eaVolume = 0.05; // Static Volume
|
||||
input bool eaDynamicRiskManagement = false; // Dynamic Risk Management
|
||||
input double eaRiskPercentPerBalance = 0; // Risk Percent Per Balance on Each Trade
|
||||
|
||||
//
|
||||
// Signalling ...
|
||||
input group "Signalling";
|
||||
input bool eaAllowLong = true; // Allow Long Signals
|
||||
input bool eaAllowShort = true; // Allow Short Signals
|
||||
input bool eaAllowLong = true; // Allow Long Signals
|
||||
input bool eaAllowShort = true; // Allow Short Signals
|
||||
input int eaMaxAllowedLongs = 5; // Max Allowed Long Signals
|
||||
input int eaMaxAllowedShorts = 5; // Max Allowed Short Signals
|
||||
input bool eaUseMaxAllowedSignalsPerSymbol = true; // Use Max Allowed Signal Types Per Symbol
|
||||
input double eaLastPositionProfitForAcceptNextInPoint = 0; // Last Position Profit In Points for Accept new Signal
|
||||
input int eaDelaysBetweenTwoSignalsInBar = 7; // Delay between two Signals in Bars
|
||||
input double eaMaxAllowedSpread = 25; // Max Allowed Spread for Signalling
|
||||
input int eaMinRequiredVerificationForSpreadPass = 20; // Minimum Spread Verification for Signalling
|
||||
|
||||
//
|
||||
// Risk Management ...
|
||||
input group "Risk Management";
|
||||
input double eaR2R = 6; // Signallers Risk to Reward Ratio
|
||||
input double eaVolume = 0.05; // Static Volume
|
||||
input double eaRiskPercentPerBalance = 0.5; // Risk Percent Per Balance in Each Trade
|
||||
input bool eaDynamicRiskManagement = false; // Dynamic Risk Management
|
||||
input bool eaUseDynamicVolume = false; // Use Dynamic Volume
|
||||
input double eaDynamicVolumeStep = 0.01; // Increase Volume Step
|
||||
input double eaDynamicVolumeBalanceFactor = 200; // Balance Factor for Generate Dynamic Volume
|
||||
input double eaMaxAllowedDrawdownToOpenTrades = 3; // Max Allowed Drawdown for Open Trades
|
||||
input int eaMaxAllowedSLToPauseSignallingPerSymbol = 2; // Max Allowed SL for Pause Signalling Per Symbol
|
||||
input int eaPauseSignallingAfterReachesMaxAllowedSLInSecconds = 14400; // Pause Signalling Per Symbol afte Max Allowed SL Reached In Seconds
|
||||
|
||||
//
|
||||
// Protection ...
|
||||
input group "Protection";
|
||||
input bool eaAllowHedging = false; // Allow Hedge Positions
|
||||
input int eaMinOpenTradesFroHedging = 3; // Minimum Open Positions for Hedging
|
||||
input double eaHedgingMinVolumeStep = 0.01; // Minimum Volume Step for Hedging
|
||||
input double eaHedgeingMinRequiredProfitPerVolumeStep = 0.5; // Minimum Required Profit Per Volume Step for Hedging
|
||||
|
||||
//
|
||||
// Alert ...
|
||||
@@ -108,6 +126,7 @@ int OnInit()
|
||||
// Configure EA Expert Class ...
|
||||
|
||||
//
|
||||
// Event Handlers ...
|
||||
eaExpert.OnSignalEventListener = OnSignalRecieved;
|
||||
eaExpert.OnDealsChangedEventListener = OnDealsChanged;
|
||||
eaExpert.OnOrdersChangedEventListener = OnOrdersChanged;
|
||||
@@ -117,21 +136,52 @@ int OnInit()
|
||||
eaExpert.OnPositionForceCloseEventListener = OnPositionForceClosed;
|
||||
|
||||
//
|
||||
// Common ...
|
||||
eaExpert.MagicNumber(eaMagicNumber);
|
||||
eaExpert.Slippage(eaSlippage);
|
||||
eaExpert.TagPrefix(eaLogSuffix);
|
||||
|
||||
//
|
||||
// Symbol ...
|
||||
eaExpert.SetSymbol(_Symbol);
|
||||
eaExpert.SetPeriod(_Period);
|
||||
eaExpert.Symbols(eaSymbols);
|
||||
eaExpert.MultiSymbol(eaMultiSymbol);
|
||||
|
||||
//
|
||||
// Signalling ...
|
||||
eaExpert.AllowLong(eaAllowLong);
|
||||
eaExpert.AllowShort(eaAllowShort);
|
||||
eaExpert.MaxAllowedLongs(eaMaxAllowedLongs);
|
||||
eaExpert.MaxAllowedShorts(eaMaxAllowedShorts);
|
||||
eaExpert.UseMaxAllowedSignalsPerSymbol(eaUseMaxAllowedSignalsPerSymbol);
|
||||
eaExpert.LastPositionProfitForAcceptNextInPoint(eaLastPositionProfitForAcceptNextInPoint);
|
||||
eaExpert.DelaysBetweenTwoSignalsInBar(eaDelaysBetweenTwoSignalsInBar);
|
||||
eaExpert.MaxAllowedSpread(eaMaxAllowedSpread);
|
||||
eaExpert.MinRequiredVerificationForSpreadPass(eaMinRequiredVerificationForSpreadPass);
|
||||
|
||||
//
|
||||
// Risk Management ...
|
||||
eaExpert.R2R(eaR2R);
|
||||
eaExpert.Volume(eaVolume);
|
||||
eaExpert.RiskPercentPerBalance(eaRiskPercentPerBalance);
|
||||
eaExpert.DynamicRiskManagement(eaDynamicRiskManagement);
|
||||
eaExpert.UseDynamicVolume(eaUseDynamicVolume);
|
||||
eaExpert.DynamicVolumeStep(eaDynamicVolumeStep);
|
||||
eaExpert.DynamicVolumeBalanceFactor(eaDynamicVolumeBalanceFactor);
|
||||
eaExpert.MaxAllowedDrawdownToOpenTrades(eaMaxAllowedDrawdownToOpenTrades);
|
||||
eaExpert.MaxAllowedSLToPauseSignallingPerSymbol(eaMaxAllowedSLToPauseSignallingPerSymbol);
|
||||
eaExpert.PauseSignallingAfterReachesMaxAllowedSLInSecconds(eaPauseSignallingAfterReachesMaxAllowedSLInSecconds);
|
||||
|
||||
//
|
||||
// Protection ...
|
||||
eaExpert.AllowHedging(eaAllowHedging);
|
||||
eaExpert.MinOpenTradesFroHedging(eaMinOpenTradesFroHedging);
|
||||
eaExpert.HedgingMinVolumeStep(eaHedgingMinVolumeStep);
|
||||
eaExpert.HedgeingMinRequiredProfitPerVolumeStep(eaHedgeingMinRequiredProfitPerVolumeStep);
|
||||
|
||||
//
|
||||
// Alert ...
|
||||
eaExpert.SetAlertEnableAlerts(eaEnableAlerts);
|
||||
eaExpert.SetAlertLogAlerts(eaLogAlerts);
|
||||
eaExpert.SetAlertMailAlerts(eaMailAlerts);
|
||||
@@ -139,20 +189,12 @@ int OnInit()
|
||||
eaExpert.SetAlertTerminalAlerts(eaTerminalAlerts);
|
||||
|
||||
//
|
||||
// Reports ...
|
||||
eaExpert.ReportNewMonths(eaReportNewMonths);
|
||||
eaExpert.ReportNewWeeks(eaReportNewWeeks);
|
||||
eaExpert.ReportNewDays(eaReportNewDays);
|
||||
eaExpert.ReportNewHours(eaReportNewHours);
|
||||
|
||||
//
|
||||
eaExpert.R2R(eaR2R);
|
||||
eaExpert.Volume(eaVolume);
|
||||
eaExpert.UseDynamicVolume(eaUseDynamicVolume);
|
||||
eaExpert.DynamicVolumeStep(eaDynamicVolumeStep);
|
||||
eaExpert.DynamicRiskManagement(eaDynamicRiskManagement);
|
||||
eaExpert.RiskPercentPerBalance(eaRiskPercentPerBalance);
|
||||
eaExpert.DynamicVolumeBalanceFactor(eaDynamicVolumeBalanceFactor);
|
||||
|
||||
//
|
||||
bool isInited = eaExpert.HandleOnInit();
|
||||
if (!isInited)
|
||||
|
||||
Reference in New Issue
Block a user