Forex
Google
New signals service!

Go Back   Forex Trading > Discussion Areas > Metatrader 4


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

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 03-26-2007, 05:23 AM
Member
 
Join Date: Feb 2006
Posts: 52
icm63 is on a distinguished road
Send Email On Pre Set Time not Working, event is not firing !

I have this function in start...IT DOES NOT FIRE !!!
- Its on a EA, with all common EA properties clicked on !
- Tick action from chart occured during this time frame.

Why does it not send an email.

The OK Variable is there to make sure it ony sends an email once, and not on every tick !



void Start()
{
EmailAction();

}


void EmailAction()
{
int OK1 = 0;

// If local time is 4 pm and minute is 0 ( ie first 60 seconds of the hour) then send email.

if(TimeHour(TimeLocal()) == 16 && TimeMinute(TimeLocal()) ==0 && OK1 != 1)
{
SendMail( "TEST_Status_"+TimeToStr(TimeLocal(),TIME_DATE|TIM E_MINUTES), "TEST" );
OK1 = 1;
}
else
OK1 = 0;

return(0);
}

Last edited by icm63; 03-26-2007 at 07:54 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 03-26-2007, 07:13 AM
ralph.ronnquist's Avatar
Senior Member
 
Join Date: Oct 2006
Posts: 280
ralph.ronnquist is on a distinguished road
Try using "==" instead of "=" in the condition.

Last edited by ralph.ronnquist; 03-26-2007 at 07:16 AM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 03-26-2007, 07:55 AM
Member
 
Join Date: Feb 2006
Posts: 52
icm63 is on a distinguished road
Good point, but my code had this, otherwise MT4 would not compile, still doesnt work !
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Bookmarks

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 On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Key event within mq4 programs pipeline Metatrader 4 mql 4 - Development course 7 07-04-2008 11:26 AM
Email function not working in EA....but works for MT4 Snuffleupagus Metatrader 4 7 02-13-2007 04:32 AM
Event driven programming cardio Setup Questions 1 03-25-2006 01:33 PM
Code to send email alerts when closed trades... Nicholishen Metatrader 4 3 02-27-2006 01:26 AM


All times are GMT. The time now is 06:55 PM.



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