Password for EA

 

Hello Developers!

Do you know how to set password for the EAs?

 
hi i know
 
adrian1970:

Hello Developers!

Do you know how to set password for the EAs?

yeah

input string pass = ""; // enter a password
string passwd = "hellobaby"

void OnInit() {
if (pass != passwd) { ExpertRemove(); }
}

You have to hardcode it, because MT doesn't allow to hide a file somewhere deep in the system file. It's also possible to add some encryption stuff, but that's the basic way to do it.

See there for more advanced secure tips depending on your setup, you may choose a licence key on the net or whatever ...

https://www.mql5.com/en/articles/359

Securing MQL5 code: Password Protection, Key Generators, Time-limits, Remote Licenses and Advanced EA License Key Encryption Techniques
Securing MQL5 code: Password Protection, Key Generators, Time-limits, Remote Licenses and Advanced EA License Key Encryption Techniques
  • 2012.02.17
  • investeo
  • www.mql5.com
Most developers need to have their code secured. This article will present a few different ways to protect MQL5 software. All examples in the article will refer to Expert Advisors but the same rules can be applied to Scripts and Indicators. The article starts with simple password protection and follows with key generators, licensing a given...
 
Icham Aidibe:

yeah

You have to hardcode it, because MT doesn't allow to hide a file somewhere deep in the system file. It's also possible to add some encryption stuff, but that's the basic way to do it.

See there for more advanced secure tips depending on your setup, you may choose a licence key on the net or whatever ...

https://www.mql5.com/en/articles/359

Thank you very much @Icham Aidibe

 
adrian1970:

Thank you very much @Icham Aidibe

You're welcome.