Download MetaTrader 5

Send email when trade executes

To add comments, please log in or register
Forex Trader
114299
Forex Trader  

Hi I would like to have MT4 send me a email when a trade executes from a EA. I do not have the code for the EA as it is locked (greyed out). Can a second code be added to a chart and when the trade executes it would automaticly send a email of the trade execution? I am offten on the road and it would be nice to see when trades are happing on my Blackberry. A text would also be cool on my phone. I don't have any experience coding so I am sort in the dark on this one. Or does anybody know of a way to send an alert for this. I see that alerts can be sent on when certain events happen like highs and lows but you can't send email for a trade execution.

Thanks in advance.

Forex Trader
114299
Forex Trader  
You can attache an endless script to the needed chart. This script should check all orders several times per second and send an email via the function SendEmail().
Forex Trader
114299
Forex Trader  
Rosh :
You can attache an endless script to the needed chart. This script should check all orders several times per second and send an email via the function SendEmail().

Can you help me with this script. I do not know how to program MT4 yet. If this is easy could you write the script and then I can paste it into the chart?

Forex Trader
114299
Forex Trader  

See article Events in МetaТrader 4:

The article deals with programmed tracking of events in the МetaТrader 4 Client Terminal, such as opening/closing/modifying orders, and is targeted at a user who has basic skills in working with the terminal and in programming in MQL4.

Forex Trader
114299
Forex Trader  
Rosh :

See article Events in МetaТrader 4:

The article deals with programmed tracking of events in the МetaТrader 4 Client Terminal, such as opening/closing/modifying orders, and is targeted at a user who has basic skills in working with the terminal and in programming in MQL4.

As noted before I do not know how to script is there anyone out there that could help or possibly I could pay someone to write this add on so I can get emails whenever a trade opens with a EA or the trade is closed. I got the email portion all setup and working. My EA is locked so I can not add code to it.

Forex Trader
114299
Forex Trader  
Jeffodell :
Rosh :

See article Events in МetaТrader 4:

The article deals with programmed tracking of events in the МetaТrader 4 Client Terminal, such as opening/closing/modifying orders, and is targeted at a user who has basic skills in working with the terminal and in programming in MQL4.

As noted before I do not know how to script is there anyone out there that could help or possibly I could pay someone to write this add on so I can get emails whenever a trade opens with a EA or the trade is closed. I got the email portion all setup and working. My EA is locked so I can not add code to it.

If anyone is intrested I got this to work with the help of a programmer. We devloped a script or Ea that will send an email everytime a trade is taken out or closed. It send an email or text message. If anyone needs this the programmer is selling it. I love this as I can see my trades on my mobile phone or email at work. Check it out https://www.plimus.com/jsp/buynow.jsp?contractId=2215388&referrer=jeffodell84

Forex Trader
114299
Forex Trader  

What a ripoff!


Here is a free code I modded an EA based on Nicholishen's original alerter EA.

It alerts upon the close of a trade on a pair to which the EA was attached. I use a commercial EA, and I open up an extra chart to which I attach the alerter.

Mind you, I am not a MQ4 programmer, I just dabble, so it may not be the best code in the world, but it works for me. I would love to have it augmented to alert on trade openings as well, but I am not that smart yet. If anyone can contribute to this code, that would be great!

This is what the email looks like:


Subject: CLOSE pr: 23.59, bal: 5152.57, eq: 5058.81

Symbol: <PAIR> <BUY/SELL> <MAGIC#>
Comment: <COMMENT>
Ticket#: <TICKET#>
Size: <SIZE_LOT>
OpenTime: <OPEN_TIME/DATE>
Close Time: <CLOSE_TIME/DATE>
Open: <OPEN_PRICE>
Close: <CLOSE_PRICE>
Profit: <$PROFIT>
Pips: <PROFIT_IN_PIPS>

Balance: <CURRENT_BALANCE>
Used Margin: <USED_MARGIN>
Free Margin: <FREE_MARGIN>
Equity: <CURRENT_EQUITY>
Open Orders: <CURRENT_OPEN_ORDERS>

