I can send a test email fine from mt4.
But I would like an email once an Expert Advisor places a trade. Is there a little line of code I could include in the EA. I would just like the subject of the email to be the pair traded, buy or sell and price traded.
Then another email would go when the EA closes with the pair traded and exit price.
I have looked here and elsewhere before posting this but I can't find the answer. Most focus on how to send email in mt4 generally. I've managed that.
Thanks in anticipation
You can check the return value of OrderSend() function and if it is true, you call the SendMail() Function to send out the email.
The same can be done with the OrderClose() function, but not if the SL/TP levels are hit in that case you did not use OrderClose() function,
But in that case you can still detect those closed orders by monitoring OrdersTotal() function and whenever something changes still send out the message.

- www.mql5.com
But I would like an email once an Expert Advisor places a trade. Is there a little line of code I could include in the EA. I would just like the subject of the email to be the pair traded, buy or sell and price traded.
Then another email would go when the EA closes with the pair traded and exit price.
I have looked here and elsewhere before posting this but I can't find the answer. Most focus on how to send email in mt4 generally. I've managed that.
Thanks in anticipation