Limit Expert to work until specific Date or for Time limit

 

Hi guys,

I wrote expert and I want to limit it for 30 days limit and then it will not work.

or limit it until specific day.

Anyone know how can I do that ?

Thanks in advance.

 Eyal

 
vaknineyal: I wrote expert and I want to limit it for 30 days limit and then it will not work. or limit it until specific day.
Ontick(){
   static datetime expiration=D'2014.03.05 15:46:58';
// or
   #define COMPILATION_DATE __DATE__
   #define EXPIRATION_DAYS 30
   static datetime expiration = COMPILATION_DATE + EXPIRATION_DAYS * PERIOD_D1 * 60;
//
   if( TimeCurrent() > expiration){ Alert("expired on "+expiration); ExpertRemove(); return; }
 
WHRoeder:
vaknineyal: I wrote expert and I want to limit it for 30 days limit and then it will not work. or limit it until specific day.


Thanks alot mate :) 

Reason: