From 7904f7e56b60fc1223f4f9e62c58d4fae8018365 Mon Sep 17 00:00:00 2001 From: Hadi Khazaee Asl Date: Wed, 29 May 2024 01:09:39 +0330 Subject: [PATCH] last ... --- Classes/x-saherelm.xea.class.mq5 | 45 ++++++++++++++++++++++++++++++++ Experts/x-test.x121ea.mq5 | 7 +++++ 2 files changed, 52 insertions(+) diff --git a/Classes/x-saherelm.xea.class.mq5 b/Classes/x-saherelm.xea.class.mq5 index 5d68b9c8..006c889e 100644 --- a/Classes/x-saherelm.xea.class.mq5 +++ b/Classes/x-saherelm.xea.class.mq5 @@ -2489,6 +2489,12 @@ public: mAlert.SetTerminalAlerts(value); } + // + void SetAlertPrefix(string value) + { + mAlert.SetPrefix(value); + } + // // Event Listeners ... void AddOnSignalEventHandler(TOnSignal listener) @@ -2501,6 +2507,45 @@ public: ); } + // + // Alert Functions ... + + // + // Logging an Alert ... + void LogAlert(string message) + { + mAlert.LogAlert(message); + } + + // + // Terminal Alert ... + void TerminalAlert(string message) + { + mAlert.TerminalAlert(message); + } + + // + // Mail Alert ... + void MailAlert(string message) + { + mAlert.MailAlert(message); + } + + // + // Send Push Notification ... + void PushAlert(string message) + { + mAlert.PushAlert(message); + } + + // + // Send an Alert by Handling all Different Specified + // type's of Alert's if they are Enabled ... + void Alert(string message) + { + mAlert.Alert(message); + } + // // Overrides ... diff --git a/Experts/x-test.x121ea.mq5 b/Experts/x-test.x121ea.mq5 index 6022cf2a..f44c5f51 100644 --- a/Experts/x-test.x121ea.mq5 +++ b/Experts/x-test.x121ea.mq5 @@ -94,6 +94,9 @@ int OnInit() // // TesterHideIndicators(true); + // + mX121EA.Alert(ShortName + " Initialized Sccessfully ..."); + // // Init Succeed ... return INIT_SUCCEEDED; @@ -117,6 +120,7 @@ void OnDeinit(const int reason) // // De Initialize X121EA Providers ... + mX121EA.Alert(ShortName + " Deinitialized ..."); } // @@ -215,6 +219,9 @@ bool InitialEA() x121EAMinProfitPerVolumeFactor // Min Volume Factor for Calculating Profit (Hedge) ); + // + mX121EA.SetAlertPrefix(ShortName); + // // Prepare Providers and Add them into mX121EA class ... for (int i = 0; i < symbolsCount; i++)