add alerts on Init and DeInit for Expert ...

This commit is contained in:
2025-05-31 14:20:37 +03:30
parent 589477d660
commit c9c40ff862
2 changed files with 20 additions and 11 deletions
-7
View File
@@ -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 ...");
}
//
+20 -4
View File
@@ -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);
}
/**