{
  "id": 11938005,
  "title": "Log the requested filling policy before retrying an MT5 order",
  "url": "https://urgent.news/2026/10/04/log-the-requested-filling-policy-before-retrying-an-mt5-order",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-10-04T14:14:14.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/stratcorealpha/log-the-requested-filling-policy-before-retrying-an-mt5-order-pdl"
  },
  "original_language": "en",
  "account": "When an Expert Advisor (EA) can enter its entry condition but fails to open a position, error 10030 occurs due to an unsupported filling mode in the order request. This issue is independent of the entry signal and requires careful analysis of the EA's request.\n\nBefore attempting to retry the order, it is crucial to save a request receipt containing the symbol, execution mode, supported filling flags, requested filling policy, requested volume, result code, and any returned order or deal reference. If a Python wrapper returns None, handle that case separately before examining the result code.\n\nThree key questions must be addressed:\n1. Was the strategy ready to enter the market?\n2. Was the request policy allowed for the specific symbol and execution mode?\n3. What happened after the request was sent?\n\nA generic log message stating \"entry failed\" is insufficient to answer all three questions. A successful retry may alter the rule regarding FOK (Fill or Kill) and IOC (Immediate or Cancel) orders, which can impact the position size received by the strategy. Before changing the filling policy, agree whether a partial position is allowed.\n\nThe symbol property SYMBOL_FILLING_MODE is a flag mask, while the order field type_filling uses a different enumeration. Avoid copying the raw mask directly into the order field.\n\nBefore retrying, verify three conditions:\n1. The requested policy is allowed for the actual symbol and execution mode. If so, preserve the intended policy.\n2. The requested policy is not allowed. In this case, stop with a clear diagnostic instead of attempting a different policy without agreement.\n3. The symbol uses Market Execution, and the request asks for RETURN. This combination is not allowed for a market deal.\n\nPending orders require a separate handling approach and should not be treated as market deals simply because the same request structure is available.\n\nImplement and review the following acceptance cases:\n1. The requested policy is allowed for the symbol and execution mode.\n2. The requested policy is not allowed for the symbol and execution mode.\n3. The symbol uses Market Execution with a RETURN request.\n\nThese acceptance cases should be distinct from reports of actual broker fills or live-account experiments. Keep the diagnostic information alongside the source code. The canonical error-10030 case involves the MQL5 helper and its scope. Reference the official symbol-property documentation for execution-mode and filling-policy rules. Before calling a retry, ensure the diagnostic is kept along with the source data, which should include the intended request, allowed policies, and observed results.",
  "summary": "An EA can reach its entry condition and still open no position. Error 10030, unsupported filling mode, belongs to the order request. Changing the entry signal will not fix that boundary. The useful first question is: what exactly did the EA ask the trade server to do? Save a request receipt Before a retry, keep the symbol, execution mode, supported filling flags, requested filling policy and…",
  "key_points": [
    "Requested filling policy saved before retrying order",
    "Three key questions addressed: entry readiness, policy allowance, post-request outcome",
    "Diagnostic information kept with source data for analysis"
  ],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}