Author: erekit83@yahoo.com
Orders Execution
Checks for the total of open orders
Miscellaneous
It sends emails
0 Views
0 Downloads
0 Favorites
EA_E-mail
//+------------------------------------------------------------------+
//|                                                    EA_E-mail.mq4 |
//|                                               erekit83@yahoo.com |
//|                                         http://100k2.blogspt.com |
//+------------------------------------------------------------------+
#property copyright "erekit83@yahoo.com"
#property link      "http://100k2.blogspt.com"

//---- input parameters
extern int       TimeInterval=30;    // xx minutes to send the e-mail
//+------------------------------------------------------------------+
//| expert initialization function                                   |
//+------------------------------------------------------------------+
int init()
  {
//----
   
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| expert deinitialization function                                 |
//+------------------------------------------------------------------+
int deinit()
  {
//----
   
//----
   return(0);
  }
//+------------------------------------------------------------------+
//| expert start function                                            |
//+------------------------------------------------------------------+
int start()
  {
//----

   while(TimeInterval>0)
   {
       
       SendMail("Forex Account : " +AccountName()+ " Details",
      "Date and Time : "+TimeToStr(TimeCurrent(),TIME_DATE|TIME_SECONDS)+" \n"+
      "Balance       : "+DoubleToStr(AccountBalance(),2)+" \n"+
      "Used Margin   : "+DoubleToStr(AccountMargin(),2)+" \n"+
      "Free Margin   : "+DoubleToStr(AccountFreeMargin(),2)+" \n"+
      "Equity        : "+DoubleToStr(AccountEquity(),2)+" \n"+
      "Open Orders   : "+DoubleToStr(OrdersTotal(),0)+" \n\n"+

      "Broker  : "+AccountCompany()+" \n"+
      "Leverage: "+AccountLeverage()+"" );
       
       
       Sleep( TimeInterval*60*1000);    //sleep in miliseconds, so use 60*1000 to change to minute
   
   }
//----
   return(0);
  }
//+------------------------------------------------------------------+

Comments

Markdown supported. Formatting help

Markdown Formatting Guide

Element Markdown Syntax
Heading # H1
## H2
### H3
Bold **bold text**
Italic *italicized text*
Link [title](https://www.example.com)
Image ![alt text](image.jpg)
Code `code`
Code Block ```
code block
```
Quote > blockquote
Unordered List - Item 1
- Item 2
Ordered List 1. First item
2. Second item
Horizontal Rule ---