Trade Errors

Fix failed PineHook trades on MT5 and cTrader, including symbol mismatches, invalid volume or stops, insufficient margin, and spread or price-drift rejections.

Last updated: 2026-10-20

When a trade fails, open its alert in Signal Logs and use the error message to find the relevant fix below. A rejected or blocked alert may have stopped before reaching the platform, while FAIL means execution failed. If you cannot find the alert at all, start with Alerts Not Received.

Find your error#

Error or symptomFix
Symbol not foundCheck broker symbol names
Not enough money / No moneyCheck free margin and sizing
Trade disabledCheck platform and broker permissions
Invalid volume / Size below minimumCheck volume limits
Invalid priceCheck pending-order price
Invalid stops / Invalid S/L or T/PCheck stop placement
Market is closedCheck the broker's trading session
Spread or price-drift rejectionCompare the observed value with your limit
Wrong size, stop, or targetCheck the effective settings
Another broker rejectionReview broker restrictions
Skipped: Hedging Disabled / Hedging Protection UnavailableCheck hedging policy and exposure
setposition unavailable, partial, or uncertainCheck target-position results

Hedging protection#

For Skipped: Hedging Disabled, look for opposite positions and entry orders on the same broker symbol. The check covers the whole account on that symbol, including other strategies, manual trades and other EAs. Keep Allow Hedging Off if skipping is intended, or use a deliberate hedging=true override only when opposite exposure is intended. The skip does not close the existing trade.

For Skipped: Hedging Protection Unavailable, read the full reason. Update and reconnect an older MT5 EA if requested. On cTrader, a recent broker request that got no answer can hold opposite protected entries for 2 minutes, counted from when PineHook records its outcome as unknown, after which PineHook checks the broker again. Check broker history before retrying an uncertain submission, and contact support if the hold persists. See hedging rules.

Target position results#

If setposition reports that it is not enabled, valid syntax cannot make it execute. Confirm availability for the destination and update/reconnect the MT5 EA if requested. If the target is below minimum or a reduction is impossible, check lot conversion and the broker's volume step and minimum.

For Partial, compare the confirmed volume in Signal Logs with current broker positions, trade history and SL/TP, because some trades may already have completed. For Uncertain, check broker history and wait for confirmation before retrying. On MT5, the same symbol and account-wide commands can remain blocked during recovery. An urgent exit during an expired subscription or exhausted alert allowance should use a close command rather than target=0. See setposition.

Symbol not found#

Your broker may call an instrument EURUSD.raw instead of EURUSD, or GOLD instead of XAUUSD, so copy its name from the broker's symbol list. On MT5, open View → Market Watch and select Show All if the instrument is missing.

Use the broker's name in your alert, or configure Broker symbol mapping to translate the TradingView name. If the alert still selects the wrong instrument, review the mapping applied to that destination license. Our guide to symbol not found in MT5 explains why broker names differ from TradingView's and how to find the exact one.

Insufficient margin#

Free margin is the amount available to open new trades after accounting for your existing positions, shown in MT5 → Toolbox → Trade or on the balance bar at the bottom of cTrader's Trade Watch panel. Compare it with the margin your broker requires for the symbol and lot size in your alert, using the broker's margin calculator if available. If the required margin exceeds what is available, reduce the requested lot size.

With size_pct, the stop distance affects the calculated lot size, so a tight stop can produce a large position even at a small risk percentage. Include a stop loss and review the resulting size against the broker's volume limits. A fixed 0.01 lot is not valid for every instrument either, so check the minimum before using it as a test size. MT5 error 10019 works through the margin calculation with examples.

Trade disabled#

On MT5, enable algorithmic trading in both the toolbar and the EA's Common settings. If both are already enabled, check whether the broker has restricted trading for the account or instrument, along with the other causes in MT5 EA not trading.

On cTrader, confirm that the assigned account remains authorized and permits trading. If the error concerns trading hours, follow Market closed to check the broker's session.

Invalid volume#

Compare the submitted size with the minimum, maximum, and volume step listed in your broker's instrument specifications. The volume step determines which increments the broker accepts.

On MT5, PineHook rounds volume down to the broker's step and caps it at the maximum, so 0.015 lots on a 0.01 lot step becomes 0.01. If the adjusted size falls below the minimum, the order is rejected with a message such as:

size_lots (0.0050) below symbol minimum (0.0100) after step normalization

