Topic: How can I add "Expire" in EA from FSB?

How can I add "Expire" in ea from FSB?..

Post's attachments

Screenshot (10).png 249.57 kb, file has never been downloaded. 

You don't have the permssions to download the attachments of this post.

Re: How can I add "Expire" in EA from FSB?

Add the following code in the "OnTick" function.

   if (TimeCurrent() > D'2022.01.01') {
      Print("Your expert has expired!");
      ExpertRemove();
   }

The expert will check the time at every tick. If the time is greater than the set one, it will print a message and will exit.

You can use a variable in the expert:

datetime EXPIRY_TIME = D'2022.01.01';

...

void OnTick()
  {
   ...
   
   if (TimeCurrent() > EXPIRY_TIME) {
      Print("Your expert has expired!");
      ExpertRemove();
   }
  }

The "OnTick" function is at the end of the export.

Re: How can I add "Expire" in EA from FSB?

thank u pov pov...  i have suggestion for u.. maybe u can make a video tutorial "add some future" in code ea from EAS or FSB .. like how to add code filter spread, change comment name, filter time and anyting else... to support ur software