YI GOLD

MT4 / MT5 Error Codes & Trading Tools

Search official trade, runtime and compilation codes and warnings. Calculate risk using actual contract specifications.

Position & Risk

Size exposure using equity, stop distance and actual specifications.

Open calculator
Advanced contract parameters

Margin & Value

Estimate margin, tick value and price-move value.

Open calculator
Advanced contract parameters

Compound & Drawdown

A mathematical scenario, not a forecast of strategy returns.

Open calculator

Calculations run locally in your browser. Inputs are not uploaded or saved. Terminal and broker margin rules apply; estimates exclude slippage, commission and swap.

Official error code lookup

1171 matching records

Platform / categoryCode / constantOfficial meaningTroubleshooting
MT4 · Trade return codes65 ERR_INVALID_ACCOUNTInvalid account
YI GOLD suggestions

Check permissions, sessions, symbol specifications, quotes and request parameters. Reproduce in a demo account. Do not retry rejected requests indefinitely.

MetaQuotes
MT4 · Trade return codes128 ERR_TRADE_TIMEOUTTrade timeout
YI GOLD suggestions

Inspect connectivity, logs and request time. Verify actual order status before bounded retries with backoff to avoid duplicate exposure after a timeout.

MetaQuotes
MT4 · Trade return codes129 ERR_INVALID_PRICEInvalid price
YI GOLD suggestions

Read the latest bid/ask and quote time. Check precision and allowed deviation; stop increasing exposure with stale quotes.

MetaQuotes
MT4 · Trade return codes130 ERR_INVALID_STOPSInvalid stops
YI GOLD suggestions

Check bid/ask, point, digits, stops_level and freeze_level. Recalculate distances; do not remove protection merely to force a fill.

MetaQuotes
MT4 · Trade return codes131 ERR_INVALID_TRADE_VOLUMEInvalid trade volume
YI GOLD suggestions

Read volume_min, volume_max, volume_step and volume_limit for the actual symbol. Round down to the step; do not send an order below minimum volume.

MetaQuotes
MT4 · Trade return codes132 ERR_MARKET_CLOSEDMarket is closed
YI GOLD suggestions

Check server time, gold trading sessions, holidays and terminal/EA permissions. Wait for availability instead of repeatedly retrying closed-market requests.

MetaQuotes
MT4 · Trade return codes133 ERR_TRADE_DISABLEDTrade is disabled
YI GOLD suggestions

Check server time, gold trading sessions, holidays and terminal/EA permissions. Wait for availability instead of repeatedly retrying closed-market requests.

MetaQuotes
MT4 · Trade return codes134 ERR_NOT_ENOUGH_MONEYNot enough money
YI GOLD suggestions

Check actual account denomination, free margin, volume and leverage. Calculate margin in the terminal and assess reduced exposure or genuine funding. Do not repeatedly submit the same request.

MetaQuotes
MT4 · Trade return codes135 ERR_PRICE_CHANGEDPrice changed
YI GOLD suggestions

Read the latest bid/ask and quote time. Check precision and allowed deviation; stop increasing exposure with stale quotes.

MetaQuotes
MT4 · Trade return codes136 ERR_OFF_QUOTESOff quotes
YI GOLD suggestions

Read the latest bid/ask and quote time. Check precision and allowed deviation; stop increasing exposure with stale quotes.

MetaQuotes
MT4 · Trade return codes137 ERR_BROKER_BUSYBroker is busy
YI GOLD suggestions

Serialize account requests, verify previous outcomes, reduce frequency and use bounded backoff.

MetaQuotes
MT4 · Trade return codes138 ERR_REQUOTERequote
YI GOLD suggestions

Read the latest bid/ask and quote time. Check precision and allowed deviation; stop increasing exposure with stale quotes.

MetaQuotes
MT4 · Trade return codes139 ERR_ORDER_LOCKEDOrder is locked
YI GOLD suggestions

