Watch how to download trading robots for free
Find us on Facebook!
Join our fan page
Interesting script?
So post a link to it -
let others appraise it
You liked the script? Try it in the MetaTrader 5 terminal
Scripts

Overnight Cost Meter - script for MetaTrader 5

Dmytro Polhorodnyk
Dmytro Polhorodnyk
  • Systematic trader, trading-systems developer at  Independent (sole proprietor)
  • Ukraine
  • 229
Systematic index trader and developer. I build mechanical trading systems and test them the hard way: 16 years of history, two independent data feeds, out-of-sample epochs, measured spreads and commissions — and every idea that fails the test goes to the archive, not to the product.
Views:
89
Rating:
(1)
Published:
MQL5 Freelance Need a robot or indicator based on this code? Order it on Freelance Go to Freelance
Most traders check the spread and forget the swap. Meanwhile a single night of holding can quietly cost more than the spread you paid to enter - and on many instruments the two directions differ by a factor of ten or more. This script makes those numbers visible in ten seconds.

WHAT IT PRINTS

For every open position:
- what tonight will cost for this exact position, in your account currency;
- how much swap it has already paid and how many days it has been held.

For every symbol (position symbols first, then the visible Market Watch):
- swap per night for 1.0 lot, LONG and SHORT separately, converted to account currency;
- the same cost annualized (night % of notional x 360) - "holding this long costs 6% a year" is a number worth knowing before any swing trade;
- the broker's markup per side: (|swap long| + |swap short|) / 2. The underlying interest rate enters the two directions with opposite signs and cancels out of this sum, so what remains does not depend on rates at all - it is the broker's own margin. Use it to compare brokers: this number is what you pay whichever direction you trade;
- the triple-swap day for the symbol (the night charged x3).

HOW IT HANDLES SWAP MODES

Points, deposit-currency and interest-rate modes are converted exactly. Where a reliable conversion is impossible (exotic modes, foreign-currency swaps) the script prints the raw value with a currency note, or "n/a" - an honest gap instead of a confidently wrong number.

INPUTS

- ScanMarketWatch - also scan visible Market Watch symbols (default true);
- MaxSymbols - Market Watch scan limit, keeps the report readable (default 20);
- ShowChartSummary - short summary on the chart in addition to the full table in the Experts log.

NOTES

Values are what your broker reports at the moment of the run - re-run after rollover if you want fresh numbers, and verify critical decisions against the broker's contract specifications. Annualization uses the 360-day convention. The script only reads symbol properties; it never trades.
GDS Renko SuperTrend Demo EA GDS Renko SuperTrend Demo EA

A small educational Expert Advisor for MetaTrader 5 showing one simple way to combine classic fixed-size Renko bricks with a SuperTrend-style trend state.

Trading Tool Assistant v2 Trading Tool Assistant v2

Manage orders, existing orders, limit orders, trailing, break event & Lot size calculator in one tool

Multi Timeframe Trend Matrix MT5 Multi Timeframe Trend Matrix MT5

A compact MT5 trend dashboard that compares EMA alignment and ADX strength across six timeframes.

Market Structure Swing Map MT5 Market Structure Swing Map MT5

A clear MT5 market structure indicator that labels confirmed HH, HL, LH and LL swings directly on the chart.