Skip to content
All library documents

Displaying Long and Short Swap Values on a Trading Chart

Article MQL5 code base

Summary

This utility displays an instrument’s swap values on a chart, using different text colors for positive and negative values. It also shows the instrument name and the date and time at which the values were captured. Because swap rates can change, the description advises rerunning the script when an updated reading is needed.

The available settings control whether existing text is removed, the colors for positive and negative values, font size, and vertical placement. The document positions this as a display aid that can accompany a separate utility for viewing swap information across symbols, including filtering for positive long or short swaps. It does not describe a trading strategy, explain swap calculations, or provide evidence about returns; users should treat the displayed figures as time-specific reference data.

Key ideas

  • The script places swap values for a financial instrument on its chart.
  • Positive and negative swap values are distinguished with separate text colors.
  • The display includes the instrument name and the timestamp of the captured values.
  • Swap values may change, so the utility may need to be run again for an updated display.
  • Settings control text removal, colors, font size, and vertical placement.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.