Swap Markup Scanner for MT4/MT5
Info
The Swap Markup Scanner for MT4/MT5 is a Script for MetaTrader 5 that swap markup scanner a swap has two parts that metatrader shows as one number: - carry: the interest-rate difference. It is positive in one direction and negative in the other.
Usage
This tool is typically used for enhancing chart analysis and decision making.
Platform
This Script works exclusively on MetaTrader 5 (both build 600+ and newer versions).
Setup
Place the downloaded file in MQL5/Scripts folder via File ? Open Data Folder in MetaTrader 5.
How to Install and Use Swap Markup Scanner for MT4/MT5
1. Installation: Move your script file into the MQL/Scripts directory and restart the platform.
2. Execution: Drag the script onto a chart; it will perform a one-time action, such as closing all open orders or clearing chart objects.
3. Editing: Use MetaEditor (F4) to modify code, click "Compile," and verify no errors appear in the terminal before running.
4. Removing: Scripts stop automatically, but you can remove them manually by right-clicking the chart and choosing "Remove Script."
Frequently Asked Questions
Q: How are scripts different from EAs? A: Scripts execute a single action and then stop; EAs monitor the market and trade continuously.
Q: Can I assign a hotkey to a script? A: Yes, right-click the script in the Navigator, select "Set Hotkey," and define your preferred keyboard shortcut.
Q: Why did my script stop? A: Scripts are designed to stop immediately after finishing their programmed command; this is normal behavior.
What this tool does
Swap Markup Scanner A swap has two parts that MetaTrader shows as one number: - Carry: the interest-rate difference.
Typical Use Case
This Script excels in automated trading and technical analysis on MetaTrader 5.
Compatible Platform & Setup
This Script works on MetaTrader 5. Place the file in the MQL5/Scripts folder and restart the terminal.
Description & Settings
Related: Overnight Cost Meter: Understand and Monitor Swap Costs - another powerful script for MetaTrader 5 traders.
Swap Markup Scanner A swap has two parts that MetaTrader shows as one number: - Carry: the interest-rate difference. It is positive in one direction and negative in the other.Also recommended: SD M Swap - similar script with strong performance on MetaTrader 5.
- Markup: the broker's financing fee. You pay it in BOTH directions.From the long and short swap of a symbol:
markup = -(long + short) / 2
carry = (long - short) / 2
The script converts every swap mode (points, base / margin / deposit currency, interest) into the same unit — annual % of the position's notional value — so you can compare forex, metals, indices and commodities directly.
Why it matters: a strategy that holds positions for weeks pays the markup every day. A markup of 0.75% a year on forex or 2.5% a year on index CFDs can remove the whole edge of a slow strategy, even when the backtest of the price moves looks good.
Output:
- Chart panel: aligned table, markup bars (green < 1%, amber 1-2%, red >= 2% a year) and centred carry bars; stays until you remove the script
- Experts log: full table, most expensive symbols first
- CSV file in MQL5\Files (SwapMarkup_
Inputs:
- InpAllSymbols — scan all broker symbols instead of Market Watch only
- InpTopRows — rows shown in the panel
- InpTheme — dark or light panel
- InpX, InpY — panel position
- InpWriteCsv — write the CSV file
- InpDaysPerYear — days used to annualise a daily swap (default 365)
Notes:
- The script is read-only; it never trades.
- Values use the swap settings at the moment you run it. Brokers change swaps when interest rates change.
- "Reopen" swap modes are skipped because they are not a periodic charge.
You may also like: swap monitor - excellent alternative for script users on MetaTrader 5.
Source Code
#property copyright "RobotFX"
#property version "1.10"
#property description "This code is educational. Feel free to use, modify and upgrade as you wish. Visit ROBOTFX.ORG for professional trading tools"
#property script_show_inputs
#include <Canvas/Canvas.mqh>
enum ENUM_SMS_THEME { SMS_DARK = 0, SMS_LIGHT = 1 };
input bool InpAllSymbols = false;
input int InpTopRows = 20;
input bool InpWriteCsv = true;
input double InpDaysPerYear = 365.0;
.......
⚠ Limitations & Risk Warning
- This tool is provided for educational and testing purposes only.
- Past performance does not guarantee future results.
- Trading involves substantial risk of loss. Use on a demo account first.
- Results may vary depending on market conditions, broker, and settings.
- We recommend thorough backtesting and forward testing before using with real funds.