Urgent.News

What's breaking now, across thousands of outlets.

Tech

Log the requested filling policy before retrying an MT5 order

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…

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.

Before 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.

Three key questions must be addressed:

1. Was the strategy ready to enter the market?

2. Was the request policy allowed for the specific symbol and execution mode?

3. What happened after the request was sent?

A 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.

The 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.

Before retrying, verify three conditions:

1. The requested policy is allowed for the actual symbol and execution mode. If so, preserve the intended policy.

2. The requested policy is not allowed. In this case, stop with a clear diagnostic instead of attempting a different policy without agreement.

3. The symbol uses Market Execution, and the request asks for RETURN. This combination is not allowed for a market deal.

Pending orders require a separate handling approach and should not be treated as market deals simply because the same request structure is available.

Implement and review the following acceptance cases:

1. The requested policy is allowed for the symbol and execution mode.

2. The requested policy is not allowed for the symbol and execution mode.

3. The symbol uses Market Execution with a RETURN request.

These 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.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Cloud Metrics API for Startup SaaS: Reconciling Agent Spend Before Embeds

The operational constraint for a startup SaaS team choosing Grafana Cloud or a simple custom metrics API is attribution: if a Node.js AI agent loop can retry, call several models, and invoke tools for…

  • Define an append-only cost ledger at agent boundary
  • Keep display labels separate from metric identity
  • Implement bounded incident exercise for metrics explainability

GRC Engineer Transition: Navigating Career Path and Automation Opportunities in Analyst-Heavy Organizations

Introduction: The Developer-to-GRC Engineer Transition Transitioning from a Developer to a Governance, Risk, and Compliance (GRC) Engineer in an analyst-dominated organization represents a high-stakes…

  • Transitioning GRC Engineer from developer role offers higher pay and responsibility
  • Only technical expert in non-technical environment creates bottleneck and catalyst role
  • Automation projects should focus on boosting analysts' abilities, not just manual work replacement

More from Sunday 4 October →