Trade Errors
Troubleshooting trade execution failures.
This guide helps when signals are received but trades fail to execute.
Symptoms#
- Signal appears in logs as "received"
- Trade shows error in signal details
- Position not opened in MT5
Two kinds of failure show up in two places
Not every failure is an EA/broker error. Some are caught on our side before the signal ever reaches your EA:
- Platform rejections (a bad or conflicting parameter, a fat-finger size, an out-of-range
maxspreadormarketprice) return HTTP 400 and land in the Rejected Signals tab. The EA never sees them. - EA / broker execution failures (margin, stops, market closed, symbol not found) reach the EA and come back as an error on the Signal Logs row itself.
If a signal isn't in Signal Logs at all, check Rejected Signals first, you may be debugging the EA for a problem that was stopped at ingest.
Common Trade Errors#
Symbol Not Found#
Error: Symbol not found: EURUSD
Causes:
- Broker uses different symbol name
- Symbol suffix required
- Symbol not available at broker
Solutions:
- Check the exact symbol name in MT5 Market Watch
- Send that exact name in the signal, including any broker suffix (
EURUSD.raw,EURUSDm,EURUSD.pro)
PineHook passes your signal's symbol to the broker exactly as written. It does not translate or auto-append suffixes, so the symbol in your alert must match the broker's Market Watch name character-for-character.
{"action": "buy", "symbol": "EURUSD.raw"}
Finding Your Broker's Symbol:
- In MT5: View → Market Watch
- Right-click → Show All
- Find the correct symbol name
- Use that exact name in signals
Insufficient Margin#
Error: Not enough money or No money
Causes:
- Account balance too low
- Position size too large
- Margin already used by other trades
Solutions:
- Reduce lot size in signal
- Close some existing positions
- Deposit more funds
- Check broker margin requirements
{"action": "buy", "symbol": "EURUSD", "size_lots": 0.01}
Reduce size_lots value for smaller position.
Using risk-based sizing (size_pct)?
size_pct sizes the position from your account balance and your stop distance, and it has its own pitfalls:
- It requires a stop loss. A
size_pctsignal with nosl_*is rejected. - On high-value instruments (gold, indices, crypto) a tight stop plus a high percentage produces very large lots, which then hit insufficient margin or get clamped to the broker's maximum.
- If the risk maps to less than the broker's minimum lot, the EA rejects with "size_pct sizing failed - risk maps below broker's volume_min".
Test a new setup with size_lots: 0.01 first, confirm it fills, then switch to size_pct.
Trade Disabled#
Error: Trade is disabled
Causes:
- AutoTrading not enabled
- EA doesn't have trade permission
- Broker disabled trading (weekend, etc.)
Solutions:
- Enable AutoTrading button in MT5
- Check EA properties → Common tab → "Allow Algo Trading"
- Wait for market to open
Invalid Volume#
Error: Invalid volume or size_lots ... below symbol minimum
The EA normalises volume for you before sending an order, so most size problems never reach the broker:
- Off-step sizes are floored to the broker's step. A request of
0.015on a0.01-step broker becomes0.01. An off-step value never causes a broker "invalid volume" rejection. - Oversize is clamped down to the broker's maximum. A too-large size still opens, at the reduced maximum size, with a NOTICE in the Experts tab.
- Below-minimum is the real failure. If your size (after step flooring) is under the broker's minimum lot, the EA rejects it itself, before the broker, with a message like:
size_lots (0.0050) below symbol minimum (0.0100) after step normalization
Solutions:
- Check the broker's minimum lot size for the symbol
- Set
size_lotsat or above that minimum (typically0.01)
| Broker Type | Typical Minimum |
|---|---|
| Standard | 0.01 lot |
| Micro | 0.01 lot |
| Cent | 0.01 lot |
| Some ECN | 0.1 lot |
Invalid Price#
Error: Invalid price
Causes:
- Price too far from market (pending orders)
- Price has wrong precision
- Price is 0 or negative
Solutions:
- Check current market price
- Ensure price is reasonable for pending orders
- Use correct decimal places
{"action": "buylimit", "symbol": "EURUSD", "price": 1.0800}
Invalid Stops#
Error: Invalid stops or Invalid S/L or T/P
Causes:
- Stop loss/take profit too close to entry
- Broker has minimum stop distance
- SL/TP on wrong side of entry
When a stop is inside the broker's minimum distance, the EA rejects the order itself, before the broker, with a message naming the exact minimum:
SL distance 0.00008 is below broker minimum 0.00015 (SYMBOL_TRADE_STOPS_LEVEL=15 points) for EURUSD
(The check is skipped when the broker reports a stop level of 0, common on ECN, raw, crypto, and index symbols.)
Solutions:
- Check the broker's stop level requirement for the symbol
- Increase SL/TP distance
{"sl_pips": 50, "tp_pips": 100}
If the minimum stop is 20 pips, use at least 20.
Seeing the EA's own messages
The EA's detailed rejection messages (below-minimum volume, stops too close, and so on) only print to the MT5 Experts tab when the EA's Log Verbosity input is set to Debug. At Normal verbosity the reject still happens and still reaches your dashboard, it just isn't echoed to the Experts tab. Set Log Verbosity to Debug when you need to see exactly why an order was refused.
Market Closed#
Error: Market is closed
Causes:
- Trading outside market hours
- Symbol not trading (holiday)
- Broker session gaps
Solutions:
- Check market hours for symbol
- Wait for market to open
- Use pending orders for after-hours setup
Broker Rejection#
Error: Trade request rejected by broker
Causes:
- Account restrictions
- Symbol trading restricted
- Broker-specific rules
Solutions:
- Contact your broker
- Try on demo account first
- Check account restrictions
Error Codes#
MT5 returns error codes. Here are common ones:
| Code | Meaning | Solution |
|---|---|---|
| 10004 | Requote (price changed) | Market moved, retry |
| 10006 | Request rejected | Check parameters |
| 10010 | Partially filled | Not an error, the order filled in part (any shortfall is handled separately) |
| 10013 | Invalid request | Check parameters |
| 10014 | Invalid volume | Fix lot size |
| 10015 | Invalid price | Update price (pending orders) |
| 10016 | Invalid stops | Widen SL/TP distance |
| 10017 | Trade disabled (broker) | Broker has trading disabled for this account/symbol |
| 10018 | Market closed | Wait for open |
| 10019 | Not enough money | Reduce size / deposit |
| 10027 | AutoTrading disabled (terminal) | Enable the AutoTrading button in MT5 |
Debugging Steps#
1. Check MT5 Experts Tab#
View detailed error output:
- MT5 → View → Toolbox
- Click Experts tab
- Look for error messages
2. Test Manually#
Open the same trade manually in MT5:
- Right-click chart → Trading
- Try to open same position
- See if MT5 shows an error
3. Check Signal Details#
In PineHook dashboard:
- Go to Signal Logs
- Click the failed signal
- View full error details
4. Try Demo Account#
Test on demo to isolate issues:
- Rules out account/balance issues
- Same broker, different account
- Should have identical symbols
Spread and Price Drift Issues#
Trade Rejected for Wide Spread or Price Drift#
Symptom: Signal accepted but the trade did not execute, with an amber "Trade rejected" pill on the Signal Logs row.
Cause: The EA's spread gate refused to submit the order. The pill text tells you which mode fired:
- Broker spread too wide (Mode B): "Trade rejected. Broker spread exceeded your pips limit" or "... your percent limit"
- Price drifted from the alert (Mode A, when you send
marketprice): "Trade rejected. Price moved too far from the alert reference (pips)" or "... (percent)"
The expanded pill shows the observed spread or deviation next to your limit.
Solutions:
- Loosen
maxspread_pipsormaxspread_pctif the limit is too tight for the instrument's typical spread. - If the rejection cites "Price moved too far from the alert reference", the signal arrived stale. Either drop
marketpriceto fall back to spread-only checks, or accept that fast moves between alert and execution will trigger rejections. - Schedule alerts to avoid news events and session opens where spreads naturally widen.
Requotes During Fast Markets#
Symptom: Trades occasionally fail to fill on volatile candles.
Solutions:
- Configure
maxspread_pipsandmaxspread_pctto reject trades during wide-spread conditions instead of letting MT5 attempt fills that the broker will requote. - Use pending orders instead of market orders during high-volatility windows.
- Trade during quieter sessions where broker execution is more reliable.
Symbol Issues#
PineHook sends your signal's symbol to the broker verbatim. There is no "Symbol Suffix" setting and no symbol-mapping table in the EA, so when your broker's name differs from TradingView's, you must send the broker's name in the signal.
Broker suffix#
If your broker adds a suffix (.raw, m, .pro), include it in the signal's symbol:
{"action": "buy", "symbol": "EURUSD.raw"}
Different names entirely#
When TradingView and your broker use different names, send the broker's name:
| TradingView | Broker | Send in signal |
|---|---|---|
| EURUSD | EURUSD.raw | EURUSD.raw |
| XAUUSD | GOLD | GOLD |
| US30 | DJ30 | DJ30 |
Copy the exact name from Market Watch (View → Market Watch → right-click → Show All).
Position Size Calculation#
Ensure your position size is valid:
- Minimum lot: Usually 0.01
- Maximum lot: Varies by broker
- Lot step: Usually 0.01
Calculate based on account:
- Standard lot = 100,000 units
- Mini lot = 10,000 units
- Micro lot = 1,000 units
Next Steps#
- Connection issues - If EA is disconnected
- FAQ - Common questions