Hi
Can any of you add alerts to the attached code as tried using AI tools but all are producing code which are giving continuous alert but not whenever a new arrow is appeared , want to automate this using MX2
Traders and coders often code without charge if:
-- it is interesting for them personally
-- it is interesting for many members on this forum.
Otherwise, consider to place a job on Freelance section

- 2024.10.21
- www.mql5.com
Hi
Can any of you add alerts to the attached code as tried using AI tools but all are producing code which are giving continuous alert but not whenever a new arrow is appeared , want to automate this using MX2
I moved your thread to MT4 section of the forum.
-------------------
About AI tools - read this thread: https://www.mql5.com/en/forum/448462
because of the following:
No help is provided for ChatGPT generated code on this forum.

- 2023.06.05
- Vitor Monteiro
- www.mql5.com
Hi
Can any of you add alerts to the attached code as tried using AI tools but all are producing code which are giving continuous alert but not whenever a new arrow is appeared , want to automate this using MX2
use the Alert() function at the same place where the buffer CrossUp is assigned a value.
check documention to see how the Alert funtion works.
Hi
As was mentioned above you should simply use Alert function just below Cross Up assignment, but to avoid constant alerts you must add here some limitation for example add a condition to display alert only when you have last closed candle:
if(i==1) Alert(“alert”);
But to be perfectly sure it won’t be repeated you can also add a time flag to check when the last alert was placed and then allow new alerts only if current time is on ne candle.
Have a nice day👍📊

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi
Can any of you add alerts to the attached code as tried using AI tools but all are producing code which are giving continuous alert but not whenever a new arrow is appeared , want to automate this using MX2