Loading…

Strength History Ribbon

A live currency-strength meter answers "how strong is this currency right now" but hides the path that got there. A currency quietly sliding from rank 2 to rank 6 over a week looks identical, on a snapshot meter, to one that simply sat at rank 4 the whole time - yet the two situations mean very different things for a trader watching for rotation. This indicator recomputes the same 8-currency ranking a strength meter uses (each currency's score is the average signed percentage change across the 28 pairs connecting the 8 majors, over InpLookbackBars) at every historical bar, then plots the chosen InpCurrency's rank as a ribbon: green while it ranks in the top two, silver while in the middle four, red while in the bottom two. Because MQL4 has no DRAW_COLOR_* plot types, the three colours are drawn with the split-buffer trick used throughout this catalogue - one buffer per tier, holding a gap value everywhere the tier does not apply, all three sharing one plotted line position. Recomputing 28 pairs' worth of history at every bar is the expensive part; InpMaxBarsToProcess caps how far back a fresh attach recalculates so the indicator does not stall the terminal on a symbol with years of history loaded. Notes and limitations Only the fixed set of 8 majors and their 28 connecting pairs is supported - it cannot trace an exotic currency. Any pair the broker does not offer simply drops out of that bar's average rather than halting the whole calculation, so a currency's rank can still be computed from fewer than 7 contributing pairs; this is the same tolerance a live strength meter uses. The ribbon shows RANK, not the underlying strength score's magnitude - two different weeks where a currency held rank 1 by a landslide versus by a hair look identical on this ribbon, since only ORDER is plotted.

Indicator · MT4 · v1.0 · Free

About Strength History Ribbon

Strength History Ribbon is an indicator for MetaTrader 4. It has 4 settings, such as Currency, Lookback bars and Symbol suffix. MQL source code included.

Files in the download: StrengthHistoryRibbon.mq4, StrengthHistoryRibbon.txt.

Settings

SettingDefaultWhat it does
CurrencyUSDWhich of the 8 majors to trace (USD, EUR, GBP, JPY, AUD, NZD, CAD, CHF)
Lookback bars24Bars each rank reading's own percentage-change window covers
Symbol suffixBroker suffix appended to every pair, leave blank if none
Max bars to process500Hard cap on bars recalculated on a fresh attach/history load - this is O(bars x 28 pairs)

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: Currency Strength · MT4 Indicator · MQL4 Source Code

MetaTrader 4 & 5 indicators · PolyMaria