Famous Risk Rules Overlay
Trading forums use "risk management" as if it were one settled idea. It is not - "the 2% rule", "Kelly sizing" and "fixed ratio" are three different published formulas with different assumptions, and they routinely disagree with each other by a wide margin on the same account. This overlay computes all three against the same hypothetical stop distance and displays them together, so the disagreement is visible instead of hidden behind whichever single number a trader happened to learn first. The 2% rule risks a fixed percent of balance per trade, sized from the stop distance using tick value and tick size (not a Point-based approximation, which silently breaks on JPY crosses, metals and indices). The Kelly rule computes the full-Kelly fraction f* = W - (1-W)/R from either manual win-rate/payoff inputs or this account's own recent closed-trade history, then applies a configurable fraction of it (half-Kelly by default, the commonly recommended compromise) - the raw full-Kelly figure is shown too, not hidden, because softening it silently would misrepresent what the formula actually says. The fixed-ratio rule grows position size only after cumulative session profit clears a delta threshold, the property its proponents argue lets a small account scale up faster than percent-of-balance sizing allows. None of the three is presented as "the answer" - the overlay's purpose is comparison, not a recommendation. Notes and limitations This tool never opens or closes a trade - every figure shown is a suggestion computed from inputs and, optionally, historical statistics. The Kelly figure is only as good as the win-rate/payoff sample behind it; a small or unrepresentative sample produces a misleadingly precise number, which is why a minimum trade count gate exists. The fixed-ratio rule's "cumulative profit" is tracked only from the moment this EA is attached, not full account lifetime history, since no persisted trade log is part of this tool. None of the three rules accounts for correlated open positions, non-stationary edge, or broker execution quality - they are textbook formulas, not account-specific advice.
Expert advisor · MT5 · v1.0 · Free
About Famous Risk Rules Overlay
Famous Risk Rules Overlay is a script for MetaTrader 5. It has 16 settings, such as Stop loss pips, Show two percent rule and Show kelly rule. MQL source code included.
Files in the download: FamousRiskRulesOverlay.ex5, FamousRiskRulesOverlay.mq5, FamousRiskRulesOverlay.txt.
Settings
| Setting | Default | What it does |
|---|---|---|
| Stop loss pips | 20.0 | Hypothetical stop distance (pips) used by every rule |
| Show two percent rule | true | Show the classic 2% (or InpRiskPercent) rule |
| Show kelly rule | true | Show the Kelly-fraction rule |
| Show fixed ratio rule | true | Show the Ryan Jones fixed-ratio rule |
| Risk percent | 2.0 | Risk % of balance per trade for the "2% rule" |
| Use account history for kelly | true | Derive win rate/payoff ratio from closed history instead of manual inputs below |
| Kelly win rate percent | 50.0 | Manual win rate % (used when history is off or insufficient) |
| Kelly payoff ratio | 1.5 | Manual average-win / average-loss ratio (used when history is off or insufficient) |
| Kelly fraction multiplier | 0.5 | Fraction of full Kelly actually applied (0.5 = half-Kelly, the common safety practice) |
| Lookback trades | 30 | Closed trades sampled for history-derived Kelly inputs |
| Min trades required | 20 | Minimum sample before history-derived Kelly is trusted |
| Magic filter | -1 | Magic number filter for the history sample (-1 = every magic number) |
| Current symbol only | false | Restrict the history sample to this chart's symbol |
| Fixed ratio delta | 500.0 | Profit (account currency) required per contract-unit increase |
| Fixed ratio base lots | 0.01 | Lot size of one contract-unit |
| Recalc seconds | 5 | Minimum seconds between recalculations |
How to install
- Download the ZIP from your PolyMaria library and unzip it.
- In MetaTrader 5 open File → Open Data Folder, then go to MQL5 → Scripts.
- Copy the .mq5 file(s) there. Put any .mqh files in MQL5 → Include.
- Open the .mq5 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
- Drag the script onto a chart to run it once.
Tags: Risk & Lot Size · MT5 Expert Advisor · MQL5 Source Code