What is the function to set Alerts (not Alert() function) in MQL4 (metatrader)?

What is the function to set Alerts (not Alert() function) in MQL4 (metatrader)?

Manage alerts

Loading saved threads...

Pranav Joshi · External communityPost link
External question — Stack Overflow Stack Exchange Author: Pranav Joshi Original post: https://stackoverflow.com/questions/74938763 License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/ Adaptation: HTML converted to plain text; contact email addresses removed. Confusing terms clarification: Type 1: Alert() function in mql4 Type 2: Alerts that can be set on the UI of metatrader -see the image My question is related to type 2 Alerts. QUESTION: Is there a way to set alert via MQL4? Just looking for the right function name. My searches simply returned references to the type 1 alerts, nothing on type 2. NOTE: I am not looking for an indiactor solution. Tnx in advance.
Quote
Report
Yasin İPEK · External communityPost link
External answer — Stack Overflow Stack Exchange Author: Yasin İPEK Original post: https://stackoverflow.com/a/75767535 License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/ Adaptation: HTML converted to plain text; contact email addresses removed. if(TimeCurrent() > LastTimeSaved+Delay && AlertCount <= maxiterations) { AlertCount++; LastTimeSaved=TimeCurrent(); PlaySound("alert.wav"); Alert("Max Trades Reached!!!"); } for example
Quote
Report
PaulB · External communityPost link
External answer — Stack Overflow Stack Exchange Author: PaulB Original post: https://stackoverflow.com/a/75790078 License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/ Adaptation: HTML converted to plain text; contact email addresses removed. There are no inbuilt functions that enable you to set alerts in the Terminal Tab. The alerts that are set are stored in the following folder: <MT4 Data Folder>/profiles/alerts.ini You could possibly figure out the format of the stored information in the alerts.ini file, but you would need to read/write to it using Windows OS functions. You can read about this on the following page: File Operations via WinAPI
Quote
Report

Post Reply

Quoted from Forex.com.bd-Editorial External answer — Stack Overflow Stack Exchange Author: Yasin İPEK Source score (net votes, not local likes): -1 Original post: https://stackoverflow.com/a/75767535 License: CC BY-SA 4.0 — https://creativecommons.org/licenses/by-sa/4.0/ Adaptation: HTML converted to plain text; contact email addresses removed. if(TimeCurrent() > LastTimeSaved+Delay && AlertCount <= maxiterations) { AlertCount++; LastTimeSaved=TimeCurrent(); PlaySound("alert.wav"); Alert("Max Trades Reached!!!"); } for example

Cancel quote

Checking account access…