Loading…

Multi Timeframe MA Ribbon

A single-timeframe moving average tells you what one timeframe thinks. This indicator plots the same period and method calculated independently on up to five higher timeframes at once, all mapped back onto the current chart's bar grid. When the five lines stack cleanly in order, every timeframe agrees on direction. When they interleave and cross each other, the timeframes disagree, which is usually the more useful thing to know before trusting a single-timeframe signal. Mapping a higher timeframe's value onto the current chart is where a naive version of this breaks: picking a fixed bar offset only works for one timeframe ratio and silently misaligns for every other pair. This indicator uses iBarShift() to find the higher-timeframe bar that was open at each current-chart bar's time, then reads that bar's MA value directly. That value only reflects higher-timeframe bars that have already closed, so nothing here can repaint - each ribbon line simply lags behind the current chart until its own timeframe's bar closes, exactly as a genuine multi-timeframe read should. Notes and limitations - Each ribbon line only updates when its own timeframe's bar closes - the W1 line, for example, can sit unchanged for days. That is correct behaviour, not a fault. - If a higher timeframe has no history loaded far enough back (thin history on that symbol/timeframe pair), the corresponding line reads EMPTY_VALUE for those early bars rather than a guessed value. - This is a visual alignment aid, not a signal generator. It draws no arrows and fires no alerts.

Indicator · MT4 · v1.0 · Free

About Multi Timeframe MA Ribbon

Multi Timeframe MA Ribbon is an indicator for MetaTrader 4 based on Moving Average. It has 8 settings, such as Ma period, Ma method and Applied price. MQL source code included.

Files in the download: MtfMaRibbon.ex4, MtfMaRibbon.mq4, MtfMaRibbon.txt.

Settings

SettingDefaultWhat it does
Ma period20MA period, same period used on every timeframe
Ma methodMODE_EMAMA method
Applied pricePRICE_CLOSEApplied price
Tf1PERIOD_M15Timeframe 1 (fastest)
Tf2PERIOD_H1Timeframe 2
Tf3PERIOD_H4Timeframe 3
Tf4PERIOD_D1Timeframe 4
Tf5PERIOD_W1Timeframe 5 (slowest)

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: Grid · Moving Average · Multi-Timeframe (MTF) · MT4 Indicator · MQL4 Source Code

MetaTrader 4 & 5 indicators · PolyMaria