add alerts on Init and DeInit for Expert ...
This commit is contained in:
@@ -332,14 +332,10 @@ int OnInit()
|
||||
bool isInited = eaExpert.HandleOnInit();
|
||||
if (!isInited)
|
||||
{
|
||||
//
|
||||
Print(ShortName + " Initialization Failed ...");
|
||||
return INIT_FAILED;
|
||||
}
|
||||
|
||||
//
|
||||
// Init Succeed ...
|
||||
Print(ShortName + " Initialization Succeed ...");
|
||||
return INIT_SUCCEEDED;
|
||||
}
|
||||
|
||||
@@ -366,9 +362,6 @@ void OnDeinit(const int reason)
|
||||
//
|
||||
delete eaExpert;
|
||||
ZeroMemory(eaExpert);
|
||||
|
||||
//
|
||||
Print(ShortName + " Deinitialized Successfully ...");
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
@@ -574,6 +574,18 @@ class XCXCATBEAExpert : public XCBase
|
||||
// we check it as Last Step ...
|
||||
result = hasSymbols &&
|
||||
HasChild(eaSignallers);
|
||||
if (result)
|
||||
{
|
||||
//
|
||||
string message = "Initialized Successfully ...";
|
||||
eaAlert.SendAlert(message);
|
||||
}
|
||||
else
|
||||
{
|
||||
//
|
||||
string message = "Initialization Failed ...";
|
||||
eaAlert.SendAlert(message);
|
||||
}
|
||||
|
||||
//
|
||||
return result;
|
||||
@@ -584,10 +596,6 @@ class XCXCATBEAExpert : public XCBase
|
||||
*/
|
||||
void HandleOnDeInit()
|
||||
{
|
||||
//
|
||||
delete eaAlert;
|
||||
ZeroMemory(eaAlert);
|
||||
|
||||
//
|
||||
delete eaTrade;
|
||||
ZeroMemory(eaTrade);
|
||||
@@ -609,6 +617,14 @@ class XCXCATBEAExpert : public XCBase
|
||||
//
|
||||
delete eaTradeManager;
|
||||
ZeroMemory(eaTradeManager);
|
||||
|
||||
//
|
||||
string message = "DeInitialized Successfully ...";
|
||||
eaAlert.SendAlert(message);
|
||||
|
||||
//
|
||||
delete eaAlert;
|
||||
ZeroMemory(eaAlert);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user