Swap And Rollover Panel
Swap is the cost traders check least often and get bitten by most often, usually when a position meant to close same day turns into a multi-night hold. This panel puts the numbers that matter in front of the trader before that happens: the long and short swap rate in both raw points and converted account-currency terms, the weekday that conventionally carries triple swap to cover the weekend, and a projected cost for a chosen lot size and holding period. The naive approach reads MODE_SWAPLONG and MODE_SWAPSHORT and stops there, leaving the trader to do the points-to-money conversion in their head under a live position. This panel does the conversion using the symbol's own tick value, so the projected cost row reads directly in account currency. MQL4 has no API that reports which weekday a given broker charges triple swap on - that information lives only in the broker's contract specification page. The overwhelming convention is Wednesday, covering the Saturday and Sunday the market is closed, and the panel states that as the typical case with an explicit prompt to verify against the broker's own published schedule, rather than presenting a guess as fact. Notes and limitations - Swap-to-money conversion assumes the broker quotes swap in points per lot per night, the default MT4 convention. A minority of brokers quote swap directly in account currency or as an annualised percentage; MQL4 exposes no flag to detect which convention is in use, so verify the converted figures against a real overnight charge on a demo account before trusting them for planning. - The triple-swap weekday shown is the common Wednesday convention, not a value read from the broker - confirm it on the broker's contract specification page, since a minority of brokers triple on Friday instead. - The projected cost row is a simple multiplication of the current swap rate; it does not account for the rate changing between now and the actual holding period, which brokers can and do adjust.
Indicator · MT4 · v1.0 · Free
About Swap And Rollover Panel
Swap And Rollover Panel is an indicator for MetaTrader 4. It has 9 settings, such as Lots, Nights and Corner. MQL source code included.
Files in the download: SwapRolloverPanel.ex4, SwapRolloverPanel.mq4, SwapRolloverPanel.txt.
Settings
| Setting | Default | What it does |
|---|---|---|
| Lots | 1.0 | Lot size used for the projected holding cost |
| Nights | 5 | Nights held, used for the projected cost row |
| Corner | CORNER_LEFT_UPPER | Panel corner |
| X distance | 10 | Panel horizontal offset, pixels |
| Y distance | 20 | Panel vertical offset, pixels |
| Font size | 9 | Row font size |
| Row height | 16 | Row height, pixels |
| Header color | clrDimGray | Header row background |
| Row color | clrSlateGray | Data row background |
How to install
- Download the ZIP from your PolyMaria library and unzip it.
- In MetaTrader 4 open File → Open Data Folder, then go to MQL4 → Indicators.
- Copy the .mq4 file(s) there. Put any .mqh files in MQL4 → Include.
- Open the .mq4 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
- Drag the indicator from the Navigator onto a chart and adjust the settings.
Tags: Risk & Lot Size · MT4 Indicator · MQL4 Source Code