Spread MetaTrader indicator — displays current spread in the main window of the chart. You can modify the font parameters, indicator's position and the normalization of the spread value. The spread is redrawn after each tick, ensuring the most current and active spread value. This can be useful for brokers with variable spreads or with spreads that are widened often. You can also enable a spread label to be shown near the current Bid line. The indicator is available for both MT4 and MT5.

Input parameters:

  • UseCustomPipSize (default = false) — if true, the pip size will be based on DecimalPlaces input parameter, otherwise, the broker's default pip size will be used.
  • DecimalPlaces (default = 0) — the number of decimal places in a pip. E.g. "4", if the pip looks like "0.0001".
  • AlertIfSpreadAbove (default = 0) — if above zero, then a sound alert will be issued if spread goes above given value.
  • DrawLabel (default = false) — if true, a small text label with the current spread value will be drawn near the Bid line.
  • font_color (default = Red) — color of the spread indicator.
  • font_size (default = 14) — size of the spread indicator.
  • font_face (default = "Arial") — font of the spread indicator.
  • corner (default = ANCHOR_LEFT_UPPER) — location for the spread indicator on the chart.
  • spread_distance_x (default = 10) — horizontal distance from the corner to indicator.
  • spread_distance_y (default = 130) — vertical distance from the corner to indicator.
  • DrawTextAsBackground (default = false) — if true, the text label with the spread value will be drawn as background. It can be useful if you want to prevent the indicator from obscuring the chart.
  • label_font_color (default = Red) — color of the spread label.
  • label_font_size (default = 13) — size of the spread label.
  • label_font_face (default = "Courier") — font of the spread label.

Usage

Spread Indicator Example MetaTrader Chart

The indicator measures the current spread in points (pips). Because there is no convention as to what a pip is, there is a DecimalPlaces input parameter. Using that parameter, you can change the indicator's idea of a pip. If you set it to 0, you tell the indicator that one pip looks like "1" — with zero decimal places. That way, a quote like 1201.4/1202.6 will result in a spread of 1.2 pips. If you set DecimalPlaces to 1, then it means that your pip looks like "0.1" — with one decimal place. And that means that the quote above has 12 pips of spread. Furthermore, if you believe that a proper pip should look like "0.01", you will set DecimalPlaces to 2 and the spread of the same quote will become 120.

In another example, let's have a look at the CAD/CHF quote of 0.76654/0.76773. If you want to use "0.0001" as a pip, you just set DecimalPlaces to 4, and the indicator will display the spread for that quote as 11.9 pips. If you set DecimalPlaces to 5, the indicator's output will look like 119 pips.

If you want to set the custom pip size using DecimalPlaces, then UseCustomPipSize should be true. When UseCustomPipSize is false, the indicator uses the default pip size of the current quote. For example, it will output 12 for 1201.4/1202.6 quote and 119 for 0.76654/0.76773 quote.

This indicator cannot be used to generate trading signals. It can only assist you to make trading decisions, set proper stop-loss or take-profit levels and inform of the current market situation in a simple and fast manner.

Downloads:

Spread for MetaTrader 4 in .zip

Spread for MetaTrader 4 in .mq4

Spread for MetaTrader 5 in .zip

Spread for MetaTrader 5 in .mq5

Discussion:

Warning! If you do not know how to install this indicator, please read the MetaTrader Indicators Tutorial.

Do you have any suggestions or questions regarding this indicator? You can always discuss Spread with the other traders and MQL programmers on the indicators forums.