Spread And Commission Drag Estimator
Trading models tested on historical data use clean entry and exit prices. Live execution does not. A spread is charged on entry, commission on entry and exit, and slippage adds a further layer. This script reads the live spread from the terminal and the configured commission parameters, then converts them into the two metrics that matter: how many account currency units the drag costs, and how many R of your stop distance that drag represents. An edge measured as 60% win rate on one-to-one risk-reward on clean bars needs to be re-tested once the real cost is known. If drag eats 0.5R per trade, the effective reward on a one-to-one risk-reward trade is 0.5R for every 1R of risk, which cuts the win rate ceiling from 66% to 55% before the edge becomes marginal. The calculation is intentionally simple - it reads spread from the terminal and uses the broker's published commission rate, then divides. Real execution will vary by symbol, time of day, liquidity and slippage; this is a floor estimate, not a guarantee. Notes and limitations - Commission is not read from the account on either platform - this estimate assumes it is minimal or already built into the spread, and reports it as zero. If your broker charges a separate commission, the true drag is higher than shown. - Spread varies by liquidity and time of day. This is a snapshot of the current spread at the moment the script runs. - Slippage on entry and exit is not included. The script measures spread only. - A symbol with no quotes or no data returns an error. - The calculation assumes order size stays at the planned lot size; partial fills are not included.
Script · MT4 · v1.0 · Free
About Spread And Commission Drag Estimator
Spread And Commission Drag Estimator is a script for MetaTrader 4. It can alert you with a pop-up, sound, email or push message. It has 3 settings, such as Symbol, Lot size and Stop distance pips. MQL source code included.
Files in the download: SpreadCommissionDragEstimator.ex4, SpreadCommissionDragEstimator.mq4, SpreadCommissionDragEstimator.txt.
Settings
| Setting | Default | What it does |
|---|---|---|
| Symbol | Symbol (blank = chart symbol) | |
| Lot size | 1.0 | Trade size, in lots |
| Stop distance pips | 50 | Stop distance, in pips |
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: Moving Average · Alerts · MT4 Script · MQL4 Source Code