May 27, 2024

Grandhometours

The Gods Made Home

How to Protect My EA Code Using Dynamic Link Library (dll) File?

It’s not worth to waste your time putting any protection INSIDE the EA (.ex4 file) – never mind it is a time/date protection or it is limited by email or account number. As long as it has full functionality and can be decompiled, this protection can be removed and the Expert Advisor can be used without permission. If the idea is to sell the expert, better think of a serious protection.

DLL file is a serious protection. It can be done in a few ways. Image You have Your EA to make desicion to enter a BUY trade using RSI and MACD indicators. If You code this inside the EA (.ex4 file) – everyone can see how Your EA decides to make a trade. But if You move these calculations to the DLL, no code will be seen in the EA. DLL file functions will return TRUE or FALSE so Your EA would know if it can take a trade or not. All RSI and MACD (or any other indicators) calculations will be made in the DLL file.

When this is done, You can either sell Your EA or add more protection.

You can have Your own database of Your users that can have access to trade the EA. DLL file can connect lets say every 5 minutes to Your web site and make an authorization using user password. This way no one can use Your EA without You knowing about this. If EA will not be able to make an authorization the DLL file will refuse to make calculations and EA will not know when to BUY or SELL the market.