Sizing Model Comparator
Two EAs with identical entry and exit logic can produce completely different equity curves purely because of how they size positions. Traders usually only discover this the hard way, comparing strategies that were never actually isolated from their money management. This tool isolates the variable directly: every model receives the exact same entries and exits from one placeholder signal, held for the same number of bars, and the only thing that differs between them is the lot size each model's own rule computes. Four models run in parallel. Model A is fixed lots - equity has no influence on size at all, the baseline the others are judged against. Model B risks a fixed percent of CURRENT equity against a fixed pip stop and compounds, so the position grows after wins and shrinks after losses. Model C risks the same fixed percent but of the STARTING balance only, never compounding - a common, more conservative alternative that looks similar to model B on paper but behaves very differently over a long run. Model D risks a fixed percent of current equity like model B, but the stop distance is derived from the current ATR instead of a constant pip count, so a quiet market gets a tighter stop and a bigger position while a wild market gets a wider stop and a smaller one - the money at risk per trade stays constant even though the stop does not. Every model's money-per-point is derived from MODE_TICKVALUE and MODE_TICKSIZE for the actual symbol, never a hardcoded contract size, and every P&L calculation is scaled by that model's own lot size - the two places a sizing tool most commonly gets silently wrong. The four curves are rendered as Unicode block sparklines directly in the chart Comment, normalised against a range shared across all four models so the divergence between them is visible at a glance rather than requiring four separately-scaled charts. Notes and limitations - This tool is paper simulation only. No OrderSend call exists in this file, and no real position is ever opened. - All four models share the exact same entry and exit timing by design - this isolates sizing as the only variable, but means the comparison says nothing about entry or exit quality, only about money management. - Equity is updated on realised close only; the sparkline does not show intra-trade floating P&L, so a curve can look flatter between samples than the account would have looked in real time. - The placeholder MA-cross signal exists only to drive all four models with something; it is not a strategy recommendation. - Sizing that compounds (models B and D) can grow or shrink aggressively over a long losing or winning run - that behaviour is the point of the comparison, not a bug, but it is exactly the kind of model that needs a conservative InpRiskPercent in real use.
Expert advisor · MT4 · v1.0 · Free
About Sizing Model Comparator
Sizing Model Comparator is a script for MetaTrader 4 based on Moving Average and ATR. It can alert you with a pop-up, sound, email or push message. It has 9 settings, such as Fast ma period, Slow ma period and Hold bars. MQL source code included.
Files in the download: SizingModelComparator.ex4, SizingModelComparator.mq4, SizingModelComparator.txt.
Settings
| Setting | Default | What it does |
|---|---|---|
| Fast ma period | 10 | Fast MA period for the placeholder signal |
| Slow ma period | 30 | Slow MA period for the placeholder signal |
| Hold bars | 10 | Bars every model's paper trade is held before closing |
| Starting balance | 10000.0 | Simulated starting balance for every model |
| Risk percent | 1.0 | Percent of equity risked per trade (models B and D) |
| Fixed stop pips | 25 | Stop distance used by the fixed-stop models (A sizing basis, B, C) |
| Fixed lots | 0.10 | Constant lot size for the fixed-lots model |
| Atr period | 14 | ATR period defining the volatility-scaled stop |
| Curve capacity | 120 | Maximum equity samples kept per model for the sparkline |
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: Divergence · Buy/Sell Arrows · Risk & Lot Size · Alerts · Moving Average · ATR · MT4 Expert Advisor · MQL4 Source Code