Trading Costs in R: How Spread, Commission and Slippage Eat a Breakout Edge

2 December 2026, 14:29
Frederic Jean Andre Jouillerot
0
36

Trading costs are usually discussed in pips or in money. For a strategy, the useful unit is R, the amount risked per trade. Expressed that way, the same spread can be negligible for one system and fatal for another. This post shows the arithmetic and gives an MQL5 script that converts your broker's current costs into R.

1. Costs in R

The formula is simple: cost per trade in R = total cost in pips ÷ stop distance in pips.

Take an all-in cost of 2 pips per round trip on EURUSD, for example 1 pip of spread, 0.7 pip of commission (a $7 round-turn commission per standard lot, with a pip worth $10 per lot) and 0.3 pip of slippage. The cost per trade is then:

  • 10-pip stop: 0.20R
  • 15-pip stop: 0.13R
  • 20-pip stop: 0.10R
  • 40-pip stop: 0.05R

Same broker, same costs, four times the impact depending on the stop.

2. What it does to expectancy

A theoretical example: a system earns +0.15R per trade before costs, with a 15-pip stop. After 0.13R of costs, about +0.02R is left. Over 200 trades, that is roughly +30R before costs and +3R after (simple sum, no compounding). Most of the edge went to execution.

With a 40-pip stop and the same gross +0.15R, costs take 0.05R and +0.10R remains.

3. Why breakouts are exposed

  • Entries happen when price is moving. A buy stop order becomes a market order once triggered, so the fill can be worse than the trigger price when price moves fast.
  • Spreads are not constant. They often widen around the daily rollover and during major news, which is also when some breakouts trigger.
  • Stops slip too. A stop-loss is also executed at the next available price, so the realised loss can exceed 1R.

4. A script to measure your costs in R

This script reads the current spread of the chart symbol, converts a round-turn commission per lot into pips, adds an assumed slippage, and expresses the total in R for a given stop distance. Inputs are examples: replace them with your broker's figures.

#property script_show_inputs
input double InpStopPips        = 15.0;  // stop distance in pips
input double InpCommissionPerLot = 7.0;   // round-turn commission per lot, account currency
input double InpSlippagePips    = 0.3;   // assumed slippage per round trip, pips

void OnStart()
  {
   int    digits   = (int)SymbolInfoInteger(_Symbol, SYMBOL_DIGITS);
   double pip      = (digits == 3 || digits == 5) ? 10 * _Point : _Point;
   double tickVal  = SymbolInfoDouble(_Symbol, SYMBOL_TRADE_TICK_VALUE);
   double tickSize = SymbolInfoDouble(_Symbol, SYMBOL_TRADE_TICK_SIZE);
   if(tickVal <= 0 || tickSize <= 0 || InpStopPips <= 0) { Print("Invalid data"); return; }

   double pipValue   = tickVal * pip / tickSize;              // per lot, account currency
   double spreadPips = SymbolInfoInteger(_Symbol, SYMBOL_SPREAD) * _Point / pip;
   double commPips   = InpCommissionPerLot / pipValue;
   double totalPips  = spreadPips + commPips + InpSlippagePips;

   PrintFormat("%s  spread %.2f + commission %.2f + slippage %.2f = %.2f pips",
               _Symbol, spreadPips, commPips, InpSlippagePips, totalPips);
   PrintFormat("Cost per trade with a %.1f-pip stop: %.3fR",
               InpStopPips, totalPips / InpStopPips);
  }

The spread read here is the current one. Run it at the times your system actually trades, not only during the quietest hours.

5. Practical rules

  • Express every cost in R before judging a strategy.
  • Be suspicious of systems with small stops and small edges: costs scale with 1 ÷ stop.
  • Backtest with realistic spreads. In MT5, "Every tick based on real ticks" uses the broker's recorded tick history, including its spreads, when that history is available.
  • Add a slippage allowance to backtest results, especially for entries on stop orders.
  • Compare live fills with backtest fills after a few weeks: the gap is your real execution cost.

If you evaluate a breakout EA, including Titan Breakout, our H1 breakout EA at Pipmaster France, run it with your own broker's real ticks and costs. Titan Breakout is free to download for backtesting: Titan Breakout.

The figures above are theoretical examples, not the results of any real strategy, broker or account. Trading leveraged products involves a high risk of capital loss.