Remove the quotation marks around Symbol() function:
if (SendAnEmail) SendMail("Price closed above MA on " + Symbol() + ", " + EnumToString((ENUM_TIMEFRAMES)_Period), "email body");
Please note that the first parameter of SendMail() function is email header, and the second parameter (after the coma) is email body:
bool SendMail( string subject, // header string some_text // email text );
https://www.mql5.com/en/docs/common/sendmail
Regards.

Documentation on MQL5: Common Functions / SendMail
- www.mql5.com
Common Functions / SendMail - Reference on algorithmic/automated trading language for MetaTrader 5

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
Hi,
i am using a script i found online which sends email at MA crossover. It works, however i doesnt tell me the pair, so i have to add the symbol parameter
if (SendAnEmail) SendMail("Price closed above MA"," + Symbol() + ");
If i do the above line, it sends the email but just puts the text + Symbol() + in the body of the email not the actual pair names.
Can someone please tell me the correct syntax?