| New signals service! | |
|
|||||||
| Register in Forex TSD! | |
|
Trading Systems Leaders in this forum (automated trading systems) are winning more than 3000 pips in a month (30000$ investing one lot every time). Click here to register and get more information |
|
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
||||
|
Code to send email alerts when closed trades...
I was writing some code to send me email alerts after trades close, regardless of whether or not the expert closed the trade or the trade was closed via TP or SL. I have tested it and it works, however, I am having problems with the emails violating SMTP rules when use MT4's SendMail(). (see http://cr.yp.to/docs/smtplf.html)
Does anyone know how to get around or correct this problem, because this would be a VERY valuble tool, especially for those who need to focus time on other work and would like to keep up to speed on the account as trades are being executed. Personally, it would be great to have trades emailed to my BlackBerry to see the details after the trade is close. I appreciate any help! Last edited by Nicholishen; 02-27-2006 at 12:47 AM. |
|
||||
|
fixed
...It seems that it did not like my "\n" statements. To use the mail alert you must first setup MT preferences. If you haven't yet done it, you would go to: TOOLS>OPTIONS>EMAIL. Enable the email feature and set the preferences for SMTP. Depending on how you intend to use it you can insert it into your code and change the subject to the name of the advisor. Make sure to add filters to the qualifying if statement. An example is inserted but commented out. Optionally you can just#include as a generic mailer. The benefit of this is to have the system email you the details of closed trades; even when they have closed due to SL or TP. I would appreciate feedback as to what details you would like to see in the email. ![]() Last edited by Nicholishen; 02-27-2006 at 01:49 AM. |
|
||||
|
Quote:
...looks like we posted at same time. Thanks for the info! |
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Send Email On Pre Set Time not Working, event is not firing ! | icm63 | Metatrader 4 | 2 | 03-26-2007 07:55 AM |
| Email Alerts - SMTP Server | cballew | General Discussion | 1 | 03-16-2007 02:17 PM |
| Using CCI to trigger Email alerts | techtrader | Metatrader 4 | 2 | 05-30-2006 12:58 PM |