Serialize account requests, verify previous outcomes, reduce frequency and use bounded backoff.

MetaQuotes
MT4 · Trade return codes140 ERR_LONG_POSITIONS_ONLY_ALLOWEDBuy orders only allowed
YI GOLD suggestions

Check permissions, sessions, symbol specifications, quotes and request parameters. Reproduce in a demo account. Do not retry rejected requests indefinitely.

MetaQuotes
MT4 · Trade return codes141 ERR_TOO_MANY_REQUESTSToo many requests
YI GOLD suggestions

Serialize account requests, verify previous outcomes, reduce frequency and use bounded backoff.

MetaQuotes
MT4 · Trade return codes145 ERR_TRADE_MODIFY_DENIEDModification denied because order is too close to market
YI GOLD suggestions

Check permissions, sessions, symbol specifications, quotes and request parameters. Reproduce in a demo account. Do not retry rejected requests indefinitely.

MetaQuotes
MT4 · Trade return codes146 ERR_TRADE_CONTEXT_BUSYTrade context is busy
YI GOLD suggestions

Serialize account requests, verify previous outcomes, reduce frequency and use bounded backoff.

MetaQuotes
MT4 · Trade return codes147 ERR_TRADE_EXPIRATION_DENIEDExpirations are denied by broker
YI GOLD suggestions

Check permissions, sessions, symbol specifications, quotes and request parameters. Reproduce in a demo account. Do not retry rejected requests indefinitely.

MetaQuotes
MT4 · Trade return codes148 ERR_TRADE_TOO_MANY_ORDERSThe amount of open and pending orders has reached the limit set by the broker
YI GOLD suggestions

Check permissions, sessions, symbol specifications, quotes and request parameters. Reproduce in a demo account. Do not retry rejected requests indefinitely.

MetaQuotes
MT4 · Trade return codes149 ERR_TRADE_HEDGE_PROHIBITEDAn attempt to open an order opposite to the existing one when hedging is disabled
YI GOLD suggestions

Check permissions, sessions, symbol specifications, quotes and request parameters. Reproduce in a demo account. Do not retry rejected requests indefinitely.

MetaQuotes
MT4 · Trade return codes150 ERR_TRADE_PROHIBITED_BY_FIFOAn attempt to close an order contravening the FIFO rule
YI GOLD suggestions

Check permissions, sessions, symbol specifications, quotes and request parameters. Reproduce in a demo account. Do not retry rejected requests indefinitely.

MetaQuotes
MT4 · Compiler warnings21 Incomplete record of a date in the datetime string
YI GOLD suggestions

Review the warning line, types, initialization and return values in MetaEditor. Evaluate runtime consequences and correct the warning even when compilation succeeds.

MetaQuotes
MT4 · Compiler warnings22 Wrong number in the datetime string for the date. Requirements: Year 1970 <= X <= 3000 Month 0 <X <= 12 Day 0 <X <= 31/30/28 (29 )....
YI GOLD suggestions

Review the warning line, types, initialization and return values in MetaEditor. Evaluate runtime consequences and correct the warning even when compilation succeeds.

MetaQuotes
MT4 · Compiler warnings23 Wrong number of datetime string for time. Requirements: Hour 0 <= X <24 Minute 0 <= X <60
YI GOLD suggestions

Review the warning line, types, initialization and return values in MetaEditor. Evaluate runtime consequences and correct the warning even when compilation succeeds.

MetaQuotes
MT4 · Compiler warnings24 Invalid color in RGB format: one of RGB components is less than 0 or greater than 255
YI GOLD suggestions

Review the warning line, types, initialization and return values in MetaEditor. Evaluate runtime consequences and correct the warning even when compilation succeeds.

MetaQuotes
MT4 · Compiler warnings25 Unknown character of the escape sequences. Known: \n \r \t \\ \" \' \X \x
YI GOLD suggestions

