Forex



Go Back   Forex Trading > Downloads > Expert Advisors - Metatrader 4
Forex Forum Register More recent Blogs Calendar Advertising Others Help






Register
Welcome to Forex-TSD!, one of the largest Forex forums worldwide, where you will be able to find the most complete and reliable Forex information imaginable.

From the list below, select the forum that you want to visit and register to post, as many times you want. It’s absolutely free. Click here for registering on Forex-TSD.

Exclusive Forum
The Exclusive Forum is the only paid section. Once you subscribe, you will get free access to real cutting-edge Trading Systems (automated and not), Indicators, Signals, Articles, etc., that will help and guide you, in ways that you could only imagine, with your Forex trading.
  • Elite Section
    Get access to private discussions, specialized support, indicators and trading systems reported every week.
  • Advanced Elite Section
    For professional traders, trading system developers and any other member who may need to use and/or convert, the most cutting-edge exclusive indicators and trading systems for MT4 and MT5.
See more

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 03-30-2006, 07:47 PM
Member
 
Join Date: Dec 2005
Posts: 58
techinvest is on a distinguished road
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!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #2 (permalink)  
Old 03-31-2006, 09:18 PM
Member
 
Join Date: Dec 2005
Posts: 58
techinvest is on a distinguished road
anyone??????
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #3 (permalink)  
Old 03-31-2006, 09:56 PM
Nicholishen's Avatar
Senior Member
 
Join Date: Dec 2005
Posts: 531
Nicholishen is on a distinguished road
Quote:
Originally Posted by techinvest
anyone??????
Try this
PHP Code:
bool mail;
int start(){
   if (
Hour()>=23 && !mail){
      
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));
      
mail=true;
   }
   if(
Hour()<23)mail=false;

__________________
"Anyone who has never made a mistake has never tried anything new." -Albert Einstein

Last edited by Nicholishen; 03-31-2006 at 10:00 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #4 (permalink)  
Old 03-31-2006, 10:16 PM
Junior Member
 
Join Date: Jan 2006
Posts: 11
gtd141 is on a distinguished road
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();
   }
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #5 (permalink)  
Old 03-31-2006, 11:36 PM
Member
 
Join Date: Dec 2005
Posts: 58
techinvest is on a distinguished road
Thanks to you both. I think we have a winner in one of these!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #6 (permalink)  
Old 05-23-2006, 04:43 AM
ajk's Avatar
ajk ajk is offline
Senior Member
 
Join Date: Dec 2005
Posts: 261
ajk is on a distinguished road
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);
}
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #7 (permalink)  
Old 10-27-2008, 12:03 PM
Junior Member
 
Join Date: Aug 2008
Posts: 6
npmjh is on a distinguished road
Help with Email Alert

Hi

I know this thread goes back to 2006 but I have spent 2 hours trying to track down an updated Alert.
All I want is every Hour the account balance, Equity,Margin , Free margin emailed to me.
I have managed to use the attached that works but stops after 64 emails with "Mail: not enough space for 'DLMod2'.

bool mail;
int start(){
if (Hour()>=00 && !mail){
SendMail("DLMod2", "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));
mail=true;
}
if(Hour()<24)mail=false;
}


I understand I can fix the email limit by restarting MT4 but was hoping someone would have another suggestion.

Thanks
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #8 (permalink)  
Old 02-17-2009, 03:49 AM
Junior Member
 
Join Date: Dec 2008
Posts: 9
superdave_forexhack is on a distinguished road
New help request

I could use some help with my nested if statement below - the Alertmsg & the email triggers are happening properly, but the sound files are not playing appropriately - they are playing but not the right sound with the event.

any help would be appreciated:
Dave
*******************

{

ind_buffer3[i] = EMPTY_VALUE; ind_buffer4[i] = EMPTY_VALUE;
if (ind_buffer1[i] > ind_buffer2[i] && ind_buffer1[i+1] < ind_buffer2[i+1])
{ ind_buffer3[i] = Low[i] - 1 * Point;
AlertMsg = "BUY Signal";
TradeType = 1 ;
PlaySound("airforce.wav");}

if (ind_buffer1[i] < ind_buffer2[i] && ind_buffer1[i+1] > ind_buffer2[i+1])
{ ind_buffer4[i] = High[i] + 1 * Point;
AlertMsg = "SELL Signal";
TradeType = -1;
PlaySound("tires.wav");}

if (eMailAlerts_On && LastTradeType != TradeType && LastTradeTime != Time[0])
{LastTradeType = TradeType;
LastTradeTime = Time[0];
SendMail("EA Alert: Mac-Daddy Lunge// ",Symbol()+" - "+AlertMsg);}
}
//---- done
return(0);
}
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #9 (permalink)  
Old 10-30-2009, 02:47 AM
Member
 
Join Date: Aug 2006
Posts: 75
dcraig is on a distinguished road
Alert to email

I've got a question regarding email alerts that I'm hoping one of you can comment on. Many indicators provide alert windows that pop up when a specific condition is met. While I have the email function set up in MT4, is there any way to set MT4 to send me an email when an alert window pops up? The indicators in question don't have an email function ....

An example would be the Demarker indicator.

Thanks for any assistance.

Doug
__________________
Ottawa, ON
Canada
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
  #10 (permalink)  
Old 11-02-2009, 01:50 PM
Member
 
Join Date: Aug 2006
Posts: 75
dcraig is on a distinguished road
additional info

I've noticed that the alert actually appears in the Expert tab in "terminal". Perhaps there is a way to have this notification emailed using the email function in MT4?
__________________
Ottawa, ON
Canada
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!StumbleUpon this Post!Reddit this Post!Facebook this Post!BlinkList this Post!Google Bookmarks this Post!Yahoo! My Web this Post!
Reply With Quote
Reply

Bookmarks

Tags
email alert, email alert metatrader, metatrader email alert, metatrader email alerts, Send mail


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Email newdigital Tools and utilities 109 11-04-2009 03:31 AM
EA generating 1-2%/per day Muddyguy Commercial Trading Systems and indicators 575 08-04-2009 07:06 AM
Email alert inside MT4 blewsky Setup Questions 1 12-28-2006 08:07 AM


All times are GMT. The time now is 07:47 AM.



Search Engine Friendly URLs by vBSEO 3.2.0 ©2008, Crawlability, Inc.