Skip to content

Free MT5 indicator

Spread & Swap Monitor

Chart panel with current, average and maximum spread, swap long and short, stop and freeze levels, tick value and pip value per lot.

Utilityv1.0MetaTrader 5 (MQL5) Compiles with 0 errors Non-repainting signals Alerts

What it does

FXP Spread & Swap Monitor shows the trading conditions of the chart symbol in one panel: the spread right now, its live average and maximum, the average spread recorded on recent bars, what the spread costs per lot, the overnight swap for long and short positions, the triple-swap day, stop and freeze levels, tick size and value, pip value per lot, contract size and minimum lot.

The panel updates every second on a timer, so it keeps sampling the spread even when ticks are slow.

How it works

  • Spread now = (ask - bid) / point, shown in points and in pips (10 points per pip on 3- and 5-digit quotes).
  • Live average and maximum come from a rolling buffer of one-second samples taken while the indicator runs (300 samples by default, about five minutes).
  • Bar average uses the spread value MetaTrader stores with each closed bar over the last 100 bars. Brokers usually store the minimum spread of the bar, so this figure tends to be lower than the live average.
  • Spread cost per lot = spread in price x tick value / tick size, in account currency.
  • Pip value per lot = tick value x pip size / tick size.
  • Swap long, swap short, swap unit, triple-swap day, stop level, freeze level, contract size and minimum volume are read directly from the symbol specification.

The spread value turns orange when it is above your alert threshold or more than twice the live average.

How to use it

Copy the .ex5 file into MQL5/Indicators and attach it to any chart.

Check the panel before you trade: a spread far above its average, typical around rollover and major news, makes short-term trades much more expensive. The swap rows tell you what holding a position overnight costs or earns; see the glossary entries for spread and swap. The stop level is the minimum distance your broker allows between price and a stop-loss or take-profit. Pip value per lot feeds straight into a position size calculator.

Settings

InputDefaultWhat it changes
Live samples for average/max300Length of the live spread window, in seconds.
Bars for historical average spread100Bars used for the bar-based average.
Panel X / Y offset12 / 24Panel position.
Font size9Text size; the panel scales with it.
Background / border / label / value / warning colorsdark themePanel styling.
Alert when spread exceeds N points0 (off)One alert per bar above the threshold.

Limitations

  • The live average only covers the time the indicator has been running; it resets when you change timeframe or reload the chart.
  • Swap values are what the broker publishes in the symbol specification and can change without notice. Percentage-based swap modes are shown as annual percentages, not money.
  • A stop level of 0 can mean "no minimum" or a floating level, depending on the broker.
  • Commission is not part of the spread and is not shown. Trading involves substantial risk of loss.

Key inputs

Key inputs of Spread & Swap Monitor
InputDefaultDescription
Live samples for average/max (1 per second)300Number of one-second spread samples kept for the live average and maximum.
Bars for historical average spread100Closed bars used for the bar-based average spread.
Panel X offset (pixels)12Horizontal panel position.
Panel Y offset (pixels)24Vertical panel position.
Font size9Panel text size.
Alert when spread exceeds N points (0 = off)0Alerts once per bar when the spread is above this value.

Educational tools, not advice. Indicators and Expert Advisors describe price; they do not predict it, and past behaviour does not guarantee future results. Test everything on a demo account first and never risk money you cannot afford to lose. See our disclaimer.

Keep exploring

Related mt5 indicators