Adaptive Trade Management in MQL5: Building a Broker-Aware, Deterministic, and Explainable Exit Engine
by
, 10-17-2026 at 07:41 AM (290 Views)
more...This article presents an architecture where exit modules never modify a position directly. Each module produces a proposal. A policy engine ranks all well-formed proposals in a strict, documented order. A validator checks the candidates in that order against risk invariants and broker constraints, and the first candidate that passes is handed to an execution adapter, the only component that interacts with the trade server. A reconciliation step then compares the broker-side position with the request before the internal state is updated. The engine does not decide when to enter. It only manages positions after they are open, using an R-multiple framework so that every threshold is expressed relative to the initial risk of the position.












Email Blog Entry