Fresh MQL5 code release – perfect for enhancing your MT4/MT5 strategies.

A swap has two parts that MetaTrader shows as one number:
Unique stair-step trend trading with the Stairsteps Expert Advisor. Innovative approach for consistent results. Learn more.
- Carry: the interest-rate difference. It is positive in one direction and negative in the other.
- 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_<server>.csv) for your own analysis
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.
Build better strategies with RobotFX professional tools – check them out.
78815