backup and do some cleanup strategies ...
This commit is contained in:
@@ -126,6 +126,10 @@ void OnDeinit(const int reason)
|
||||
// REASON_INITFAILED 8 The OnInit() handler returned a non-zero value
|
||||
// REASON_CLOSE 9 Terminal closed
|
||||
|
||||
//
|
||||
string msg = "MaxSameTimeTrades: " + ToString(eaTradeHandler.MaxSameTimeTrades());
|
||||
eaAlert.Alert(msg);
|
||||
|
||||
//
|
||||
// De Initialize XSampleEA Providers ...
|
||||
delete mCTHelper;
|
||||
@@ -234,16 +238,23 @@ bool InitialEA()
|
||||
eaTrader.AddOnForceClosePositionEventHandler(OnPositionForceClosed);
|
||||
|
||||
//
|
||||
// Initialize Trade Handler ...
|
||||
eaTradeHandler = new XSCXTradeHandler(eaTrader);
|
||||
eaTradeHandler.SetAlertPrefix(ShortName + "> TradeHandler");
|
||||
eaTradeHandler.SaveTrades(true);
|
||||
eaTradeHandler.SaveSignals(true);
|
||||
|
||||
//
|
||||
// Configure Hedging ...
|
||||
eaTradeHandler.AllowHedging(true);
|
||||
eaTradeHandler.HedgeVolumeFactor(eaVolume);
|
||||
eaTradeHandler.HedgeMinProfitPerVolumeFactor(0.2);
|
||||
|
||||
//
|
||||
// Configure Trailing ...
|
||||
eaTradeHandler.AllowTrailStops(false);
|
||||
eaTradeHandler.TrailStepInPoint(10);
|
||||
eaTradeHandler.TrailStartInPoint(30);
|
||||
eaTradeHandler.TrailStepInPoint(15);
|
||||
eaTradeHandler.TrailStartInPoint(60);
|
||||
eaTradeHandler.IgnoreTPOnTrail(true);
|
||||
eaTradeHandler.TrailBasedOnProfit(true);
|
||||
|
||||
@@ -284,18 +295,18 @@ bool InitialEA()
|
||||
XSCXTestStrategy *eurusdTestStrategy;
|
||||
eurusdTestStrategy = new XSCXTestStrategy(
|
||||
eurusdSymbol,
|
||||
PERIOD_M5,
|
||||
PERIOD_M15,
|
||||
eaVolume,
|
||||
eaR2R, // R2R ...
|
||||
eaSlippage,
|
||||
magicNumber,
|
||||
true, // Ignore Signal Execution
|
||||
true, // Use TP SL Point
|
||||
false, // Use Max
|
||||
50, // eaTPPoint, // TP
|
||||
true, // Ignore Signal Execution
|
||||
true, // Use TP SL Point
|
||||
false, // Use Max
|
||||
eaTPPoint, // TP
|
||||
eaSLPoint, // SL
|
||||
eaIgnoreTP,
|
||||
true, // eaIgnoreSL,
|
||||
eaIgnoreSL,
|
||||
eaAllowLong,
|
||||
eaAllowShort,
|
||||
eaMaxAllowedLongs, // Max Longs
|
||||
|
||||
Reference in New Issue
Block a user