R Multiple Tracker
Profit in account currency tells a trader almost nothing about whether their edge is real, because it mixes different position sizes and different amounts of risk into one number. R multiples fix that by expressing every trade's result as a multiple of what was actually risked, so a system's real expectancy becomes visible - and this indicator builds that curve directly from closed-order history instead of asking the trader to log it by hand. Each closed trade's R is profit or loss divided by the distance from entry to the stop-loss on record for that order. The cumulative sum of every qualifying trade's R is plotted as a line in a separate window, mapped onto the chart's own bars by each trade's close time, so the curve reads left to right exactly like an equity curve - except in units of R rather than currency. A summary panel adds trade count, win rate, average R and expectancy so the headline numbers do not have to be read off the chart by eye. History is only rebuilt when the closed-order count actually changes, not on every tick, because that count changes only when a trade closes - recomputing on every price tick would be wasted work for a curve that cannot move between trade closes anyway. Notes and limitations - MQL4 order history exposes only the LAST stop-loss value recorded on a closed order, never the one that was in place at entry. A trade that was moved to breakeven or trailed will compute R from that final stop, not the risk actually taken when the trade was opened - no history API in MQL4 exposes the original value, so this is a genuine platform limitation, not a bug. Systems that never move their stop are read correctly; systems that trail heavily will see R values compressed toward the trailed distance. See MQL4 VERSUS MQL5 DIFFERENCES above for how the MQL5 version avoids this. - A closed trade with no stop-loss on record, or whose originating order has aged out of local history, cannot produce an R multiple and is excluded from the curve and statistics; the excluded count is shown in the panel so it is never silently missing. - The MQL5 version assumes a position was not scaled into and out of in a way that should be treated as several independent trades - it combines every fill and every exit of one position into a single R using the earliest entry as the reference stop and price. - The curve only advances when a trade closes; it is flat between closes, which is correct behaviour, not a stall. - No alerting in this version; it summarises settled history, and every value shown is already-closed, final data, so nothing here can repaint.
Indicator · MT4 · v1.0 · Free
About R Multiple Tracker
R Multiple Tracker is an indicator for MetaTrader 4. It has 7 settings, such as Current symbol only, Magic filter and Max trades considered. MQL source code included.
Files in the download: RMultipleTrackerIndicator.ex4, RMultipleTrackerIndicator.mq4, RMultipleTrackerIndicator.txt.
Settings
| Setting | Default | What it does |
|---|---|---|
| Current symbol only | true | true: only trades on this chart's symbol, false: whole account |
| Magic filter | 0 | 0 = any magic number, otherwise only this one is counted |
| Max trades considered | 500 | Most recent qualifying closed trades kept, oldest beyond this are dropped |
| Corner | CORNER_LEFT_UPPER | Summary panel corner |
| X distance | 10 | Panel horizontal offset, pixels |
| Y distance | 15 | Panel vertical offset, pixels |
| Font size | 9 | Panel font size |
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 → Indicators.
- 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 indicator from the Navigator onto a chart and adjust the settings.
Tags: Risk & Lot Size · MT4 Indicator · MQL4 Source Code