How to Set An EA To Expire in EX4 Format?

 
I would like to offer free trials of my Expert Advisors for only 5 days. How do I code this or do I need to use an outside program?
 
I'm Not sure 100%, But i think this work fine.

string expire_date = "2006.06.11";
datetime e_d = StrToTime(expire_date);

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

And can you please look to my Request ( Student Looking for tutor correction ) By savio
 
I'm Not sure 100%, But i think this work fine.

string expire_date = "2006.06.11";
datetime e_d = StrToTime(expire_date);

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

And can you please look to my Request ( Student Looking for tutor correction ) By savio



Do I put this anywhere in the code? If not where do I put it. I am new at MQ4 programming.
 
I'm Not sure 100%, But i think this work fine.

string expire_date = "2006.06.11";
datetime e_d = StrToTime(expire_date);

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

And can you please look to my Request ( Student Looking for tutor correction ) By savio



I am getting errors. do I put this before start or after.

Do I put this anywhere in the code? If not where do I put it. I am new at MQ4 programming.