How to Fix Common MT5 EA Errors in TradingView-to-MT5 Automation with AlgoWay

How to fix common MT5 EA errors in AlgoWay TradingView to MetaTrader 5 automation

Most MetaTrader 5 Expert Advisor errors are not random. When TradingView sends a webhook signal to AlgoWay and AlgoWay routes it to MetaTrader 5 through the AlgoWayWS-MT5 EA, a failed trade usually belongs to one of a few groups: MT5 permissions, EA connection, invalid JSON, wrong symbol mapping, broker order rules, market sessions, or request rate limits.

This guide updates the old AlgoWay MT5 common errors page for the current AlgoWayWS-MT5 EA 2.10 workflow. It still covers the classic MT5 errors from the original article — 4752, 4756, 4014, 10018, and 10024 — but now places them inside the current TradingView-to-MT5 automation chain:

TradingView alert → AlgoWay webhook → AlgoWayWS-MT5 EA → MetaTrader 5 broker server

Use this page if you are searching for MT5 EA error 4752, MetaTrader 5 error 4756, MT5 error 4014, TRADE_RETCODE_MARKET_CLOSED 10018, MT5 error 10024 too many requests, or TradingView to MT5 automation not working.

Last updated: 2026-05-12 • Author: AlgoWay

Quick Diagnostic: Where Did the Failure Happen?

Before fixing an MT5 error, identify the layer where the failure happened. This prevents guessing.

Layer Typical symptom Where to check
TradingView Alert does not send, webhook fails, message is not JSON TradingView alert settings and message body
AlgoWay webhook Payload rejected, invalid fields, Error 415 AlgoWay webhook logs
AlgoWayWS-MT5 EA EA not connected, wrong UUID, DLL permission problem MT5 Experts tab and AlgoWay dashboard
MetaTrader 5 terminal AutoTrading disabled, EA not allowed to trade MT5 toolbar, Options, EA properties
Broker server Market closed, request rejected, invalid stops, wrong lot size MT5 Journal, Experts tab, symbol specification

If the signal never reaches AlgoWay, this is not an MT5 error. If AlgoWay receives the payload but MT5 does not react, check the AlgoWayWS-MT5 EA connection. If MT5 receives the command but the broker rejects it, check symbol rules, volume, stops, filling type and sessions.

Current AlgoWayWS-MT5 Troubleshooting Checklist

Check these items before focusing on a specific error code:

  1. AlgoWay webhook is created for MetaTrader 5.
  2. Current AlgoWayWS-MT5 EA is installed, not an old EA build.
  3. MT5 AlgoTrading button is enabled.
  4. EA is attached to a chart and allowed to trade.
  5. Required EA permissions, including DLL imports for the current WebSocket EA, are enabled.
  6. Webhook UUID in the EA matches the AlgoWay dashboard.
  7. TradingView alert message is valid JSON.
  8. The symbol exists in MT5 Market Watch exactly as the broker names it.
  9. Order size follows the broker's minimum lot and lot step rules.
  10. Market is open for the selected symbol.
  11. AlgoWay webhook logs and MT5 Experts logs are checked together.

Current setup guide: How to connect TradingView to MetaTrader 5 with AlgoWay EA.

Error 4752 — Trading Disabled / AutoTrading Disabled

OrderSend failed. Error code: 4752
autotrading disabled by client/server

What it means: MT5 or the broker does not allow the Expert Advisor to place trades. This is usually a permission problem, not a TradingView problem and not a JSON problem.

Common causes:

  • the global MT5 AlgoTrading button is disabled;
  • the EA is attached but trading is not allowed in EA properties;
  • MT5 Options block algorithmic trading;
  • the account is read-only or investor login is used;
  • the broker disabled trading for that account or symbol.

How to fix 4752

  1. Check the MT5 toolbar and enable AlgoTrading.
  2. Right-click the chart → Expert AdvisorsProperties.
  3. Confirm that the EA is allowed to trade.
  4. Open Tools → Options → Expert Advisors and allow algorithmic trading.
  5. Check that the account is not investor/read-only mode.
  6. Try a small manual order on the same symbol. If manual trading also fails, the issue is account or broker permission.

