|
|||||||
| 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 |
|
|||
|
Help Generating an Email Alert
Currently this is what I'm trying in my EA to update me via email about the health of my account:
if (Hour()==23 && Minute()==00) SendMail("DLMod1", "Account Balance is-"+DoubleToStr(AccountBalance(),2)+"_Account Equity is-"+DoubleToStr(AccountEquity(),2)+ "_Account Profit is-"+DoubleToStr(AccountProfit(),2)+"_Account Margin is-"+DoubleToStr(AccountMargin(),2)+ "_Account Free Margin is-"+DoubleToStr(AccountFreeMargin(),2)); The problem is that if I add in a seconds value, if it doesn't get a tick that second I get no email, but in this configuration I get an email for every tick sometimes almost 100. Can someone help me write this correctly so that I get only one email a day? Thanks for your help! |
|
|||
|
Another idea.
Code:
int SentEmail=0;
int start(){
if (Hour()==23 && SentEmail!=DayOfYear())
{
SendMail("DLMod1", "Account Balance is-"+DoubleToStr(AccountBalance(),2)+"_Account Equity is-"+DoubleToStr(AccountEquity(),2)+
"_Account Profit is-"+DoubleToStr(AccountProfit(),2)+"_Account Margin is-"+DoubleToStr(AccountMargin(),2)+
"_Account Free Margin is-"+DoubleToStr(AccountFreeMargin(),2));
SentEmail = DayOfYear();
}
|
|
||||
|
Email ... Alerts
Anyone know how to customize an alert using the sendmail command? I am having trouble getting an email to work off an alert
.Any advice would be appreciated. if(current_dirction != last_direction) { Alert ("EMA/SMA Cross for "+Symbol()+" on the "+Period()+" minute chart."); last_direction = current_dirction; return (true); } else { return (false); } |
![]() |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| EA generating 1-2%/per day | Muddyguy | Commercial Trading Systems and indicators | 557 | 07-04-2008 05:50 AM |
| newdigital | Tools and utilities | 48 | 06-27-2008 12:22 AM | |
| Email alert inside MT4 | blewsky | Setup Questions | 1 | 12-28-2006 07:07 AM |