Swap Rate Table
Swap is the cost nobody notices until a position has been open for a month. This script prints one line per Market Watch symbol: the long swap, the short swap, the unit those numbers are quoted in, and the weekday on which the broker charges three days of swap at once. The units column is the reason this table exists. Brokers publish swap in points, in a currency, or as an annual interest rate, and the platform just hands you the raw number. A swap of -7 in points on a gold contract and a swap of -7 in account currency on a currency pair are completely different costs, and every forum thread comparing "my broker's swap" numbers without naming the unit is comparing nothing. The table decodes the type on every row, prints a plain warning that rows with different units do not compare, and the CSV carries the unit in its own column so the file cannot quietly turn into one misleading column of numbers. The rows are sorted by the worse of the two swaps, most negative first, so the symbols that bleed the fastest sit at the top. The triple-swap day matters to anyone holding positions overnight: on that day - Wednesday for most FX, Friday for many CFDs - the nightly cost is three times the number in the table. Symbols whose properties cannot be read are listed separately with the reason. They are never printed as a zero swap, because a zero here looks like a free carry trade. Notes and limitations - The numbers are the broker's published rates at this moment. Swap rates change without notice, sometimes daily on exotics - re-run the script rather than trusting an old table. - Converting every swap into account currency per lot per night would need tick values and prices, and for the interest and reopening modes a model of the broker's formula. This script deliberately reports what the broker publishes and names the unit instead of guessing at money. - A zero swap with an asterisk means the broker publishes nothing - it does not prove the symbol is swap-free. Check the contract specification or ask the broker before holding overnight on that assumption. - Swap-free (Islamic) account variants often replace swap with an admin fee that this table cannot see.
Script · MT5 · v1.0 · Free
About Swap Rate Table
Swap Rate Table is a script for MetaTrader 5. It can alert you with a pop-up, sound, email or push message. It has 3 settings, such as Scan all symbols, Export csv and Csv delimiter. MQL source code included.
Files in the download: SwapRateTable.ex5, SwapRateTable.mq5, SwapRateTable.txt.
Settings
| Setting | Default | What it does |
|---|---|---|
| Scan all symbols | false | Scan every known symbol, not only Market Watch |
| Export csv | false | Also write the table to a CSV file |
| Csv delimiter | , | CSV delimiter (first character is used) |
How to install
- Download the ZIP from your PolyMaria library and unzip it.
- In MetaTrader 5 open File → Open Data Folder, then go to MQL5 → Scripts.
- Copy the .mq5 file(s) there. Put any .mqh files in MQL5 → Include.
- Open the .mq5 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
- Drag the script onto a chart to run it once.
Tags: Alerts · MT5 Script · MQL5 Source Code