Review the warning line, types, initialization and return values in MetaEditor. Evaluate runtime consequences and correct the warning even when compilation succeeds.

MetaQuotes
MT4 · Compiler warnings26 Too large volume of local variables (> 512Kb) of the function, reduce the number
YI GOLD suggestions

Read volume_min, volume_max, volume_step and volume_limit for the actual symbol. Round down to the step; do not send an order below minimum volume.

MetaQuotes
MT4 · Compiler warnings29 Enumeration already defined (duplication) - members will be added to the first definition
YI GOLD suggestions

Review the warning line, types, initialization and return values in MetaEditor. Evaluate runtime consequences and correct the warning even when compilation succeeds.

MetaQuotes
MT4 · Compiler warnings30 Overriding macro
YI GOLD suggestions

Review the warning line, types, initialization and return values in MetaEditor. Evaluate runtime consequences and correct the warning even when compilation succeeds.

MetaQuotes
MT4 · Compiler warnings31 The variable is declared but is not used anywhere
YI GOLD suggestions

Review the warning line, types, initialization and return values in MetaEditor. Evaluate runtime consequences and correct the warning even when compilation succeeds.

MetaQuotes
MT4 · Compiler warnings32 Constructor must be of void type
YI GOLD suggestions

Review the warning line, types, initialization and return values in MetaEditor. Evaluate runtime consequences and correct the warning even when compilation succeeds.

MetaQuotes
MT4 · Compiler warnings33 Destructor must be of void type
YI GOLD suggestions

Review the warning line, types, initialization and return values in MetaEditor. Evaluate runtime consequences and correct the warning even when compilation succeeds.

MetaQuotes
MT4 · Compiler warnings34 Constant does not fit in the range of integers (X> _UI64_MAX | | X <_I64_MIN) and will be converted to the double type
YI GOLD suggestions

Review the warning line, types, initialization and return values in MetaEditor. Evaluate runtime consequences and correct the warning even when compilation succeeds.

MetaQuotes
MT4 · Compiler warnings35 Too long HEX - more than 16 significant characters (senior nibbles are cut)
YI GOLD suggestions

Review the warning line, types, initialization and return values in MetaEditor. Evaluate runtime consequences and correct the warning even when compilation succeeds.

MetaQuotes
MT4 · Compiler warnings36 No nibbles in HEX string "0x"
YI GOLD suggestions

Review the warning line, types, initialization and return values in MetaEditor. Evaluate runtime consequences and correct the warning even when compilation succeeds.

MetaQuotes
MT4 · Compiler warnings37 No function - nothing to be performed
YI GOLD suggestions

Review the warning line, types, initialization and return values in MetaEditor. Evaluate runtime consequences and correct the warning even when compilation succeeds.

MetaQuotes
MT4 · Compiler warnings38 A non-initialized variable is used
YI GOLD suggestions

Review the warning line, types, initialization and return values in MetaEditor. Evaluate runtime consequences and correct the warning even when compilation succeeds.

MetaQuotes
MT4 · Compiler warnings41 Function has no body, and is not called
YI GOLD suggestions

Review the warning line, types, initialization and return values in MetaEditor. Evaluate runtime consequences and correct the warning even when compilation succeeds.

MetaQuotes
MT4 · Compiler warnings43 Possible loss of data at typecasting. Example: int x = (double) z;
YI GOLD suggestions

Review the warning line, types, initialization and return values in MetaEditor. Evaluate runtime consequences and correct the warning even when compilation succeeds.

MetaQuotes
MT4 · Compiler warnings44 Loss of accuracy (of data) when converting a constant. Example: int x = M_PI
YI GOLD suggestions

Review the warning line, types, initialization and return values in MetaEditor. Evaluate runtime consequences and correct the warning even when compilation succeeds.

MetaQuotes

Official meanings and YI GOLD suggestions are presented separately. References are verified during version builds; page visits do not fetch external sites.