How to LOCK/Encrypt EA - page 6

 

I'd go one step further and suggest that since the OP is asking a relatively basic coding question that the EA they wish to eventually sell was not written by them. Most likely it's one of the many free open source EA's that are found right here on this forum.

Good luck with your GREAT business venture.

Lux

 
marthasmith629:
Hello,

Please help, I need a code to insert in mq4 look like this,

I insert account number from the broker, and also I could insert the expire date(days or weeks), so in metatrader if the account number

in the indicator do not match with the account number, or already expire, the indicator won't work/show.

If anyone in this forum could help, please inform me the code.

Thak you very much for all your help

Martha Smith

As I understand you want some codes about use some indicator on some particular account and the other code as expiration date. If yes, so I moved your post to this thread where I hope you will find something.

 

any demo how to protected my ex4 used by .dll support or .ini ..

 

Code Needed to Prevent Reverse Engineering

I know it exists. I'm looking for the code required to prevent reverse engineering. I know that several companies use it in their commercial EAs. Can anyone help me out with this?

Thanks,

Steve

 

hi

That's a good idea to prevent decompiling , I don't know about the code but if there's someone who knew about this one , please post your knowledge here

===================

Forex Indicators Collection

 

It's called a .dll

MQL files will always be decompiled unless they create a better encryption code.

 

Protect your EA (for Trial Period)

If you want to give the user of the program a try-before-buy program you can limit the usage of your program by limited period of time and after this period the program will not work.

Use the code below to limit your program for period of time.

int start()

{

string expire_date = "2006.31.06"; //<-- hard coded datetime

datetime e_d = StrToTime(expire_date);

if (CurTime() >= e_d)

{

Alert ("The trial version has been expired!");

return(0);

}

// your normal code!

return(0);

}

 
dollarfinder:
If you want to give the user of the program a try-before-buy program you can limit the usage of your program by limited period of time and after this period the program will not work.

Use the code below to limit your program for period of time.

int start()

{

string expire_date = "2006.31.06"; //<-- hard coded datetime

datetime e_d = StrToTime(expire_date);

if (CurTime() >= e_d)

{

Alert ("The trial version has been expired!");

return(0);

}

// your normal code!

return(0);

}

Open the ex4 in any hex-editor and change the date string

 
dollarfinder:
If you want to give the user of the program a try-before-buy program you can limit the usage of your program by limited period of time and after this period the program will not work.

Use the code below to limit your program for period of time.

int start()

{

string expire_date = "2006.31.06"; //<-- hard coded datetime

datetime e_d = StrToTime(expire_date);

if (CurTime() >= e_d)

{

Alert ("The trial version has been expired!");

return(0);

}

// your normal code!

return(0);

}

Good try, but no cigar

If anyone wants to protect their code, take it from me there is only one way.

first create a dll file

second have the dll file access a remote server that has control numbers.

Why do this, wake up people any ex4 code can be decompiled.

Do you think metatrader 5 code will be any better!

Metatrader5 will be based on a true c++ code. and it also can be decompiled.

Do you think your dll file is safe all by itself, I can decompile it. So my advice is to make is secure by having it access a remote server, then everything is protected.

You say it cannot be done, then you are not programmers. There is at least 1 ea out there that uses this method "destiny"

 
Michel:
Open the ex4 in any hex-editor and change the date string

That could be work