If the button is disabled or the broker blocks trading, AlgoWay cannot force MT5 to execute the trade. Fix the terminal or broker permission first.

Error 4756 — Request Rejected

OrderSend failed. Error code: 4756
request rejected

What it means: the broker rejected the trade request. The signal may have reached AlgoWay and MT5 correctly, but the final order parameters did not pass broker-side rules.

Common causes:

  • wrong symbol or symbol suffix;
  • symbol is not tradable or not selected in Market Watch;
  • order volume is below minimum lot or does not match lot step;
  • wrong filling type for the broker;
  • market has no fresh quotes;
  • SL/TP values are invalid or too close to market price;
  • the selected account mode does not match the AlgoWay execution mode.

How to fix 4756

  1. Open Market Watch and confirm the broker symbol exists.
  2. Right-click the symbol → Specification.
  3. Check minimum volume, volume step, stops level, filling type and trading sessions.
  4. Send a very small valid test order manually in MT5.
  5. Update AlgoWay symbol mapping if TradingView sends a different ticker.
  6. Test the same payload again from AlgoWay logs.

For TradingView automation, 4756 often means that the alert is technically delivered, but the final broker request is not acceptable.

Error 4014 — Function Not Allowed / Wrong Context

Error code: 4014
function is not allowed for call

What it means: 4014 depends on the context. In older WebRequest-based EAs it often meant the URL was not allowed in MT5 options. In newer WebSocket/DLL-based workflows, it can indicate that the terminal or strategy tester context does not allow the function being called.

For old AlgoWay MT5 pages, 4014 was usually explained as a WebRequest whitelist issue. The current AlgoWayWS-MT5 EA workflow is WebSocket-based, so the first checks are different: current EA version, DLL imports, live/demo chart context, and MT5 permissions.

How to fix 4014 in current AlgoWayWS-MT5 workflow

  1. Confirm that you are using the current AlgoWayWS-MT5 EA, not an old WebRequest EA.
  2. Open Tools → Options → Expert Advisors.
  3. Enable the permissions required by the current EA setup guide, including DLL imports where required.
  4. Do not test WebSocket/connection logic in an unsupported strategy tester context.
  5. Check the MT5 Experts log for the exact function or permission that failed.

If You Are Still Using an Old WebRequest EA

If your build still uses WebRequest, open:

MT5 → Tools → Options → Expert Advisors

Then allow WebRequest for the required AlgoWay URL exactly as specified by the old EA guide. For current installation, follow the current AlgoWayWS-MT5 setup instead.

Error 10018 — Market Closed

OrderSend failed. Error code: 10018
TRADE_RETCODE_MARKET_CLOSED

What it means: the broker server says the selected market is closed. The Expert Advisor may be working correctly, but the symbol is not currently available for trading.

Common causes:

  • weekend or holiday closure;
  • symbol has limited exchange hours;
  • broker session starts later than the chart timestamp;
  • CFD, index, stock, metal, futures or crypto CFD has specific session rules;
  • strategy tester session data differs from live broker schedule.

How to fix 10018

  1. Open Market Watch.
  2. Right-click the symbol → Specification.
  3. Check the listed trading sessions.
  4. Compare the broker server time with the current session window.
  5. Wait until the market opens or configure AlgoWay/EA session filters.

This is not solved by changing the webhook URL. The broker is telling MT5 that the market cannot currently accept orders.

Error 10024 — Too Many Requests

OrderSend failed. Error code: 10024
TRADE_RETCODE_TOO_MANY_REQUESTS

What it means: too many order requests are being sent in a short time. MT5 or the broker rejects the request stream to protect the trading server.

Common causes:

  • TradingView alert fires repeatedly;
  • strategy sends multiple alerts on the same bar;
  • several EAs or signals trade the same account at the same time;
  • retry logic sends new requests without waiting;
  • webhook message is triggered on every tick instead of confirmed bar close.

