Ichimoku Cloud Fill with Cross Alerts
- Indicators
-
Kazuma Uezono
MQL5 / MQL4 / Pine Script v6 developer and active trader.
Seller on the MQL5 Market (indicators for MT4/MT5).
Services:
- TradingView Pine Script to MT5/MT4 conversion (bar-by-bar matching, with tester report)
- MT4 to MT5 migration - Version: 1.2
- Updated: 12 November 2026
Ichimoku Cloud Fill with Cross Alerts is a TV-compatible Ichimoku Cloud for MetaTrader 5. It uses the same calculation, the same default settings and the same span shift as the "Ichimoku Cloud" built into TradingView. The cloud is filled with solid green or red color, and the price bars are drawn above the cloud so the candles stay readable.
Ichimoku shows where price is compared with the middle of recent price ranges. It is a charting aid, not a buy or sell signal, and it does not predict where price will go.
HOW IT IS CALCULATED
- Donchian midline(n) = (highest high + lowest low) / 2 over the last n bars.
- Conversion Line = midline(9), Base Line = midline(26), Leading Span A = (Conversion Line + Base Line) / 2, Leading Span B = midline(52), Lagging Span = close.
- Defaults 9 / 26 / 52 / 26 are the TradingView defaults.
THE SHIFT (SAME AS TRADINGVIEW)
- With "Lagging Span" = 26, Leading Span A and B are drawn 25 bars ahead and the Lagging Span 25 bars back. This is how TradingView's built-in Ichimoku draws them (offset = displacement - 1; the current bar counts as the first of the 26).
- MetaTrader's built-in Ichimoku shifts by the full 26 bars, so its cloud and Lagging Span sit one bar away from this indicator and from TradingView.
CLOUD FILL
- Green when Leading Span A > Leading Span B, red otherwise - the same rule as TradingView.
- A solid fill instead of the hatched cloud of the built-in Ichimoku. MT5 has no transparency, so the fill color is the cloud color mixed with the chart background (Cloud opacity 1 to 100 %, default 10 %). When you change the background color, the fill follows.
- The fill can be switched off, and each line can be hidden by setting its color to None.
HOW WE CHECKED IT
- We loaded TradingView's own price bars into MetaTrader and compared the output with TradingView's built-in Ichimoku Cloud. All five lines, the cloud color and the shift agreed; the values differed only by floating-point rounding (around 1e-12).
- On a broker's chart the values are a little different, because the prices come from a different data feed.
THE LATEST BAR (REPAINT)
- The bar that is still forming is recalculated on every tick, exactly like on TradingView. Its Conversion Line, Base Line, the new cloud point 25 bars ahead and the newest Lagging Span point (25 bars back) can change until the bar closes.
- Once a bar has closed, its values do not change. Drawing the spans ahead and the Lagging Span back is the normal Ichimoku layout, not a redraw of history.
ALERTS (OFF BY DEFAULT)
- Conversion / Base cross: the Conversion Line crossed above or below the Base Line on the bar that has just closed.
- Cloud break: the close of the bar that has just closed moved above the top of the cloud or below the bottom of the cloud. "The cloud" is the cloud drawn under that bar (calculated 25 bars earlier), the one you see on the chart.
- Checked once per closed bar. Bars that closed before the indicator was loaded do not raise alerts, so attaching it or restarting MT5 does not produce old alerts.
- Message example: "Ichimoku TV EURUSD H1: close broke above the cloud (1.08450)".
- Pop-up, sound and push notification can be combined. Push needs your MetaQuotes ID in the terminal options. Alert texts in English or Japanese.
PRICE BARS ABOVE THE CLOUD - PLEASE READ
- To keep the candles visible, the indicator turns on the chart setting "Chart on foreground" (input "Draw price bars above the cloud"). This setting puts the price bars above every indicator on the chart, including the Ichimoku lines.
- The original setting is kept in a hidden chart object and restored when you remove the last copy. If another tool by the same author that uses this setting is still on the chart, the setting is restored when the last of them is removed.
- While attached, it checks about once per second that the setting is still on and turns it back on if another tool switched it off.
- If all objects on the chart are deleted (for example by a script) while the indicator is attached, the original setting may not come back on removal. In that case switch off "Chart on foreground" in the chart properties (F8).
FOR EA AND iCUSTOM USERS
- Buffers: 0 = cloud Span A (fill), 1 = cloud Span B (fill), 2 = Conversion Line, 3 = Base Line, 4 = Lagging Span (= close), 5 = Leading Span A, 6 = Leading Span B.
- With CopyBuffer, buffers 0, 1, 5 and 6 return the value at the bar where it is drawn: the cloud under that bar, calculated 25 bars earlier. Buffer 4 returns the close of the bar where it was calculated. Buffers 2 and 3 are not shifted.
- When an EA or another indicator loads it through iCustom, it does not change chart settings and raises no alerts; it only calculates the buffers.
GOOD TO KNOW
- Right after loading, the short name in the indicator list may briefly show "probe#..." while the indicator checks whether it is on a chart. This is normal.
- In the Strategy Tester it raises no alerts.
- No DLLs, no external files, no internet connection.
- It does not trade, and no trading result is promised.
INPUTS
Ichimoku: Conversion Line Length (9, 1-1000), Base Line Length (26, 1-1000), Leading Span B Length (52, 1-1000), Lagging Span (displacement, 26, 1-1000)
Style: Conversion Line color (#2962FF), Base Line color (#B71C1C), Lagging Span color (#43A047), Leading Span A color (#A5D6A7), Leading Span B color (#EF9A9A), Line width (1, 1-5), Show cloud fill (true), Cloud color when Span A > Span B (#43A047), Cloud color when Span A < Span B (#F44336), Cloud opacity % (10, 1-100), Draw price bars above the cloud (true)
Alerts: Alert: Conversion Line crosses Base Line (false), Alert: close breaks above / below the cloud (false), Alert by pop-up (true), Alert by sound (false), Alert by push notification (false), Language (Auto = terminal language, English or Japanese)
If an input is out of range, the indicator does not load and writes the reason to the Experts log.
SUPPORT
Questions about installation, settings and bugs are welcome through MQL5 messages. Questions about market direction or individual trades are outside the support scope.
This is part of a series of free TV-style tools. An MT4 edition is also available as a separate product. Other tools by the same author are listed on my seller profile.
TradingView is a trademark of TradingView, Inc. This product is not affiliated with, sponsored by or endorsed by TradingView, Inc.
