EA Risk Governor
- 유틸리티
- 버전: 1.0
- 활성화: 5
Your EA's risk settings are a promise. This enforces them at the terminal.
Before building this tool we studied the paid and free alternatives in the risk-control category and wrote down where they commonly fail; the list below shows each of those points and how this tool handles it. Enforcement is honest by design: an external tool cannot stop an order before it reaches the broker — this watches every second, acts (close / trim / attach stop) and writes the full audit line, and states exactly that on the panel.
What it does
- Governs every position and pending order — all magics or one magic filter, cycle <=1 s; manual trades included unless filtered.
- Per-trade lot ceiling — absolute and/or % of equity as margin; pending orders over the cap are cancelled, fills are trimmed to the cap (or closed when the cap is under one minimum lot).
- Per-trade risk ceiling from the real stop distance — |entry-SL| at tick value; above your % of equity it trims to the implied size or closes.
- Missing stop-loss policy — log only / attach a fallback stop at your points / close the position.
- Daily loss limit — % and/or money, realized or realized+floating; on breach everything closes and locks (re-arm by time, next day, or a two-step panel button), and the state survives restarts.
- Max concurrent positions + per-symbol exposure ceiling — closes the newest first until the aggregate fits.
- Ordering guarantee — every action writes INTENT first, then performs the action, then writes the RESULT; the ordering is asserted in memory and in the CSV.
- Full CSV audit — 16 fields (open/action/reason/before-after/server time) + panel with status, counters, day P&L against the limit, and the last events.
- Shadow mode ships as the default — it writes INTENT/SHADOW rows and never sends an order until you opt in.
What it is not
It is not a pre-trade veto — a trade can still fill and be corrected right after at spread cost; that is stated permanently on the panel. It does not manage entries or strategy logic, and it makes no profit promise.
Honest notes
- Actions are scoped to the magics/symbols you list; the scope is shown on the panel so filter mistakes cannot hide.
- Trims use a deviation you control; in fast markets the realized result may differ from the intended cap.
Tested
- Compiles with 0 errors / 0 warnings (MetaEditor build 6367).
- Validated by a built-in self-test suite of 148 automated checks in the Strategy Tester (lot and risk math including margin models, stop-attach logic, pending cancels, day boundary and lock/unlock, trim ordering, INTENT-ACTION-RESULT ordering in memory and CSV, restart persistence, shadow no-order guarantee).
- Not yet verified: every broker's filling-mode quirks, live execution during news spikes, e-mail/push delivery.
Inputs
Mode (shadow/enforce) · magic filter · lot ceiling (absolute and/or % equity) · risk cap % · SL policy + fallback points · daily loss (%/$ and basis) · lock rules · max positions · exposure cap · audit path · alerts · panel.
Requirements
MetaTrader 5, any broker. Algo Trading enabled for enforcement actions (not needed in shadow).
Maintained product — the full version history is on this page; reports in Comments are answered, and confirmed defects are fixed in a free update.
What you get
RiskGovernor.ex5 · quick-start notes · free updates. Support answered in Comments.
