Hi,
I have a 0 line indicator; I’d like to to produce an alert when it crosses the 0 line. How do I do this?
-
If you have the code, test for a cross and issue the alert.
double aPrev = …, aCurr = …; bool wasUp = aPrev > 0, isUp = aCurr > 0, isCross = isUp != wasUp;
-
Otherwise, create an indicator that reads it using iCustom.
Detailed explanation of iCustom - MQL4 programming forum

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register