Skip to content
NEXORA Money & AI

How to Protect Your Trading Software From Unauthorized Sharing

October 3, 2026 · OYIN ADESOLA · 5 min read · Updated October 12, 2026
Cover graphic for the article: How to Protect Your Trading Software From Unauthorized Sharing

Last checked: 12 October 2026. This guide draws on MetaTrader 5 and MQL5 pages about Market encryption and activations and on MQL5 reference functions. No protection scheme is unbreakable, and nothing here is legal advice.

If your indicator sells well, someone will try to share it. Software piracy cannot be eliminated, and anyone who promises “100 percent crack-proof” protection is selling hope, not security. The realistic goal is smaller: make honest use easy, make casual sharing inconvenient and have a clear response when sharing happens. This guide explains the layers available to an MT5 seller.

Layer 1: distribute compiled files, not source

MQL5 programs are written in .mq5 files and compiled into .ex5 files. Give customers the .ex5 only. The .mq5 contains your logic in readable form. Keep the source in a private backup and never attach it to a download.

Layer 2: let the marketplace protect it

The MetaTrader 5 help says every product on the MQL5 Market is provided with at least five activations, one used at purchase and four additional. It also says all programs downloaded from the Market are encrypted. A StrategyQuant guide describes the encryption key as unique for every buyer and bound to the buyer’s computer, so Market products have automatic copy protection. A Japanese-language version of the help page explains that binding a product to a computer is called activation. Sellers can increase the number of activations, and a buyer’s existing activations do not change if the seller later reduces them.

For many sellers this is the strongest reason to use the Market: the heavy part of protection is done for you.

Summary graphic listing the main sections of: How to Protect Your Trading Software From Unauthorized Sharing

Layer 3: your own licensing when selling directly

When you sell on your own site, you must build protection yourself. Common checks inside an MT5 program:

  • Account lock. The licence is tied to the customer’s trading account number, read with AccountInfoInteger(ACCOUNT_LOGIN). Sharing the file with someone on another account does not work.
  • Server lock. Optionally tie it to the broker server name with AccountInfoString(ACCOUNT_SERVER), so a login number on a different broker does not collide.
  • Expiry date. Compare an expiry with TimeCurrent, the server time, not the computer clock.
  • Online verification. An Expert Advisor can call a licensing server with WebRequest, subject to the permission settings. The MQL5 reference says WebRequest is not available in indicators, so an indicator would need a companion EA or an offline signed key. The next article builds an offline key system.

The account lock deserves a note. Many traders have several accounts, and some are working with prop firms that give new logins often. A strict one-account licence can frustrate honest customers, so offer a small number of accounts per licence and explain the policy before purchase.

Layer 4: per-customer builds

You can compile a separate .ex5 for each buyer, with the customer’s ID built into the file. If a copy appears online, you can identify which licence it came from. This costs time unless you automate it, and it only works if you build before delivery. It also supports a clear message in your terms: leaked copies lead to licence termination.

Layer 5: terms, not just code

A software licence agreement says what customers may and may not do: how many installations, no resale, no sharing. Terms do not stop copying, but they give you a basis to act when you find a leak, such as asking a website to remove a listing or ending the customer’s licence. Keep them short and readable. Have a lawyer review them if the product is a serious business, because rules differ by country.

What does not work well

  • Hiding the file behind a long obfuscated name. It does not stop anyone.
  • Annoying legitimate users. Heavy checks that fail on slow connections or odd setups produce refund requests, not security.
  • Storing a secret inside the program and assuming it is safe. Anything inside a file the customer holds can in principle be extracted by a determined person. Treat client-side checks as a speed bump.
  • DLL tricks. The MQL5 Market rules, as quoted by sellers, prohibit DLL calls in Market products. Outside the Market they add platform risk and trust problems, because many traders refuse to run unknown DLLs.

Responding when you find a leak

  1. Save evidence: the URL, screenshots and the date.
  2. Check whether the leaked copy is an old or trial version.
  3. If you have per-customer builds or licence logs, identify the source and follow your terms.
  4. Send a takedown request to the site or its host. Many hosts and search engines have a form for copyright complaints.
  5. Release updates that improve the product. Paying customers value support and updates that a leaked copy cannot provide.

A sensible balance

Spend your effort where it pays. A low-priced utility rarely justifies elaborate protection. A high-priced specialist tool might. On a marketplace, rely on the built-in protection and put your effort into the product and support. On your own site, add an account lock and an expiry, keep your terms clear and accept that some leakage will happen.

What we could not confirm

  • How resistant Market encryption is to determined attackers. Neither MetaQuotes nor third parties publish a security guarantee.
  • Whether older descriptions of activation numbers (some quote different minimums) still apply. The MetaTrader 5 help is the current reference.

Frequently asked questions

Is it worth locking to an account number? It stops casual sharing, but it can annoy customers with multiple accounts. Offer a few accounts per licence.

Can I sue someone who shares my indicator? That depends on your country and contract. Often a takedown notice is the practical first step. Ask a lawyer.

Key takeaways

Ship compiled files, use the Market’s built-in protection if you sell there, add an account lock and expiry on your own site, write short clear terms and plan a response to leaks instead of chasing perfect security.

Sources checked

  • MetaTrader 5 Help, “How to Become a Seller” and “How to Purchase an App”, metatrader5.com
  • StrategyQuant documentation, description of MQL Market encryption and activations
  • MQL5 Reference, AccountInfoInteger, AccountInfoString and WebRequest, mql5.com

Educational content only — not financial advice. Income and savings results vary and are never guaranteed. How we write

Enjoyed this story?

Get the best stories delivered weekly.

Leave a Reply

Your email address will not be published. Required fields are marked *

Share with