Password for EA

To add comments, please log in or register
adrian1970
110
adrian1970  

Hello Developers!

Do you know how to set password for the EAs?

ckdanfx
169
ckdanfx  
hi i know
Icham Aidibe
11286
Icham Aidibe  
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...
adrian1970
110
adrian1970  
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

Icham Aidibe
11286
Icham Aidibe  
adrian1970:

Thank you very much @Icham Aidibe

You're welcome.

To add comments, please log in or register