• Please try to select the correct prefix when making a new thread in this folder.

    Discuss is for general discussions of a financial company or issues related to companies.

    Info is for things like "Has anyone heard of Company X?" or "Is Company X legit or not?"

    Compare is for things like "Which of these 2 (or more) companies is best?"

    Searching is for things like "Help me pick a broker" or "What's the best VPS out there for trading?"

    Problem is for reporting an issue with a company. Please don't just scream "CompanyX is a scam!" It is much more useful to say "I can't withdraw my money from Company X" or "Company Y is not honoring their refund guarantee" in the subject line.
    Keep Problem discussions civil and lay out the facts of your case. Your goal should be to get your problem resolved or reported to the regulators, not to see how many insults you can put into the thread.

    More info coming soon.

Searching How to Safely Share an EA for Backtesting Only?

Help me find a company

Siuko

ZyraTrading.com Representative
Messages
9
Dear members of the Forex Peace Army community,

I have developed an Expert Advisor (EA) that I would like to share with fellow traders, but I want to ensure it is only used for backtesting purposes and not for live trading. My goal is to protect my code while still offering users the opportunity to test the EA's performance.

Currently, in the EA's code, I have added the following condition:

SCSS:
OnInit(){
if(!IsTesting()){return(INIT_FAILED);}
}

I am wondering if this condition is sufficient to prevent the EA from functioning in live trading and restrict it solely to backtests. Are there any other security measures I could consider to further protect my EA when shared with others?

Any help, advice, or recommendations you could provide would be greatly appreciated. I want to ensure that my EA is used in accordance with my intentions while benefiting from the community's feedback.

Thank you sincerely for your assistance!

Best regards, Anthony
 
OnInit(){ if(!IsTesting()){return(INIT_FAILED);} }
I am wondering if this condition is sufficient to prevent the EA from functioning in live trading and restrict it solely to backtests. Are there any other security measures I could consider to further protect my EA when shared with others?
you would need to fire up a live account, demo account, or both and then run the EA to see if it initializes. I might want to make it more sophisticated in that is returns a specific error in the log file so that you + your user can know why it failed.

You can also make another check in the OnTick() loop.

You can also tie EA to account number(s), whether account is demo vs real. This would give you more flexibility to restrict how the EA is run.

But note that EAs distributed via the mql market cannot have restrictions like this.

Other forums like ForexFactory or mql5.com might be more active with coders that can provide more specific examples on how to protect EA.
 
Dear members of the Forex Peace Army community,

I have developed an Expert Advisor (EA) that I would like to share with fellow traders, but I want to ensure it is only used for backtesting purposes and not for live trading. My goal is to protect my code while still offering users the opportunity to test the EA's performance.

Currently, in the EA's code, I have added the following condition:

SCSS:
OnInit(){
if(!IsTesting()){return(INIT_FAILED);}
}

I am wondering if this condition is sufficient to prevent the EA from functioning in live trading and restrict it solely to backtests. Are there any other security measures I could consider to further protect my EA when shared with others?

Any help, advice, or recommendations you could provide would be greatly appreciated. I want to ensure that my EA is used in accordance with my intentions while benefiting from the community's feedback.

Thank you sincerely for your assistance!

Best regards, Anthony
Cant, you code it to only work on demo accounts and not real accounts? also for the code, it will be accessible and if someone knows MQL, he can copy that.
 
I completely understand your concern about protecting your Expert Advisor (EA) from piracy. Indeed, it is essential to take measures to deter potential pirates and safeguard your hard work.

I agree with you that avoiding the basic encryption performed by MQL5 can discourage many pirates who rely on simple methods. However, you are right to point out that complete protection against piracy is challenging, if not impossible. That's why I have made efforts to implement advanced security measures for my EA.

I am aware that there are sophisticated methods used by some pirates to modify the terminal and bypass checks, such as the IsTesting() function. It is crucial to take a proactive approach by employing various protection techniques, such as code obfuscation, a license management system, and customized encryption, to make the task of pirates more difficult.

Regarding free trials of my EA, I have also considered this option. Unfortunately, as you highlighted, some users may abuse this offer by creating multiple accounts to continue using the trial version without restrictions. This makes it challenging to ensure that the EA is used in line with the initial intentions.

Rather than freely distributing the EA on the web, I have opted for an approach where I can provide interested individuals with the opportunity to test the EA in their specific environment while preserving the security of my code. This allows users to experience the EA's performance while considering their own trading context.

In conclusion, while we can never completely eliminate the risk of piracy, by implementing advanced security measures and enabling users to test the EA in a controlled manner, I seek to protect my work while offering an authentic evaluation experience.

If you have any suggestions or additional ideas to enhance the EA's security, I am open to discussion and collaboration with other community members.

Thank you for your attention and interest in this critical topic.

Best regards, Zyra Trading
 
Backtesting and demo accounts are not worth a damn. Only an idiot would buy an EA based on that. Fortunately, you are in a target rich environment.

To be serious about your EA, you have to provide a live forward trial. People might make additional accounts to abuse the trial, so then link the EA to their name. They might make one or two extra accounts but most people only have so many names they can prove.

You should also make your own live trading account available. People like to compare their results with yours. In my experience, buying the EA is the least expensive part of trying out an EA....
 
Last edited:
Cant, you code it to only work on demo accounts and not real accounts? also for the code, it will be accessible and if someone knows MQL, he can copy that.
You distribute the xxxx.ex4 file, not the xxxx.mql file, so the code is not accessible and ex4 cannot be decompiled.
 
also for the code, it will be accessible and if someone knows MQL, he can copy that.
EX4 and EX5 is compiled with encryption. So it cannot be easily decompiled for several years now. (mt4 prior to b600 did not have encryption, and it was easy to decompile ex4 to mq4)
 
EX4 and EX5 is compiled with encryption. So it cannot be easily decompiled for several years now. (mt4 prior to b600 did not have encryption, and it was easy to decompile ex4 to mq4)
You distribute the xxxx.ex4 file, not the xxxx.mql file, so the code is not accessible and ex4 cannot be decompiled.
Did I mention decompilation?
No
No need to decompile an Ex4 or ex5 ... just touch the terminal or some dll to make all ex4 or ex5 work without purchase ... or bypass the IsTesting() function.

So no, I'm not talking about decompilation, because it's useless to decompile in order to crack ...

I'm just asking if there's anything else for it, and yes, I've found another solution. I'm currently working on it to try it out.

Backtesting and demo accounts are not worth a damn. Only an idiot would buy an EA based on that. Fortunately, you are in a target rich environment.

To be serious about your EA, you have to provide a live forward trial. People might make additional accounts to abuse the trial, so then link the EA to their name. They might make one or two extra accounts but most people only have so many names they can prove.

You should also make your own live trading account available. People like to compare their results with yours. In my experience, buying the EA is the least expensive part of trying out an EA....


If it works, I'll share the process. If it doesn't, I won't provide a backtestable EA so there's no risk and only live signals ...
 
Back
Top