RiskCockpit is a real-time, rule-monitoring dashboard for prop-firm traders. It watches your risk against the funding program's rules while you trade — so you don't blow a challenge on a careless click.
It is an advisor, not an autotrader. RiskCockpit never opens, closes, or modifies a trade. Every decision stays in your hands — it only measures, warns, and displays.
- Live risk read-out — current exposure, open risk, and distance to your daily and overall loss limits, updated tick-by-tick — including the locked risk, the figure FundedNext actually scores (it locks to the stop posed at opening, so trailing a stop does not lower it).
- The top bar answers the only question that matters before a click — room to the nearest limit, advised lot, next news — each coloured by its own rule's warning threshold, not a single flat one.
- Prop-firm rule profiles — built-in challenge catalog (FundedNext Stellar 1-Step / 2-Step / Lite / Instant), and compatible with FTMO, E8, The5ers, MyFundedFX-style rules.
- Lot sizer — computes position size from your risk-per-trade and stop distance, capped to keep a survival margin.
- Drawdown guards — daily loss and max drawdown tracking, including the trailing floor of instant-funding accounts, with clear on-chart warnings.
- News windows — ForexFactory-aligned classification of restricted events, with the countdown to the next binding one.
- Discipline tools — a three-step lock ladder: your own self-lock (armed in two clicks, releasable in two more — a pact you cannot leave is a trap, not discipline), a hard lock when the daily drawdown reaches 80% of its cap, and a cooldown after N consecutive losses. Plus tilt detection (rapid entries or revenge sizing). While a lock holds, the controls that would end it or loosen a limit are disabled — including the button that removes the tool from the chart.
- Sound alerts on every status change, with the file names you choose.
(Telegram alerts exist in the code but an indicator cannot send them — MQL5
blocks
WebRequestoutside EAs and services, so the toggle is shown locked.) - Built-in manual — the HELP section is the documentation: a step-by-step user guide, then one fold-out per surface and per section listing every element with what it means. 78 entries, in the three languages. Nothing to read elsewhere before using the tool.
- Multi-language UI — EN / FR / ES.
The old fixed panel is gone. What stays on the chart is a 36 px rail glued to the right edge — one cell per domain (limits, positions, lot, news, discipline, account, settings, help), each showing a live micro-state. Click a cell and a 340 px panel opens in front of it; click it again and it closes. A chevron stacks every section into a full sidebar, where each section is a fold-out: click a header to open or close it. What you leave open is remembered per account, and survives a timeframe change. If a section still does not fit, the panel says so instead of quietly cutting it off.
A small floating table shows your open positions with their P&L, age and missing-stop flag, plus a quick-access strip (room to the nearest limit, advised lot, next news). It is draggable and can be hidden with its cross — the POS rail cell brings it back.
Everything is painted on canvas and hit-tested by coordinates: there is not a single native button on the chart.
- Copy
Indicators/RiskCockpit.mq5,RiskCockpit.icoandRiskCockpit_logo.bmp→<MT5>/MQL5/Indicators/— the source embeds both resources, so compiling without them fails. - Copy
Libraries/*.mqh→<MT5>/MQL5/Libraries/ - Copy
Services/RCNewsFeeder.mq5→<MT5>/MQL5/Services/ - In MetaEditor, compile both (F7, 0 errors).
- Attach the indicator to a chart. In Navigator → Services, right-click
RCNewsFeeder → Add service, then allow
https://nfs.faireconomy.mediain Tools → Options → Expert Advisors → Allow WebRequest for listed URL.
Why a separate service? MetaTrader forbids WebRequest inside an
indicator — it always fails, whitelisted or not. The service fetches the
ForexFactory calendar hourly and writes it to MQL5/Files/, and the indicator
reads that file. Skip step 3 and the news rules silently fall back to the MT5
built-in calendar, which classifies events differently from FundedNext.
The compiled RiskCockpit.ex5 in Indicators/ matches the version in
HISTORY.md and is refreshed with every release.
Published free on the MQL5 Market. More at javadrazavi.fr.
Indicators/ the source, the compiled .ex5, and the two embedded resources
(.ico and the logo .bmp) — MetaEditor needs them side by side
Libraries/ the shell, the pure math, the challenge catalogue, the canvas kit
Scripts/ RC_SelfTest — the math self-test, run inside MetaTrader
Services/ RCNewsFeeder — the calendar fetcher (an indicator cannot do it)
tools/ the static gate, its self-test, and the Market asset builders
brand/ the logo, at every size the Market asks for
market/ the store listing: description, release checklist, screens, video
The build tree inside MetaTrader holds only the five files the compiler needs. Everything else — documentation, brand assets, listing text — lives here. It used to be the other way round, and the two copies drifted.
22 static checks answer what the MQL5 compiler cannot: a click zone nobody handles, a tooltip the host can never translate, a guard that guards nothing, a global written and read by no one, a setting that no longer does anything, a personal account number left in a public file. None of those break a build.
That number is not maintained by hand: the last check compares it to the number of checks actually run, and fails when the two drift apart.
python tools/audit.py # one command, one verdict (exit 0 / 1)
python tools/gate_selftest.py # proves the gate can still say NO
Those are static. The math is exercised inside MetaTrader itself: attach
Scripts/RC_SelfTest.mq5 to any chart — it needs no account, touches nothing,
and writes one line per case to the Experts journal. It includes the very
RC_Math.mqh the indicator includes, so it tests the code that ships rather
than a copy of it: the trailing floor at which a funded account is lost, the
80 % / 100 % status thresholds, the cycle dates and the news timestamps.
The self-test injects one defect at a time into a throw-away copy and requires the matching line to turn FAIL — an audit nobody ever saw fail is a decoration. Checks that read a binary run a positive control first: if the instrument cannot see a value the file is known to contain, the check reports UNKNOWN rather than "clean".
Javad Razavi — The Solution Maker · javadrazavi.fr
Source-available for reference and evaluation only — see LICENSE. Not for reuse, redistribution, or resale without written permission.
