|
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);
}
|