Swap Cost Calendar
- Indicatori
- Versione: 1.0
Swap is the part of the cost that is easy to forget, because it arrives once a day, quietly, and never appears in the spread. Swap Cost Calendar puts it on the chart as a number you can act on.
What It Shows
The panel reads what the broker publishes for the current symbol and shows four things.
The cost of one night for a long position and for a short one, in your account currency or in points. The weekday line, showing how many nightly charges a position carries on each day of the week. The triple charge day, taken from the broker's own setting rather than assumed. And the total for a holding period you set, counted from today forward through the calendar.
The Triple Charge Day
Most brokers charge three nights at once on one weekday to cover the weekend, and the day varies between brokers and sometimes between symbols on the same broker. The panel reads the day from the symbol settings and marks it, so a position planned across that day carries no surprise.
Holding Period
Set how many nights you expect to hold, and the panel counts the actual charges across that span starting from today: normal nights count once, the triple day counts three times, and the closed weekend itself carries none. The total appears for both directions, so a trade that looks attractive before costs can be checked against what it pays or collects while it waits.
Swap Modes And Honest Blanks
MetaTrader brokers charge swap in several different ways. Points and deposit currency convert into account currency directly, and annual interest modes convert through the position value. Those three are computed and shown.
Other modes exist where the conversion would require assumptions about currency rates that the terminal does not hand to an indicator. In those cases the panel says the mode is not converted here and prints the broker's raw values instead of inventing a figure. A number you cannot trust is worse than no number, which is why that blank is deliberate.
The same applies when the broker reports no swap at all for the symbol: the panel says exactly that.
Calculation
Swap settings are read from the symbol properties the terminal already holds, refreshed once a minute rather than on every tick. Nothing is stored between sessions and nothing is written to disk. The panel does not open, close or modify positions, and it places no orders of any kind.
Every object drawn on the chart carries a prefix you control, and all of them are removed when the panel is taken off the chart.
Input Parameters
- PositionVolume - volume the figures are calculated for
- NightsToHold - holding period in nights, used for the total line
- ShowAs - account currency or points
- ShowPanel, PanelCorner, PanelXOffset, PanelYOffset, PanelFontSize
- ColorPositive, ColorNegative, ColorNeutral
- ObjectPrefix - prefix for every chart object created
Requirements
MetaTrader 5, any symbol, any chart timeframe. Figures come from the broker's settings for the symbol on the account the terminal is connected to, so they match that account rather than a generic table. Works on demo and live accounts alike.
Support
Questions about parameters, about your broker's swap mode, or about a specific symbol: write in the comments of this product, I read that thread.
