add support for alert in Initialization and DeInitialization ...

This commit is contained in:
2024-08-04 01:18:11 +03:30
parent 0d951775cd
commit f1ed712b3f
2 changed files with 26 additions and 4 deletions
+13 -2
View File
@@ -67,8 +67,8 @@ input group "Risk Management";
//
// Risk Management > Trade Management ...
input group "Trade Management";
input double eaAllowLong = true; // Allow Long Positions
input double eaAllowShort = true; // Allow Short Positions
input bool eaAllowLong = true; // Allow Long Positions
input bool eaAllowShort = true; // Allow Short Positions
input int eaMaxAllowedLongs = 1; // Max Allowed Long Positions
input int eaMaxAllowedShorts = 1; // Max Allowed Short Positions
input double eaMaxDrawdownPercentForOpenTrades = 3; // Max Drawdown Percent for Open Trades
@@ -178,6 +178,11 @@ int OnInit()
// EventSetTimer(1);
// EventSetMillisecondTimer(100);
//
// Alert Initialization ...
string msg = "Initialized Successfully ...";
eaAlert.Alert(msg);
//
// Init Succeed ...
return INIT_SUCCEEDED;
@@ -203,6 +208,12 @@ void OnDeinit(const int reason)
string msg = "MaxSameTimeTrades: " + ToString(eaTradeHandler.MaxSameTimeTrades());
eaAlert.Alert(msg);
//
// Alert De Initialization Succeeded ...
msg = "De Initialized Successfully ...";
eaAlert.Alert(msg);
//
// De Initialize XSampleEA Providers ...
delete mCTHelper;
+13 -2
View File
@@ -62,8 +62,8 @@ double eaSLPoint = 500; // Static SL Point
//
// Risk Management > Trade Management ...
double eaAllowLong = true; // Allow Long Positions
double eaAllowShort = true; // Allow Short Positions
bool eaAllowLong = true; // Allow Long Positions
bool eaAllowShort = true; // Allow Short Positions
int eaMaxAllowedLongs = 1; // Max Allowed Long Positions
int eaMaxAllowedShorts = 1; // Max Allowed Short Positions
double eaMaxDrawdownPercentForOpenTrades = 3; // Max Drawdown Percent for Open Trades
@@ -165,6 +165,11 @@ int OnInit()
// EventSetTimer(1);
// EventSetMillisecondTimer(100);
//
// Alert Initialization ...
string msg = "Initialized Successfully ...";
eaAlert.Alert(msg);
//
// Init Succeed ...
return INIT_SUCCEEDED;
@@ -190,6 +195,12 @@ void OnDeinit(const int reason)
string msg = "MaxSameTimeTrades: " + ToString(eaTradeHandler.MaxSameTimeTrades());
eaAlert.Alert(msg);
//
// Alert De Initialization Succeeded ...
msg = "De Initialized Successfully ...";
eaAlert.Alert(msg);
//
// De Initialize XSampleEA Providers ...
delete mCTHelper;