How To Make An EA Expire After A Certain Period

 

Hi guys, i want to make my EA expire after a certain period of time, can someone please help with the code (im new to coding)


I tried using the code below,

int start()

{

string expire_date = “2020.08.31”; //

datetime e_d = StrToTime(expire_date);


if (CurTime() >= e_d)

{

Alert (“The trial version has been expired!”);

return(0);

}but i am getting 2 error messages saying:

1.';'-unexpected end of program

2.'{'unbalanced parentheses

 

Please edit your post and

use the code button (Alt+S) when pasting code


I know that it is not obvious, but topics concerning MT4 and MQL4 have their own section.

In future please post in the correct section.

I will move your topic to the MQL4 and Metatrader 4 section.

 
Protect Yourselves, Developers!
Protect Yourselves, Developers!
  • www.mql5.com
Protection of intellectual property is still a big problem. This article describes the basic principles of MQL4-programs protection. Using these principles you can ensure that results of your developments are not stolen by a thief, or at least to complicate his "work" so much that he will just refuse to do it. Introduction When I started to get...
 
DRCAVE: i want to … please help … but i am getting 2 error messages saying:

1.';'-unexpected end of program
2.'{'unbalanced parentheses

Your errors have nothing to do with the code you posted.

If you don't learn MQL4/5, there is no common language for us to communicate. If we tell you what you need, you can't code it. If we give you the code, you don't know how to integrate it into your code.

Do you really expect an answer? There are no mind readers here and our crystal balls are cracked.

Always post all relevant code.
     How To Ask Questions The Smart Way. 2004
          Be precise and informative about your problem

We can't see your broken code.

Fix your broken code.