How to fix 10024

  1. Check TradingView alert frequency.
  2. Use confirmed-bar logic where appropriate.
  3. Avoid multiple alerts for the same signal.
  4. Check AlgoWay logs for duplicate payloads.
  5. Disable other EAs temporarily to isolate the source.
  6. Use safer retry timing and avoid immediate repeated order sends.

If AlgoWay receives the same webhook many times, the problem may be in the TradingView alert condition or Pine Script logic, not in MT5.

Invalid Stops — SL/TP Rejected by Broker

Invalid stops are a common cause of rejected MT5 orders. The broker can reject Stop Loss or Take Profit values if they are on the wrong side of the market, too close to the current price, or rounded incorrectly for the symbol digits.

Example problems:

  • BUY order has Stop Loss above entry price;
  • SELL order has Stop Loss below entry price;
  • Stop Loss or Take Profit is closer than the broker's minimum stop distance;
  • price precision does not match the symbol digits;
  • TradingView pip logic does not match MT5 broker symbol logic.

Use the advanced risk management guide to understand how AlgoWay handles SL/TP and trailing stop automation.

TradingView Alert Reaches AlgoWay but MT5 Does Not Trade

If TradingView fires and AlgoWay logs show the payload, but MT5 does not trade, check these items:

  • AlgoWayWS-MT5 EA is connected;
  • webhook UUID in the EA is correct;
  • MT5 AlgoTrading is enabled;
  • DLL imports are enabled if required by the EA;
  • symbol mapping matches broker Market Watch;
  • trade mode matches account behavior;
  • lot size is accepted by broker specification;
  • MT5 Experts log shows the command being received.

If AlgoWay logs are empty, the issue is before MT5. Check TradingView webhook URL, alert status and JSON message.

TradingView Webhook Error 415 Is Not an MT5 Error

Error 415 usually happens before MetaTrader 5 is involved. It means the webhook server rejected the content type or message format. In TradingView setups, this often happens when the alert message is not valid JSON.

Use this guide: How to fix AlgoWay webhook Error 415.

Example of valid JSON:

{
  "platform_name": "metatrader5",
  "ticker": "{{ticker}}",
  "order_contracts": "{{strategy.order.contracts}}",
  "order_action": "{{strategy.market_position}}",
  "price": "{{close}}"
}

Symbol Mapping: TradingView Ticker vs Broker MT5 Symbol

One of the most common TradingView-to-MT5 automation problems is symbol naming. TradingView may send a clean ticker, while the broker uses suffixes, prefixes or contract-specific names.

TradingView ticker Possible MT5 broker symbol
EURUSD EURUSD.a, EURUSDm, EURUSD.r
XAUUSD XAUUSD.a, GOLD, XAUUSDm
BTCUSDT BTCUSDTm, BTCUSD, BTCUSD.r

Always check the exact symbol in MT5 Market Watch. If needed, configure symbol mapping in the current AlgoWayWS-MT5 setup.

Hedge, Reverse and Opposite Mode Errors

Some failures are not error-code problems. They happen because the selected execution mode does not match the account behavior.

  • Hedge Mode expects the account or platform to support separate BUY and SELL positions.
  • Reverse Mode closes the current position and waits for the next entry.
  • Opposite Mode closes the current side and immediately opens the opposite side.

Full explanation: How AlgoWay handles opposite trading signals.

When to Use the Separate Error Guides

This page is the main troubleshooting hub. Use the separate pages when the error is specific:

Final Troubleshooting Order

When AlgoWay MT5 automation fails, use this order:

  1. Check whether TradingView fired the alert.
  2. Check whether AlgoWay received the webhook.
  3. Check whether the JSON is valid.
  4. Check whether AlgoWayWS-MT5 EA is connected.
  5. Check MT5 AlgoTrading and EA permissions.
  6. Check symbol mapping and broker symbol specification.
  7. Check lot size, stops, filling type and market session.
  8. Read MT5 Experts and Journal logs.
  9. Then search the specific error code.

AlgoWay automation is easiest to troubleshoot when you separate the signal layer, webhook layer, EA connection layer and broker execution layer. Do not treat every failed order as the same problem.