Account Model Cost Comparator
A terminal is connected to exactly one account. Nothing in MQL4 or MQL5 can send the same trades through a raw-spread account and a standard account simultaneously to compare the real result - any tool claiming to do that is either exaggerating or not doing what it says. This tool is honest about that limit: it is a calculator over two cost structures the user provides (spread in pips and commission per lot for each model), projected across a shared assumed trade size and monthly trade count, so the difference is computed from real formulas rather than implied by literally running both. Model A optionally reads its spread LIVE from the account this terminal is actually connected to (a real, current number), with a manual commission input alongside it, since neither MQL4 nor MQL5 has an API to read an account's commission schedule. Model B is always a manual cost structure, typed in from the broker's published fee schedule, since no second account is actually connected. Both models' spread cost is computed from tick value and tick size, not a Point-based approximation, so the comparison stays correct on JPY crosses, metals and indices. The result shows a monthly cost figure for each model and which one is cheaper at the assumed trading volume - a real answer to a real question, built from the trader's own inputs rather than from an implied dual-execution test the platform cannot actually run. Notes and limitations This is a cost calculator, not a profitability comparison - it says nothing about which account type would have produced better trading results, only which one is cheaper to trade at the volume assumed. It assumes a constant spread for Model A over the projection period (the live-read figure is a single snapshot, refreshed only as often as InpRecalcSeconds) and a constant spread for Model B (since it is never actually live). Real spreads widen around news and thin liquidity on both account types, which this simple projection does not model. Commission figures must be kept current with the broker's own published schedule; this tool has no way to verify them.
Expert advisor · MT4 · v1.0 · Free
About Account Model Cost Comparator
Account Model Cost Comparator is a script for MetaTrader 4. It has 10 settings, such as Model a live spread, Model a spread pips and Model a commission per lot. MQL source code included.
Files in the download: AccountModelCostComparator.ex4, AccountModelCostComparator.mq4, AccountModelCostComparator.txt.
Settings
| Setting | Default | What it does |
|---|---|---|
| Model a live spread | true | Read Model A's spread live from this connected account instead of the manual input below |
| Model a spread pips | 0.2 | Model A manual spread (pips) - used only when InpModelALiveSpread is false |
| Model a commission per lot | 7.0 | Model A commission per lot, ROUND TURN, account currency (0 if none) |
| Model a name | Raw-spread account | |
| Model b spread pips | 1.6 | Model B spread (pips) - always manual, this account is not actually connected |
| Model b commission per lot | 0.0 | Model B commission per lot, ROUND TURN, account currency (0 if none) |
| Model b name | Standard account | |
| Lots per trade | 0.10 | Lot size assumed per trade, both models |
| Trades per month | 100 | Trade count assumed per month, both models |
| Recalc seconds | 10 | Minimum seconds between recalculations |
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: MT4 Expert Advisor · MQL4 Source Code