Can Anyone Advise Simplest Code for Adding Expiry Date to an EA?

 

Hello,

Please I need help in adding Expiry Date to an EA.
Can anyone help advise the simplest code for this?

Also I need help with these issues:
#1. I want to give out to the public for one day back testing a demo EA locked with an external key. The user will have to contact me to get the external key. However, since I cannot control further use of the EA and my intellectual property rights, I would want the EA to expire within one day (that is: 1440 minutes) after the user has entered the external key. Can anyone please advise what code to add to my EA, so that it starts counting minutes to expiry from the moment the user inputs external key to unlock the EA?

#2. I am worried about protection of my intellectual property rights. Can anyone please advise what internal code to add to my EA, so that once user downloads it the EA gets automatically locked to user's computer and cannot be copied and re-sent to other users?

#3. Finally, can anybody assure me that current build of the MT4 compiler makes it TOTALLY impossible to decompile an ex4 file?


Thank you for your assistance. 

 
because you are also a programmer, you can open a job, and you give other EA (you can use the EA "MACD sample", inherited from MQL4 EA), then you imitate the way of making its protection
 

Perhaps have the EA expire at exact dates and times, and have different keys for each time frame.  And you could either make the EA fail to initialize, or prevent it from opening new trades after the specific dates.  Are you selling this EA?  If you are, why not allow unlimited backtesting, and create a list of keys set to expire at the end of each week for forward testing?  Also, you could alter the 'demo' so that it can only trade demo account, and not money.

Check out ENUM_ACCOUNT_TRADE_MODE

 
I think this tutorial will help you 
Mql4 Programming Tutorial 43 - Making Trial Version of Expert Advisor
Mql4 Programming Tutorial 43 - Making Trial Version of Expert Advisor
  • 2014.02.25
  • www.youtube.com
This video teaches you about how you can make a trial Version of your Expert Advisor. contact me at: bilal_haider032@outlook.com Website Updated: http://www/...
 
imtav:

Perhaps have the EA expire at exact dates and times, and have different keys for each time frame.  And you could either make the EA fail to initialize, or prevent it from opening new trades after the specific dates.  Are you selling this EA?  If you are, why not allow unlimited backtesting, and create a list of keys set to expire at the end of each week for forward testing?  Also, you could alter the 'demo' so that it can only trade demo account, and not money.

Check out ENUM_ACCOUNT_TRADE_MODE

Thank you for your advice.
 
yassin.mokni:
I think this tutorial will help you 
Thanks
 

Hello friends. How can I enter my indicator into this expiration date code?



نماد «مورد تأیید انجمن»void OnTick()
  {
 //--- 
  datetime starts = D'24.01.2014';
  datetime ends = D'5.03.2014';
  
  if (TimeCurrent() >= starts&& TimeCurrent()<=ends)
  {
   
  Alert ("your Expert Advisor is Doing ITs JOB!!");
  
  }
  else 
   {
    Alert("sorry Trial period is Over now.. Expert is no longer working!!");
   }
  
  
  }
 
  
//+------------------------------------------------------------------+