Swap Cost Per Position
- Indicatori
-
Jevon Naldo Yoshield
I build MetaTrader 5 tools I use on my own charts. Nine are on the Market.
Order Entry Panel sends market orders per click. Smart Risk and Lot Size Panel turns risk and stop into lots. Prop Firm Guard and Drawdown Lock caps my daily loss. - Versione: 1.0
Swap Cost Per Position puts your open positions in one table for tonight's rollover, in money.
I built it for the trader who holds overnight, to see the charge ahead beside the swap already recorded and, where the swap is quoted in points, the number of nights of positive carry the round turn takes to recover.
WHAT IT SHOWS
- One row per open position, priced for tonight: the charge uses that position's volume, and positions beyond the row limit you set are counted on the last line.
- Two numbers, two sources: the swap so far column is the terminal's own figure; the tonight column is computed from the symbol.
- The triple day comes from your symbol: the header prints the chart symbol's day and the factor used, and each row carries the factor it applied.
- Positive carry, counted in nights: where the swap is quoted in points and the carry is positive, the horizon shows the normal nights needed to recover the round turn at today's spread and the commission you type.
- A dash, never a zero: a figure that cannot be computed shows a dash, and the reason is printed once. Where the swap is not quoted in points, the horizon cell prints its reason instead of a number.
- Set the factor and the commission: the triple multiplier and the round-turn commission are inputs, so tonight's charge and the horizon follow what you set.
- An answer before you enter: two preview rows price the chart symbol's long and short side at the volume you set, so you can read the schedule before you hold anything.
- Shown in the currency it is quoted in: a swap quoted outside your deposit currency shows the raw value and its currency, and no horizon is given.
HOW IT WORKS
1. Attach it to a chart. The table takes the lower right corner, one row per open position, sorted by symbol then ticket.
2. Read the header first: server time, deposit currency, the triple day your chart symbol publishes, the factor applied. The tool assumes the rollover happens when the server date changes, and that stamp is the time it used.
3. Read each row, and read a dash with its reason. The tool only reads: it sends no order, raises no alert and writes no file.
HOW THE FIGURES ARE MADE
- The swap so far column is the terminal's own figure for the position; the other charge columns are computed from the specification, a charge to come.
- 0.00 there means the terminal returned zero: not charged yet, or the figure could not be read. The computed columns are unaffected.
- For a swap quoted as annual interest, the daily amount uses a day count your broker does not publish: it is your input, 360 by default, and the cell marks it an estimate.
- It reads open positions only: it cannot show what a trade cost once it is over, and the preview volume is an example, not a suggestion.
SETTINGS IN PLAIN WORDS
- Triple multiplier: the factor applied on the triple day, 1 to 5. At 1 no night is multiplied.
- Round-turn commission: the commission for one volume unit, both sides, in your deposit currency.
- Interest day count: 360 or 365, for a swap quoted as annual interest.
- Preview volume: the volume the two preview rows price, and a switch to hide them.
- Refresh interval: the minimum gap between two redraws, in milliseconds.
- Rows: how many positions the table lists before it counts the rest on one line.
- Placement: the corner, the two edge insets and the font size.
GOOD TO KNOW
- The figures are the charge your symbol's swap specification implies: your broker's forward points and financing markup are not in the terminal. Your broker's statement is the final word, and it may differ.
- A swap rate can change without notice. This shows the next rollover, not a future night, and it is not a forecast.
- Commission is not a symbol property in MetaTrader 5: the round turn uses the commission you type, zero by default, so a horizon at the default ignores it.
- A carry break-even is not a trade break-even. The price can move against the position by more than the carry earns, and the horizon says nothing about price risk.
COMPATIBILITY
MetaTrader 5, hedging or netting accounts, any symbol whose swap specification the terminal can read, native MQL5, no DLLs.
SUPPORT
Questions through the MQL5 message system. First reply within two working days.
If you have used it, I would welcome a short review of what worked and what did not.
