If you plan to sell or share an EA, you can limit where and how long it runs. This article explains the main protection options, what each one can and cannot do, and how source code fits in.
Why protect an EA
An EA file can be copied in seconds. Without any protection, a buyer can pass it to others, or keep using it after a trial or subscription ends. Simple controls inside the EA give you a way to decide who runs it, on which accounts and until when. No protection is unbreakable, but the right layers stop casual sharing.
Options
- Account lock: the EA works only on listed account numbers.
- Expiry date: it stops opening trades after a set date.
- Broker or demo lock: runs only with a chosen broker, or only on demo accounts.
- Online licence check: the EA checks a server before it starts, so you can turn users on and off.
Account lock
You collect the buyer's account number, and the EA checks it on start. If the number is not on the list, the EA shows a message and does not trade. This is simple and works without a server, but each new account means a new compiled file with the number built in, unless the list is held online.
Expiry date
The EA compares the current time with a built-in date. This suits trials and fixed-term rentals. It is better to use the server time of the broker than the computer clock, since a user can change a local clock. Decide what happens at expiry: stop new trades only, or also manage open ones until they close. Stopping abruptly with open positions can hurt your customer, so most sellers let existing trades finish.
Online licence check
The EA contacts a server you control and asks whether the account is allowed. You can add or remove users, extend subscriptions and see who is active, without sending a new file. It needs a small server component and the terminal must allow web requests. If your server is down, the EA must have a sensible fallback so honest users are not left unprotected with open trades.
Source code
Share the compiled file (.ex5 or .ex4), not the source code. Our standard delivery is the compiled file; full source code is an add-on.
If you are the owner of the idea, keep your own copy of the source safely backed up, because a compiled file cannot be turned back into editable code reliably. If you later need changes, source access is what makes updates quick.
Other practical points
- Keep a version number visible in the EA so you can tell which build a customer has.
- Write clear terms with your buyers about use, refunds and risk, and describe results honestly.
- Do not promise profits. An EA automates rules, it does not make a strategy profitable.
Adding protection with us
We can add locks, expiry and licence checks to a new EA or an existing one. See EA development and changes and upgrades. Pricing is on the pricing page, and you can read how a project runs on the process page. Hosting a licence server is a separate topic, and our VPS checklist covers the basics.
Choosing the right level
The right protection depends on how you sell. If you give an EA to a few known people, an account lock is enough. If you rent an EA monthly, an online licence check gives you control without sending new files. If you offer a free trial, an expiry date or a demo-only lock is the simplest choice. Match the effort to the value, since stronger protection takes more time to build and test, and adds more that can go wrong for honest users.
- Few known users: account lock.
- Trial period: expiry date or demo-only lock.
- Monthly rental or many customers: online licence check.
- Sold to one broker's clients: broker lock plus account lock.
Whatever you choose, test it as a user would. Try the EA on an allowed account, on a blocked account, after the expiry date and with no internet connection. The messages shown to the user should be clear, so an honest customer understands what to do and does not think the EA is broken. We also include these checks when we hand over an EA, and you see a working demo before final payment.
Frequently asked questions
Can the protection be removed by a buyer?
A skilled person may try, which is why layers and an online check are better than a single lock. Nothing is perfect.
Do I get the source code?
Standard delivery is the compiled file. Full source code is an add-on, so ask for it when you request the quote.
Does an online check slow down trading?
It runs once at start or at long intervals, not on every tick, so it should not affect execution.