add support for alert in Initialization and DeInitialization ...
This commit is contained in:
@@ -67,8 +67,8 @@ input group "Risk Management";
|
|||||||
//
|
//
|
||||||
// Risk Management > Trade Management ...
|
// Risk Management > Trade Management ...
|
||||||
input group "Trade Management";
|
input group "Trade Management";
|
||||||
input double eaAllowLong = true; // Allow Long Positions
|
input bool eaAllowLong = true; // Allow Long Positions
|
||||||
input double eaAllowShort = true; // Allow Short Positions
|
input bool eaAllowShort = true; // Allow Short Positions
|
||||||
input int eaMaxAllowedLongs = 1; // Max Allowed Long Positions
|
input int eaMaxAllowedLongs = 1; // Max Allowed Long Positions
|
||||||
input int eaMaxAllowedShorts = 1; // Max Allowed Short Positions
|
input int eaMaxAllowedShorts = 1; // Max Allowed Short Positions
|
||||||
input double eaMaxDrawdownPercentForOpenTrades = 3; // Max Drawdown Percent for Open Trades
|
input double eaMaxDrawdownPercentForOpenTrades = 3; // Max Drawdown Percent for Open Trades
|
||||||
@@ -178,6 +178,11 @@ int OnInit()
|
|||||||
// EventSetTimer(1);
|
// EventSetTimer(1);
|
||||||
// EventSetMillisecondTimer(100);
|
// EventSetMillisecondTimer(100);
|
||||||
|
|
||||||
|
//
|
||||||
|
// Alert Initialization ...
|
||||||
|
string msg = "Initialized Successfully ...";
|
||||||
|
eaAlert.Alert(msg);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Init Succeed ...
|
// Init Succeed ...
|
||||||
return INIT_SUCCEEDED;
|
return INIT_SUCCEEDED;
|
||||||
@@ -203,6 +208,12 @@ void OnDeinit(const int reason)
|
|||||||
string msg = "MaxSameTimeTrades: " + ToString(eaTradeHandler.MaxSameTimeTrades());
|
string msg = "MaxSameTimeTrades: " + ToString(eaTradeHandler.MaxSameTimeTrades());
|
||||||
eaAlert.Alert(msg);
|
eaAlert.Alert(msg);
|
||||||
|
|
||||||
|
//
|
||||||
|
// Alert De Initialization Succeeded ...
|
||||||
|
msg = "De Initialized Successfully ...";
|
||||||
|
eaAlert.Alert(msg);
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// De Initialize XSampleEA Providers ...
|
// De Initialize XSampleEA Providers ...
|
||||||
delete mCTHelper;
|
delete mCTHelper;
|
||||||
|
|||||||
@@ -62,8 +62,8 @@ double eaSLPoint = 500; // Static SL Point
|
|||||||
|
|
||||||
//
|
//
|
||||||
// Risk Management > Trade Management ...
|
// Risk Management > Trade Management ...
|
||||||
double eaAllowLong = true; // Allow Long Positions
|
bool eaAllowLong = true; // Allow Long Positions
|
||||||
double eaAllowShort = true; // Allow Short Positions
|
bool eaAllowShort = true; // Allow Short Positions
|
||||||
int eaMaxAllowedLongs = 1; // Max Allowed Long Positions
|
int eaMaxAllowedLongs = 1; // Max Allowed Long Positions
|
||||||
int eaMaxAllowedShorts = 1; // Max Allowed Short Positions
|
int eaMaxAllowedShorts = 1; // Max Allowed Short Positions
|
||||||
double eaMaxDrawdownPercentForOpenTrades = 3; // Max Drawdown Percent for Open Trades
|
double eaMaxDrawdownPercentForOpenTrades = 3; // Max Drawdown Percent for Open Trades
|
||||||
@@ -165,6 +165,11 @@ int OnInit()
|
|||||||
// EventSetTimer(1);
|
// EventSetTimer(1);
|
||||||
// EventSetMillisecondTimer(100);
|
// EventSetMillisecondTimer(100);
|
||||||
|
|
||||||
|
//
|
||||||
|
// Alert Initialization ...
|
||||||
|
string msg = "Initialized Successfully ...";
|
||||||
|
eaAlert.Alert(msg);
|
||||||
|
|
||||||
//
|
//
|
||||||
// Init Succeed ...
|
// Init Succeed ...
|
||||||
return INIT_SUCCEEDED;
|
return INIT_SUCCEEDED;
|
||||||
@@ -190,6 +195,12 @@ void OnDeinit(const int reason)
|
|||||||
string msg = "MaxSameTimeTrades: " + ToString(eaTradeHandler.MaxSameTimeTrades());
|
string msg = "MaxSameTimeTrades: " + ToString(eaTradeHandler.MaxSameTimeTrades());
|
||||||
eaAlert.Alert(msg);
|
eaAlert.Alert(msg);
|
||||||
|
|
||||||
|
//
|
||||||
|
// Alert De Initialization Succeeded ...
|
||||||
|
msg = "De Initialized Successfully ...";
|
||||||
|
eaAlert.Alert(msg);
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// De Initialize XSampleEA Providers ...
|
// De Initialize XSampleEA Providers ...
|
||||||
delete mCTHelper;
|
delete mCTHelper;
|
||||||
|
|||||||
Reference in New Issue
Block a user