Sending mails on trade triggered?

 

Does anyone know about built in option in the metatrader (or any other add-in) to send email when a trade is triggered ?

 

hi myaron,will post a guide for you in a bit........

 

hi

myaron:
Does anyone know about built in option in the metatrader (or any other add-in) to send email when a trade is triggered ?

If I'm not forgot there's thread about that in this forum ...

===================

Forex Indicators Collection

 
 
myaron:
Does anyone know about built in option in the metatrader (or any other add-in) to send email when a trade is triggered ?

You can send emails from EA when it is making trades quite easily with SendMail() function.

But if you want to email all trading operations from mt4 terminal (open, close, modify orders), then you will need a special EA or script to do that.

I have built such script and can sell it (PM me for details).

The script can work even on accounts accessed by investor (read-only) passwords - like accounts of Participants - Automated Trading Championship 2007

I also have complimentary script, that can make trades from those emails on MT4 (also a program to trade on GAIN Capital and can make such program for any other broker with API). This will be useful for those, who want to sell trading signals and provide their clients with autoexecution ability.

I already mentioned about this in my TradeCopy thread https://www.forex-tsd.com/forum/commercial-talks/8400-tradecopy

 

Email Script

I am in need of this script to email from MT4. Please contact me jodell8484@yahoo.com

 

Here will be the example of the script which I coded by myself.

SendMail("EA","SELL USDCAD"+DoubleToStr(MarketInfo(currency,MODE_BID),4));

But thats not all what you need to do. the next step is even more important.

you must set some options in metatrader.

go to Tools -> Options then choose E-mail tab and there you must set necessary options.

for example:

SMTP server: mail.apollo.lv:25

SMTP login: your login name

SMTP password: your password for email account

From: put in your e-mail address

To: put in e-mail address whom you sending

however not all e-mail providers will work. for example i was not able to send using gmail.

 

Hello Treideri,

Although I am trading for quite a while, I am quite a scripting newbie. Could you explain what your script is doing ?

My rule with any kind of software or EA is to understand what they are doing, some of my losses are due to not respecting that.

So, if you could please give me extra details, that would be immensely helpful.

Thx

 

Here will be the short description of SendMail function.

void SendMail( string subject, string some_text)

Parameters:

subject - Subject text.

some_text - Mail body.

In my example, there is only function, but not complete script.

The mail subject will be : EA

The mail body will contain following text: SELL USDCAD 1.1850

MarketInfo function returns the latest Bid price for USDCAD. After that DoubleToStr function changes the variable type (from double to string) so that we can use it with SendMail function.

 

Precious mail, thank you a lot for the help.

I've read there is a new MT4 mobile but, as I can't install it everywhere, well-written mail alert will be useful.

Reason: