Fixed Ratio Money Management
A flat "risk N% of equity" sizing scheme rescales every trade to current equity, which sounds conservative but has a quiet flaw: size shrinks and grows with every fluctuation, including ones driven purely by an open floating loss. Fixed ratio sizing fixes contract count to accumulated REALISED profit instead, and requires an ever-larger amount of new profit for every additional contract - the first extra contract needs one "delta" of profit, the second needs two more deltas, the third three more, and so on. The result is a scale-up that only ever responds to the strategy actually working, and that decelerates automatically as size grows, rather than compounding risk indefinitely the way a flat percentage scheme does. The maths is a closed-form inverse of the triangular number series - level k requires cumulative profit of delta*k*(k+1)/2 - so contract count for any accumulated profit is computed directly rather than by looping through levels one at a time. Delta is the whole control surface. A small delta scales up quickly and aggressively; Ryan Jones's own guidance is to set delta to one to three times the biggest historical loss per contract for a cautious ramp. FixR_SuggestDelta turns that guidance into a number, but the choice of multiple is left to the trader - there is no universally correct delta, only a trade-off between growth speed and how much drawdown that speed can produce. Money at risk at any given contract count is read from the broker's own live tick value and tick size for the symbol, never a hardcoded per-pip figure or a fixed contract size, and it is always scaled by the actual lot size the sizing maths produced - so the numbers are correct on JPY crosses, metals and indices as well as plain FX pairs, on both platforms. The header is self-contained. No dependencies, no DLLs, no classes - plain functions you call from a script, an indicator or an EA. Notes and limitations - Fixed ratio only ever adds contracts for NEW realised profit above what has already been paid for. It does not remove contracts on a loss below the starting level - pair it with a separate drawdown guard if you want size to step back down as well as up. - Accumulated profit must be tracked by the caller (e.g. account balance minus a recorded starting balance, or a running sum of closed trade profit). This header does not persist it, because how "accumulated" is defined - since account open, since a reset, per strategy - is a decision only the caller can make correctly. - Delta has no universally correct value. Too small and size compounds faster than a losing streak can be absorbed; too large and the scheme barely scales at all within a realistic account life. Backtest the multiple, not just the method. - No money is at risk in the demo. It prints numbers only and never places a trade on either platform. - No thread or state concerns: every function is pure and takes accumulated profit as a parameter rather than tracking it internally.
Script · MT4 · v1.0 · Free
About Fixed Ratio Money Management
Fixed Ratio Money Management is a script for MetaTrader 4. It has 4 settings, such as Delta, Base lot unit and Start contracts. MQL source code included.
Files in the download: FixedRatioSizing.mqh, FixedRatioSizing.txt, FixedRatioSizingDemo.mq4.
Settings
| Setting | Default | What it does |
|---|---|---|
| Delta | 500.0 | Profit required per scale-up level |
| Base lot unit | 0.01 | Lots represented by one contract |
| Start contracts | 1 | Contract count at zero accumulated profit |
| Stop pips | 25.0 | Stop distance for the money-at-risk column |
How to install
- Download the ZIP from your PolyMaria library and unzip it.
- In MetaTrader 4 open File → Open Data Folder, then go to MQL4 → Scripts.
- Copy the .mq4 file(s) there. Put any .mqh files in MQL4 → Include.
- Open the .mq4 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 · MT4 Script · MQL4 Source Code