Broker: <BROKER_NAME>
Leverage: <LEVERAGE_USED>


Forex Trader
114299
Forex Trader  
dimmyr :

What a ripoff!


Here is a free code I modded an EA based on Nicholishen's original alerter EA.

It alerts upon the close of a trade on a pair to which the EA was attached. I use a commercial EA, and I open up an extra chart to which I attach the alerter.

Mind you, I am not a MQ4 programmer, I just dabble, so it may not be the best code in the world, but it works for me. I would love to have it augmented to alert on trade openings as well, but I am not that smart yet. If anyone can contribute to this code, that would be great!

This is what the email looks like:


Subject: CLOSE pr: 23.59, bal: 5152.57, eq: 5058.81

Symbol: <PAIR> <BUY/SELL> <MAGIC#>
Comment: <COMMENT>
Ticket#: <TICKET#>
Size: <SIZE_LOT>
OpenTime: <OPEN_TIME/DATE>
Close Time: <CLOSE_TIME/DATE>
Open: <OPEN_PRICE>
Close: <CLOSE_PRICE>
Profit: <$PROFIT>
Pips: <PROFIT_IN_PIPS>

Balance: <CURRENT_BALANCE>
Used Margin: <USED_MARGIN>
Free Margin: <FREE_MARGIN>
Equity: <CURRENT_EQUITY>
Open Orders: <CURRENT_OPEN_ORDERS>

Broker: <BROKER_NAME>
Leverage: <LEVERAGE_USED>


dim myr  - what's the issue with a programmer making some money then?

I've written extensive email notification into numerous EAs, notifying initialisation parameters, de-initialisation reasons, order opens, order closes, margin exhaustion etc. etc.

I can easily do what you need. But I'll charge you more than £33.19 just on principle, since reading your comment. 

Forex Trader
114299
Forex Trader  
cloudbreaker :

dim myr - what's the issue with a programmer making some money then?

I've written extensive email notification into numerous EAs, notifying initialisation parameters, de-initialisation reasons, order opens, order closes, margin exhaustion etc. etc.

I can easily do what you need. But I'll charge you more than £33.19 just on principle, since reading your comment.

Sorry, didn't mean to offend.

Indranx Avataram
70
Indranx Avataram  
Forex Trader:

What a ripoff!


Here is a free code I modded an EA based on Nicholishen's original alerter EA.

It alerts upon the close of a trade on a pair to which the EA was attached. I use a commercial EA, and I open up an extra chart to which I attach the alerter.

Mind you, I am not a MQ4 programmer, I just dabble, so it may not be the best code in the world, but it works for me. I would love to have it augmented to alert on trade openings as well, but I am not that smart yet. If anyone can contribute to this code, that would be great!

This is what the email looks like:


Subject: CLOSE pr: 23.59, bal: 5152.57, eq: 5058.81

Symbol: <PAIR> <BUY/SELL> <MAGIC#>
Comment: <COMMENT>
Ticket#: <TICKET#>
Size: <SIZE_LOT>
OpenTime: <OPEN_TIME/DATE>
Close Time: <CLOSE_TIME/DATE>
Open: <OPEN_PRICE>
Close: <CLOSE_PRICE>
Profit: <$PROFIT>
Pips: <PROFIT_IN_PIPS>

Balance: <CURRENT_BALANCE>
Used Margin: <USED_MARGIN>
Free Margin: <FREE_MARGIN>
Equity: <CURRENT_EQUITY>
Open Orders: <CURRENT_OPEN_ORDERS>

Broker: <BROKER_NAME>
Leverage: <LEVERAGE_USED>


How to change from send email on CLOSE TRADE TO send email when OPEN TRADE??
Alain Verleyen
Moderator
33629
Alain Verleyen  
Indranx:
How to change from send email on CLOSE TRADE TO send email when OPEN TRADE??
By changing your code ?
12
To add comments, please log in or register