How to License an MT5 Expert Advisor Without Building Your Own Backend
LicenseFort Team · August 12, 2026 · 2 min read
Selling an Expert Advisor without any licensing means one sale can quietly become five, or ten. A customer forwards the compiled file to a friend, posts it in a Discord server, or resells it outright — and there's nothing in the file itself to stop any of that.
This is the actual, no-code path to fixing that, using the Protect Software wizard.
The flow, start to finish
- Upload your EA or indicator to the Protect Software wizard and pick MT4 or MT5.
- LicenseFort inserts the license check and compiles it for you — you get back a ready-to-ship file, not a diff to apply yourself.
- Generate a license key, optionally bound to a specific MT4/MT5 account, device, or expiry date.
- Send the compiled file and the license key to your customer.
- Your customer enters the key once, in the EA's Inputs tab, when they attach it to a chart.
- LicenseFort validates automatically from then on — no server for you to run, no webhook to maintain.
- Revoke it, or let it expire, and access is denied on the customer's very next check.
Steps 1 and 2 are the only "technical" part, and the wizard does both — you're not hand-editing MQL4/MQL5 source or wiring up an API call yourself.
What actually happens to your source
When you upload a file, the wizard inserts a real validation block at the start of OnInit(), before any of your own logic runs — then a build worker compiles it with MetaEditor and hands back a genuine .ex4/.ex5. You can toggle account binding and device limits on or off, and the compiled output changes accordingly.
The one manual step — and it's on your customer's machine, not your code
MetaTrader blocks outbound requests by default. The first time a compiled EA runs, your customer may need to allow the validation URL under:
Tools → Options → Expert Advisors → "Allow WebRequest for listed URL"
It's a one-time setting per install, and the EA's own error message walks through it if it's missed — worth mentioning to a customer up front so it doesn't look like the software is broken.
Binding a license to more than just a device
Device/HWID binding is the default, but it's not the only guarantee available. Set a bound account number when you generate a key, and that license will never validate against a different MT4/MT5 account — even from a brand-new machine. That's a stronger promise than device binding alone, since it's pinned at creation time rather than learned on first activation.
Start free
The free plan covers one product and one license key — enough to run this entire flow for real, with no credit card, before deciding whether to pay for more.
Ready to protect your own software?
Free plan included — 1 product, 1 license key, no credit card.
Get started freeMore from the blog
Prop Firms Are Finally Getting Regulated.
The CFTC is asking whether prop firm challenge fees count as commodity-pool interests, and a firm called FundingTicks already collapsed in January after retroactively rewriting its rules. If you sell EAs, risk tools, or trade copiers to challenge traders, the coming cleanup changes what your licensing setup needs to do.
MetaTrader Gave Its AI Assistant Hands. Here's What That Means For Your License Check.
MetaQuotes just shipped native MCP support so the MT5 AI Assistant can enumerate your indicators and manipulate your charts on its own. Cool for traders. Slightly terrifying if your entire licensing strategy is 'the crack sites haven't found this EA yet.'
MetaQuotes Audited MT5. When's the Last Time You Audited Your License Check?
MetaQuotes quietly announced a full code audit of MT5 for stability and reliability. Most EA sellers, meanwhile, haven't looked at their own license validation logic since the day they shipped it. Here's the checklist that should change that.