For a copied alert, also review the destination's copier multiplier and lot size conversion, since both can change the submitted quantity. On cTrader, check the reported broker volume requirement, which may differ from the limits on your MT5 account. MT5 invalid volume covers contract sizes, rounding and partial closes in more depth.

Invalid price#

For a pending order, price must be positive, use the broker's price precision, and sit on the correct side of the current market. Buy limits belong below market and buy stops above it, while sell limits belong above market and sell stops below it. If you are unsure which type to choose, provide price= with buyat or sellat, and PineHook will select a limit or stop order from the current broker quote.

Also compare the price in the alert with the broker's current quote, because TradingView prices can differ and the market may have moved since the alert was sent. See Pending orders for the available entry parameters.

Invalid stops#

For a new order, check both the broker's minimum stop distance and the placement of each stop or target. A long entry starts with its stop below entry and target above it, while a short entry reverses those directions. For an existing position, compare the new levels with the current broker quote, since a stop moved to breakeven or into profit may cross the original entry price.

When MT5 reports a minimum stop distance, PineHook checks it before submitting the order and can return a message such as:

SL distance 0.00008 is below broker minimum 0.00015 (SYMBOL_TRADE_STOPS_LEVEL=15 points) for EURUSD

Correct the alert using the distance and units reported for that instrument. If you are modifying an existing position, also check the broker's freeze distance, which restricts changes near the current price. Even when the broker reports no minimum stop level, the stop must still be valid. MT5 error 10016 invalid stops explains how spread and pip units affect the distance.

Market closed#

Check the instrument's trading hours, holidays, and session breaks with your broker, then wait until orders are accepted for that symbol. This also applies to pending orders, which the broker may refuse outside trading hours. MT5 market closed shows how to read a symbol's sessions and keep alerts inside them.

Trade rejected for wide spread or price drift#

Expand the rejection details in Signal Logs and compare the observed value with your configured limit:

  • Broker spread exceeded your limit means the difference between the broker's bid and ask was too wide.
  • Price moved too far from the alert reference means the broker's execution quote differed too much from the marketprice sent in your message.

Review the command's maxspread_pips or maxspread_pct alongside the destination's stored spread settings, making sure the units and limit fit the instrument before changing them. If the error concerns price drift, check where the alert gets its marketprice value and whether delivery was delayed. Removing marketprice switches the protection to a broker-spread check, so it changes what PineHook measures.

The Order parameters section explains how these fields work together. A broker can still return a requote when prices change quickly, even if the spread check passes.

Unexpected trade size or stops#

Compare the message PineHook received with the settings applied to the destination, including syntax mode, sizing units, defaults for omitted parameters, copier multipliers, and lot conversion. On MT5, Settings Source determines whether those stored values come from the dashboard or EA Inputs.

If a value differs from what you expected, use Trading settings to trace which setting takes precedence. For a command aimed at one trade, also review its symbol, magic, and ticket against the account's hedging or netting mode.

Broker rejection#

Use the broker's response to check the account's trading permissions and instrument rules. If the reason remains unclear, ask the broker about that specific rejection and share the same error and alert details with PineHook support. Keep in mind that demo and live accounts can have different symbols or restrictions, so an order accepted on demo may still be refused on the live account.

MT5 error codes#

Common MT5 return codes
CodeMeaningNext check
10004RequoteCompare the requested price with the current broker quote.
10006 / 10013Rejected / Invalid requestRead the detailed error and review the command parameters.
10010Partially filledReview the filled volume and any remaining order to see how much was executed.
10014Invalid volumeCheck minimum, maximum, and volume step.
10015Invalid priceCheck the pending-order price and precision.
10016Invalid stopsCheck stop placement and minimum distance.
10017Trade disabled by brokerCheck account and symbol permissions.
10018Market closedCheck the broker's session.
10019Not enough moneyCheck free margin and requested size.
10027Algorithmic trading disabled in terminalEnable algorithmic trading in MT5.

An EA that reports runtime error 4756 is pointing at one of these return codes, as MT5 error 4756 explains.

Getting help#

If the error persists, ask the Support Chatbot for help or to open a ticket, including the platform, license ID, alert time, and relevant log text. On MT5, you can find further execution details in View → Toolbox → Experts. Remove authentication passwords and Secret Keys before sharing messages or screenshots.