거래 로봇을 무료로 다운로드 하는 법을 시청해보세요
당사를 Facebook에서 찾아주십시오!
당사 팬 페이지에 가입하십시오
스크립트가 흥미로우신가요?
그렇다면 링크 to it -
하셔서 다른 이들이 평가할 수 있도록 해보세요
스크립트가 마음에 드시나요? MetaTrader 5 터미널에서 시도해보십시오
라이브러리

Simple License - lock your EA to accounts, expiry date, demo-only or server - MetaTrader 5용 라이브러리

Augusto Martin D'anna
Augusto Martin D'anna
MQL5 & Pine Script developer | Trader since 2019 | Strategy validation
As a trader, I know a bot is only as good as the logic behind it. I bridge
trading concepts and clean code: I don't just follow instructions, I make
sure your EA behaves exactly the way your strategy intends.
조회수:
95
평가:
(1)
게시됨:
MQL5 프리랜스 이 코드를 기반으로 한 로봇이나 지표가 필요하신가요? 프리랜스로 주문하세요 프리랜스로 이동

SimpleLicense.mqh is a small include file to protect EAs and indicators you sell or share privately. You set the allowed accounts and the expiry date, compile, and give your customer only the .ex5. If the account, date, account type or server do not match, the program shows the reason and its logic does not run.

What it checks

  • Allowed accounts - a comma-separated list of account numbers (empty = any account).
  • Expiry date - the program stops working after this date (0 = never).
  • Demo only - useful for trial versions: it refuses to run on real accounts.
  • Server filter - part of the broker server name, e.g. "FTMO" (empty = any server).

The check runs in OnInit and again once per hour (once per minute while invalid), so an expiry date or an account switch is detected without restarting the terminal. The alert with the reason is shown once, not on every tick.

How to use it

  • Copy SimpleLicense.mqh next to your EA (or into MQL5\Include) and add #include "SimpleLicense.mqh".
  • Declare CSimpleLicense lic; and in OnInit call AllowAccounts(), SetExpiry(), DemoOnly() and AllowServer() as needed, then if(!lic.Check()) return INIT_FAILED;
  • At the start of OnTick (or OnCalculate) add if(!lic.IsValid()) return;
  • LicenseDemoEA.mq5 shows the complete pattern: edit the four #define lines per customer and compile.

Limits

  • The values are compiled into the .ex5, so you build one file per customer and never share the source.
  • This stops casual sharing between traders. It is not protection against a determined cracker; for paid products with automatic licensing, the MQL5 Market is the stronger option.
  • Checks use the terminal's account information and server time.
Prop Firm Guardian - daily loss, max loss and profit target lock Prop Firm Guardian - daily loss, max loss and profit target lock

Account guardian for prop firm rules: closes all trades and blocks trading before the daily loss or max loss limit is hit, with an optional profit target lock.

Trade Permission Checker - finds why an EA or copier cannot trade Trade Permission Checker - finds why an EA or copier cannot trade

Finds out why an EA or trade copier cannot trade on your account. Read-only script, never trades.

Equity Target Closer - close all trades at a profit or loss level Equity Target Closer - close all trades at a profit or loss level

Closes all positions and pending orders when the account profit or loss reaches your target, in money or % of balance. Floating or full-day P/L, symbol and magic filters.

Execution Quality Logger - slippage, fill delay and spread of every deal Execution Quality Logger - slippage, fill delay and spread of every deal

Logs the slippage, fill delay and spread of every deal on the account (manual, EAs, SL/TP hits) to a CSV file and shows a live summary. It never trades.