Watch how to download trading robots for free
Find us on Telegram!
Join our fan page
Interesting script?
So post a link to it -
let others appraise it
You liked the script? Try it in the MetaTrader 5 terminal
Scripts

Trade Permission Checker - finds why an EA or copier cannot trade - script for MetaTrader 5

Views:
62
Rating:
(1)
Published:
MQL5 Freelance Need a robot or indicator based on this code? Order it on Freelance Go to Freelance

What it does

Drop it on any chart and it shows a short report on the chart itself and in the Experts tab. Each line is PASS, FAIL, INFO or UNKNOWN, with a plain reason and what to do next.

  1. Connected to the trade server
  2. Algo Trading button in this terminal
  3. Algo trading allowed for this script (the same box your EA or copier needs)
  4. Trading allowed on this account. This fails when you logged in with the investor (read-only) password, or the account is blocked or ended.
  5. Automated trading allowed by the broker. This fails when the broker has disabled EAs on the account; only the broker can change it.
  6. Symbol trade mode (full, long only, short only, close only, disabled)
  7. A dry-run order check of the minimum lot with OrderCheck. Nothing is sent. Return codes are translated, for example 10026 (disabled by the server) and 10027 (disabled by the terminal).

At the end it tells you how many checks failed and which line to fix first.

Inputs

  • InpShowOnChart: also draw the report on the chart (default true). The labels are named TPC_*. Run it again with false to remove them.
  • InpSymbol: symbol to check. Leave empty to check the chart's symbol. Inputs can be changed with F7 after dropping the script.

How it behaves when something is wrong

  • Terminal offline: checks 4, 5 and 7 show UNKNOWN instead of blaming the broker. Reconnect and run it again.
  • Market closed: the dry run shows INFO and asks you to run it again during trading hours. A closed market is not counted as a permission problem.
  • One cause is counted once. If Algo Trading is off, the dry run is skipped instead of failing a second time for the same reason.
  • If a value cannot be read, the line says UNKNOWN. It never shows PASS for something it did not check.

Notes and limitations

  • Read-only. It never opens, changes or closes any order, so it is safe on prop firm and live accounts.
  • It checks the MetaTrader side only. If everything passes and a copier still says "disabled", the problem is in the copier's own settings or logs.
  • Tested on a demo account with all checks passing and with the Algo Trading button switched off. Not yet tested on a real investor-password login, on an account where the broker disabled EAs, or with the market closed.
  • No DLL, no WebRequest, no files written. The only thing it leaves behind is the on-chart labels.
  • Not affiliated with any broker or prop firm.

Installation

  1. Copy TradePermissionChecker.mq5 to MQL5\Scripts and compile it.
  2. Drag the script onto the chart of the symbol your EA or copier trades.
  3. Read the report on the chart, or in the Experts tab of the Toolbox.
Opening Range Breakout Box Opening Range Breakout Box

Opening range breakout indicator for MT5 on Gold (XAUUSD), forex and indices: box of the first minutes of up to three sessions, breakout levels, two targets by range height, arrows and alerts on the closed candle. Open source code.

Spread Session Recorder Spread Session Recorder

Records the spread of one or many symbols to CSV every minute (min, time-weighted average, max), with ready tables per hour of day and per trading session. Restart-safe, never trades.

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.

Simple License - lock your EA to accounts, expiry date, demo-only or server Simple License - lock your EA to accounts, expiry date, demo-only or server

Minimal include file to license your own EAs and indicators: allowed account numbers, expiry date, demo-only trial mode and broker server filter. Example EA included.