Aurix Exchange

[REQ] email alert EA

r_a_u_l

Member
tell me if u just want your EA to send you emails when it closes a trade

if so, here is the code:

////////////////////////////////////
//call the Notify() function in your code, after the ea closes trade

void Notify(){
string OT; if(OrderType()==0) OT="BUY"; if(OrderType()==1) OT="SELL";
string Sb=StringConcatenate(AccountNumber()," ",AccountCompany());
string Bd=StringConcatenate("#",OrderTicket()," ",OT," ",DoubleToStr(OrderLots(),2)," ",OrderSymbol()," ",DoubleToStr(OrderOpenPrice(),5)," -> ",DoubleToStr(OrderClosePrice(),5),"\n\n","P/L=",DoubleToStr(OrderProfit(),2),", EQ=",DoubleToStr(AccountEquity(),2));
SendMail(Sb,Bd);
}
/////////////////////////////////////
 

jeremy

Member
I was actually hoping it could send a email when a trade is opened on my mt4 account. I have several ea's running on my account and like to know when they open a trade so I can monitor. FGB is one of them which I like to keep an eye on ;)
 

muzzamcc

New member
I was actually hoping it could send a email when a trade is opened on my mt4 account. I have several ea's running on my account and like to know when they open a trade so I can monitor. FGB is one of them which I like to keep an eye on ;)

Try tradetalk from the mt4i trader tools
 

braddock

Member
tell me if u just want your EA to send you emails when it closes a trade

if so, here is the code:

////////////////////////////////////
//call the Notify() function in your code, after the ea closes trade

void Notify(){
string OT; if(OrderType()==0) OT="BUY"; if(OrderType()==1) OT="SELL";
string Sb=StringConcatenate(AccountNumber()," ",AccountCompany());
string Bd=StringConcatenate("#",OrderTicket()," ",OT," ",DoubleToStr(OrderLots(),2)," ",OrderSymbol()," ",DoubleToStr(OrderOpenPrice(),5)," -> ",DoubleToStr(OrderClosePrice(),5),"\n\n","P/L=",DoubleToStr(OrderProfit(),2),", EQ=",DoubleToStr(AccountEquity(),2));
SendMail(Sb,Bd);
}
/////////////////////////////////////

i am not a programmer, but what i have to to with this code. can somebody explain me?.
 

lambic

Member
Here is an indicator to put on chart. It send email when order is made.
 

Attachments

  • Open-Trade-Alert.mq4
    7.2 KB · Views: 0

Aurix Exchange
Top