Discussing the article: "Building a Prop-Firm Rule Guard in MQL5 (Part 2): Eight Rules, One Directive, and the Action Layer"

Check out the new article: Building a Prop-Firm Rule Guard in MQL5 (Part 2): Eight Rules, One Directive, and the Action Layer.

An MQL5 prop-firm guard must evaluate account rules before it acts and verify that protective actions have completed. This article examines eight rules, two-phase directive resolution, position closing, Algo Trading state checks and restart recovery. A demo and synthetic tests show how to use the guard and verify its rule logic.

The observation half of a prop-firm rule guard freezes the account into one immutable record per pass. It separates a finding from an action and defines the contract that every rule implements. Part 1 built this observation layer. A session clock, a profit ledger, an excursion tracker, and a calendar feed fill that record.

Part 2 covers the deciding half and the acting half. The eight rules come first, then the table that holds them, then the pass that turns eight independent opinions into at most one directive. After that come the actuators, the state file, the facade, the demo, and the verification script.

Part 1 also numbered nine failure modes of the hand-written guard, from C1 to C9. They are referenced below by number, because almost every decision here exists to make one of them unreachable. One note on scope carries over: this is a guard and not a strategy, and it never decides when to enter.

Author: Bruno Nunes Myrrha Ribeiro