Thread: not referenced
View Single Post
  #5 (permalink)  
Old 10-03-2007, 10:39 AM
jorgeng's Avatar
jorgeng jorgeng is offline
Member
 
Join Date: Nov 2005
Posts: 64
jorgeng is on a distinguished road
I tried to put this date-code in another ea which has

int init
int deinit
int start

If i put datecheck-code in int init I got the alert-box with trial version expired, but the ea still put in the orders. How do i do to get the ea to stop executing?

And how would the code be if placed in int start section?

//+------------------------------------------------------------------+
//| Start function |
//+------------------------------------------------------------------+
void start()
{
string expire_date = "2004.31.06"; //<-- hard coded datetime
datetime e_d = StrToTime(expire_date);

if (TimeCurrent() >= e_d)
{
Alert ("The trial version has been expired!");
return(0);
}
Reply With Quote