MA Ribbon Clouds Scanner MT4
- 지표
-
Allan Aparece Ninal
MetaTrader 5용 인디케이터와 전문가 어드바이저(EA)를 개발합니다.
작업 방식:
- 모든 인디케이터는 리페인팅 여부를 확인합니다. 신호는 마감된 봉에서만 결정되며, 모든 틱 테스트로 이후에 바뀌지 않는다는 것을 확인합니다.
- 모든 계산은 독립적인 기준 계산과 봉 단위로 비교합니다.
- 전략은 최적화에 사용하지 않은 데이터로 백테스트합니다. 우위가 없는 규칙은 그렇다고 분명히 밝히고 전략으로 판매하지 않습니다. - 버전: 1.0
- 활성화: 10
MA Ribbon Clouds Scanner MT4 is a paid indicator for MetaTrader 4. It draws a ribbon of moving averages with up to five filled clouds, graded so a cloud shows a stronger core band as it widens, plus a width score, the slowest cloud of a higher timeframe, pullback and squeeze-to-expansion marks, and a scanner of the same ribbon state on other symbols and timeframes. Run the free demo in the Strategy Tester on your own symbol before you decide.
It draws, marks and alerts. It does not trade. It shows how a set of moving averages is ordered. It is not a signal system and it promises no profit. The section How it was checked shows what was tested and what was not.
Standalone: everything is built in. You do not need to buy or install any other product named on this page.
In plain words
A moving average is the average close of the last few bars. A short one (5 bars) follows price closely; a long one (50 bars) moves slowly. A ribbon is several of them on one chart, from fast to slow.
When every faster line sits above the next slower one, the ribbon is aligned up: recent prices are above older ones at every length. Aligned down is the mirror. When the lines cross each other the ribbon is tangled, and when they bunch close together it is compressed.
A cloud is the space between two of the lines, filled in. It is green when the faster line of the pair is above the slower one and red when it is below. Two clouds, 5/12 and 34/50, are a popular way to read a short-term and a longer-term direction at a glance.
The ribbon describes the trend that has already happened. It does not say what price will do next.
What you see on the chart
- The lines of the chosen set, each coloured by its direction: green while it is at or above the slowest line, red below it, and paler while it moves against that side.
- The clouds between the pairs of the set, up to five. The candles stay in front of the clouds, so the bars are never hidden. A cloud grows a stronger core band as it widens: none below half an ATR, the largest at about two ATRs. On a dark chart the fills switch to quieter tones by themselves. In MetaTrader 4 a cloud is drawn as vertical bars, one per chart bar, so at wide zoom it looks striped.
- A small dot where the slowest cloud changes colour.
- The name of each line at its right end. A long ribbon (more than six lines) names only its fastest and slowest line.
- The slowest cloud of a higher timeframe as two dotted lines (one step up by default: H1 shows H4, H4 shows D1).
- An arrow where a pullback ends and a diamond where a compressed ribbon becomes aligned (squeeze to expansion).
- Dashboard rows at the bottom right: the state with the width score, whether the higher-timeframe cloud agrees, how many bars ago the last squeeze to expansion and the last pullback were, and the set in use.
- A scanner panel (top right by default): the ribbon state and width score of each symbol and timeframe. Click a cell to open that chart. The chart's right margin widens so the panel, the line names and the rows sit past the last bar and never cover it. The margin goes back when you remove the indicator.
Worked example
EURUSD H1, default inputs, from the test data of this indicator (broker history, server time). On the bar of 2026-10-09 10:00 the ribbon was tangled one bar before; at this close (1.12308) the lines were EMA 5 1.12277, EMA 12 1.12218, EMA 34 1.12122, EMA 50 1.12121. Every line is above the next slower one, so the state becomes Aligned up and the alignment alert fires when the next bar opens. The ribbon was 2.02 ATRs wide. Note how close EMA 34 and EMA 50 are: aligned only needs each line above the next, however small the gap.
Key facts
| Item | Detail |
|---|---|
| Type | Indicator for MetaTrader 4, in the chart window |
| Line sets | Clouds 5/12 + 34/50 (default), GMMA 3-15 and 30-60, Madrid ribbon 5 to 100, 20/50/100/200, five clouds 8/9, 5/12, 34/50, 72/89, 180/200, or your own 2-20 lines with up to 5 clouds |
| Moving averages | SMA, EMA, SMMA, LWMA, HMA, DEMA and TEMA |
| State | Aligned up, aligned down, compressed (narrower than 0.5 ATR by default) or tangled |
| When a value is final | When its bar has closed. Data on the forming bar stays empty. |
| After a reload or timeframe change | The same closed bars give the same values. Old events send no alerts. |
| Alerts | The ribbon becomes aligned; the slowest cloud flips; squeeze to expansion; pullback mark; the higher-timeframe cloud starts or stops agreeing (off by default); a scanner cell becomes aligned. Pop-up, sound, push, e-mail. Closed bars only. |
| Trades | No. It places no orders. |
| Other products needed | None |
| Tested on | EURUSD, GBPJPY, XAUUSD and BTCUSD, H1, H4 and D1 (plus 223 tester runs of the harness) |
Quick start
- Attach the indicator to any chart. The defaults work without optimising.
- Read the dashboard rows: state and width score, the higher-timeframe cloud, the last squeeze and pullback.
- Choose another set or moving-average type in the Ribbon group. Five clouds and HMA are there for traders who use them.
- Set the scanner symbols (Market Watch or your own list) and timeframes. Click a cell to open that chart.
- Switch on the alerts you want in the Alert events group.
Who it is for
Traders who read trend direction from moving averages: the EMA-cloud style with 5/12 and 34/50, GMMA users, and anyone who wants to see at once whether short and long averages agree. It is a reading tool. It is not for someone who wants an automatic buy and sell signal.
How it works under the hood
Lines
Each line is a moving average of the close (SMA, EMA, SMMA, LWMA, HMA, DEMA and TEMA). EMA and SMMA start from the simple average of their first bars, then run recursively. A line is rising when its value is above its value one bar before (equal counts as falling). Its colour: rising and at or above the slowest line = up; falling and at or above it = up, fading; rising below it = down, recovering; falling below it = down. The slowest line itself is up while rising and down while falling.
State
On each closed bar: aligned up when every line is above the next slower one, aligned down when every line is below it. Otherwise compressed when the width is below the "Compressed" input, else tangled. The width is (highest line - lowest line) / ATR(14), the ATR being the simple average of the true range. Two values count as equal within a relative 1e-10, so a tie is never aligned.
Clouds
A cloud is a pair (fast, slow) of the set. It is up when the fast line is above the slow one, otherwise down. The trend cloud is the last (slowest) pair: the dot and the cloud alert follow it. Where clouds overlap, the faster cloud is drawn on top.
Graded clouds and the width score
The core band of a cloud covers a share of the cloud's height: (|fast - slow| / ATR - 0.5) / 2, from 0 up to 70 %, centred in the cloud. The width score (0-100) is the share of the last 100 bars, this one included, whose ribbon width was not larger than this bar's. 100 means the widest ribbon of the last 100 bars.
Pullback, squeeze to expansion, higher timeframe
Pullback mark: the lines are split into a fast half and a slow half. An up mark prints when the slow half is aligned up, the fast half is aligned up and entirely above the slow half, and within the previous 10 bars the lowest fast line had touched the slow half while the slow half stayed aligned up. Down is the mirror.
Squeeze to expansion: the state was compressed on the bar before and is aligned now.
Higher-timeframe cloud: the slowest pair computed on the closes of the higher timeframe. A chart bar shows the value of the last higher-timeframe bar that closed at or before the chart bar opened, so it never changes afterwards. It agrees when it points the same way as this chart's slowest cloud.
Scanner
For each symbol and timeframe the scanner reads the last "Closed bars the scan reads" bars (500 by default) and runs the same rules. A cell shows the state of the last closed bar as a mark (+ aligned up, – aligned down, • compressed, · tangled) with the width score, tinted green, red, amber or grey. A cell that became aligned in the last two bars is drawn stronger.
Inputs
| Input | Default | What it does |
|---|---|---|
| Lines | Clouds 5/12 + 34/50 | GMMA, Madrid ribbon, 20/50/100/200, five clouds or My lines. |
| Moving average type | EMA | SMA, EMA, SMMA, LWMA, HMA, DEMA and TEMA. |
| My lines | 8,21,50,200 | Periods, comma separated (2-20 lines, 2-500 bars). |
| My clouds | 8/21,50/200 | Fast/slow pairs of my lines (up to 5). |
| Compressed | 0.5 | The ribbon is compressed when narrower than this many ATRs (0.1-3). |
| Higher-timeframe cloud | true | The slowest pair on a higher timeframe. |
| Its timeframe | current | Current = one step up (M15, H1, H4, D1 or W1). On W1 and above there is none. |
| Fill the clouds | true | Draw the cloud fills. |
| Graded clouds | true | A stronger core band as the cloud widens. |
| Candles in front of the clouds | true | Sets the chart to draw candles in front. Your setting comes back when you remove the indicator. |
| Line names at the right end | true | Labels. |
| Dot where the slowest cloud flips | true | Switch. |
| Pullback marks / Squeeze-to-expansion marks | true / true | Switches. |
| Marks kept per kind | 40 | 1-200, the newest are kept. |
| Dashboard rows | true | The rows at the bottom right. |
| Show the scanner | true | Switch. |
| Which symbols, my list, suffix, most symbols | Market Watch, 5 names, none, 10 | Market Watch or your list (1-60). A broker suffix is found automatically. |
| Timeframes | M15,H1,H4 | Comma separated. |
| Closed bars the scan reads per cell | 500 | 300-5000. |
| Corner, distances, font size | top right, 10, 24, 9 | Panel layout. |
| Clicking a cell opens that chart, template | true, none | Optional template for the opened chart. |
| Panel, text and muted colours | Soft Desk | Scanner colours. |
| Debug log for bug reports | false | See Found a problem? |
| Pop-up alert | true | Alert window in the terminal. |
| Play a sound | false | Plays the sound file below. |
| Sound file | alert.wav | File from the terminal Sounds folder. |
| Push notification | true | Needs your MetaQuotes ID. |
| false | Needs e-mail set up in the terminal options. | |
| Alert: the ribbon becomes aligned | true | Switch. |
| Alert: the slowest cloud flips | true | Switch. |
| Alert: squeeze to expansion / pullback mark | true / true | Switches. |
| Alert: the higher-timeframe cloud starts or stops agreeing | false | Switch. |
| Alert: a scanner cell becomes aligned | true | Switch. |
Alerts and Expert Advisor use
Alerts. One message per closed bar, sent when the next bar opens, listing every event of that bar, for example: the ribbon is aligned up (clouds 5/12 + 34/50 EMA). Nothing is sent while the history loads, twice for the same bar, or in the Strategy Tester.
Buffers for Expert Advisors (iCustom). The data buffers come first. The forming bar stays empty: read from shift 1.
| Buffer | Content |
|---|---|
| 0 | State: 1 aligned up, -1 aligned down, 2 compressed, 0 tangled |
| 1 | Width in ATRs |
| 2 | Slowest cloud: 1 up, -1 down |
| 3 | Became aligned on this bar: 1 up, -1 down |
| 4 | Slowest cloud flipped on this bar: 1 up, -1 down |
| 5 | Line colours, packed: sum of colour(k) x 4^k (0 up, 1 up fading, 2 down recovering, 3 down; k = 0 the fastest line) |
| 6 | Clouds, packed: sum of d(j) x 6^j, d = (3 if up else 0) + tier - 1, tier 1-3 by width in ATRs (below 0.5, below 1.5, above) |
| 7 | Width score 0-100 |
| 8 | Squeeze to expansion on this bar: 1 up, -1 down |
| 9 | Pullback mark on this bar: 1 up, -1 down |
| 10 / 11 | Higher-timeframe fast / slow line |
| 12 | Higher-timeframe cloud agrees: 1 yes, 0 no |
| 13 | Agreement changed on this bar (the new value) |
How it was checked
- Values: compared with an independent Python version of the rules, on broker history. 73 files (BTCUSD, EURUSD, GBPJPY, XAUUSD; H1, H4, D1; 6 input settings, which cover every line set and moving-average type) held 5,883,080 buffer values and 23,272 events. There were 0 differences.
- Repaint: 73 Strategy Tester runs (1 with every tick, 72 with open prices only). 374,262 closed bars were compared with the values read when they closed. 0 changed after the close, and 0 values appeared on the forming bar.
- Error check: 223 finished MT4 Strategy Tester runs of the test harness, 0 error lines in the tester log. Same indicator source as the MT5 edition, compiled with the MT4 compiler.
Trading-rule test: I have not tested the ribbon state, the cloud flips or the marks as a trading rule, and I make no claim about what price does after them.
Not tested: alerts on a live chart (the tester is silent for alerts), the scanner cells against the same rules (they use the same engine, but no cell test was run on this platform), and the MQL5 Market validator itself.
Limits
- Moving averages lag by design. Alignment and cloud flips come after the move has started.
- Aligned needs every line in order. With many lines, or with the fast HMA, it is rare: on the five-cloud set with HMA about 2 % of bars were aligned in my data, against about 31 % with EMA.
- A line needs as many bars as its period before it has a value, so a long line (200) starts late on a short history.
- The higher-timeframe cloud needs that timeframe's history. Until it has loaded, the row says loading history; the indicator keeps trying for about 8 minutes, and if the history is still missing after that, reload the chart.
- It gives no stop loss, target or lot size.
- Alerts need the terminal to be running with the chart open.
FAQ
Does it repaint? No value changes after its bar has closed. The lines and clouds are also drawn on the forming bar, as any moving average is, but the state, the events and the alerts use closed bars only.
What happens if I change the timeframe or reload the chart? The indicator reads the closed bars again and gives the same values for the same history and inputs.
Why are my candles in front of the clouds? So the clouds never hide a bar. Switch "Candles in front of the clouds" off to keep your own chart setting.
Can I use my own periods? Yes: choose My lines, type the periods, and pair them into clouds as fast/slow.
Can an Expert Advisor read it? Yes. Read the buffers listed under Alerts and Expert Advisor use, from shift 1.
Is there a MetaTrader 5 version? Yes, MA Ribbon Clouds Scanner, with the same rules.
Try it first
Run the free demo in the Strategy Tester in visual mode on your own symbol and timeframe. Check the clouds, the marks and the dashboard rows against the candles before you buy. The scanner needs live symbols, so it shows less in the tester.
Works well with
These are workflow suggestions. I have not found that any pair gives better trading results. You do not need any of them.
| Product | How to use them together | Why |
|---|---|---|
| Anchored VWAP Bands Signals MT4 | Add it to the same chart. | EMA-cloud traders often read the clouds together with a VWAP. It draws the VWAP from the last swing and the day open. |
| Session Levels MT4 | Add it to the same chart. | It draws session boxes and the previous day and week levels, for where a trend meets a level. |
| HTF Candle Sweep MT4 | Add it to the same chart. | It draws the candles of a higher timeframe on this chart, the same idea as the higher-timeframe view of the ribbon. |
Related products
- MA Ribbon Clouds Scanner: the same indicator for MetaTrader 5.
- MA Ribbon Clouds Signals MT4: the free edition (two clouds, four moving-average types, no score, marks, higher timeframe or scanner).
- All my products on MQL5
Custom work
Want an EA that trades this indicator, a custom version of it, several of my indicators or EAs combined into one, an EA that trades another indicator you use (mine or another developer's), or a new indicator or EA of your own? Order it through MQL5 Freelance and choose me as the developer: order through Freelance. Send your requirements, rules and the flow or algorithm you want. The whole order, payment and delivery stay inside MQL5 Freelance.
Found a problem?
- In the inputs, set "Debug log for bug reports" to true.
- Repeat what went wrong.
- Open the Experts tab in the Toolbox. Copy the lines that start with "DBG" and paste them in a comment on this page, with the symbol and timeframe.
- Set the debug log back to false.
The debug lines never contain your account number, name, server, balance or equity.
If you find it useful, a short review on this page helps other traders find it.
Questions: use the comments on this page or send me a message on MQL5.
Trading involves risk of loss. Past behaviour of an indicator does not predict future results.
