Carry Basket Monitor
Carry trading earns the daily swap differential between two currencies, but that slow, steady income can be erased by a single adverse price move far faster than it was earned - the two return sources need to be watched separately, not only as a blended total. This indicator does two things. First, it ranks every symbol in the input list by its long-side annualised swap yield: the broker's MODE_SWAPLONG figure converted from points into price terms, divided by price, and annualised at x365 (a standard approximation - broker triple-swap days average out close to this over a full year, so a plain x365 is used rather than trying to model each broker's specific triple-swap weekday). Second, it builds a basket from the top InpBasketSize ranked symbols (long leg) and the bottom InpBasketSize (short leg), and tracks that basket's combined annualised carry yield against its actual price P/L since the indicator was attached to the chart. Swap conventions are genuinely broker-specific. Most brokers report MODE_SWAPLONG/MODE_SWAPSHORT in points of the quote currency, which is what this indicator assumes; a minority report swap directly in account-currency money instead, which would make the yield figure wrong for that broker/symbol. This is stated plainly rather than silently assumed correct - check a symbol's specification sheet in Market Watch before trusting the ranking on a broker you have not verified. "Accumulated" price risk means since this indicator instance was attached to the chart, not since the carry trade was actually opened in a real account - there is no persistence across a terminal restart or a fresh chart. It is a live monitor of a hypothetical basket at the sizes given in InpBasketLots, not a record of an actual position's history. Notes and limitations - Assumes MODE_SWAPLONG/MODE_SWAPSHORT are reported in points, the common broker convention - not universal. Verify against the symbol's specification sheet before trusting the yield figure for a broker/symbol not already checked. - The x365 annualisation is an approximation; it does not model a specific broker's triple-swap weekday or any swap-free/Islamic account override. - Purely informational - it does not place, size, or manage any real trade. The basket P/L is a projection at InpBasketLots, not an account balance. - "Since attach" accumulation resets whenever the indicator is removed and re-added, or the terminal restarts; nothing is saved to disk.
Indicator · MT4 · v1.0 · Free
About Carry Basket Monitor
Carry Basket Monitor is an indicator for MetaTrader 4. It has 8 settings, such as Symbol list, Basket size and Basket lots. MQL source code included.
Files in the download: CarryBasketMonitor.ex4, CarryBasketMonitor.mq4, CarryBasketMonitor.txt.
Settings
| Setting | Default | What it does |
|---|---|---|
| Symbol list | AUDJPY,NZDJPY,USDMXN,EURJPY,GBPJPY,USDJP | Comma-separated symbols to rank |
| Basket size | 2 | How many top/bottom-ranked symbols form the long/short basket legs |
| Basket lots | 0.10 | Notional lot size per basket leg, used only for the P/L and swap projection |
| Symbol suffix | Broker suffix appended to every symbol, leave blank if none | |
| Corner | CORNER_LEFT_UPPER | Panel corner |
| X distance | 10 | Panel horizontal offset, pixels |
| Y distance | 20 | Panel vertical offset, pixels |
| Font size | 9 | Panel font size |
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: MT4 Indicator · MQL4 Source Code