expiration date

 
Hi all

How would one do to put an expiration date on an indicator or EA. Like to make an indicator stop showing on chart or EA stop trading if date (or servers date) is after like January 15 2006 ?

I tried with the daysofyear but, didnt do what I wanted.

any ideas would be appreciated, thanks.

Maxwells

ps: sorry for my bad english.
 
if(Year()>=2006 && DayOfYear()>15) return(-1);
 
if(Year()>=2006 && DayOfYear()>15) return(-1);


But it will also work from 1 to 15 jan of 2007, 2008 etc.
 
if((Year()==2006 && DayOfYear()>15) || Year()>2006) return(-1);
 
Hi all

Great, thank.exactly what I wanted. Is that time based on server or local time? Mean, if someone changes his computer time, can he get around it?

Maxwells.
 
Year() and DayOfYear() functions operate with last known server time not local computer time.
Reason: