Loading…

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

SettingDefaultWhat it does
Symbol listAUDJPY,NZDJPY,USDMXN,EURJPY,GBPJPY,USDJPComma-separated symbols to rank
Basket size2How many top/bottom-ranked symbols form the long/short basket legs
Basket lots0.10Notional lot size per basket leg, used only for the P/L and swap projection
Symbol suffixBroker suffix appended to every symbol, leave blank if none
CornerCORNER_LEFT_UPPERPanel corner
X distance10Panel horizontal offset, pixels
Y distance20Panel vertical offset, pixels
Font size9Panel font size

How to install

  1. Download the ZIP from your PolyMaria library and unzip it.
  2. In MetaTrader 4 open File → Open Data Folder, then go to MQL4 → Indicators.
  3. Copy the .mq4 file(s) there. Put any .mqh files in MQL4 → Include.
  4. Open the .mq4 file in MetaEditor and press Compile (F7) if MetaTrader does not show it.
  5. Drag the indicator from the Navigator onto a chart and adjust the settings.

Download the PDF guide

Tags: MT4 Indicator · MQL4 Source Code

MetaTrader 4 & 5 indicators · PolyMaria