Ichimoku Cloud Fill with Cross Alerts MT4
- 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 MT4 brings a TV-compatible Ichimoku Cloud to MetaTrader 4. If you also chart on TradingView, you know its built-in "Ichimoku Cloud": five lines and a soft green or red cloud. This MT4 indicator reproduces that calculation, the same defaults and the same placement of the spans, and fills the cloud with solid color bars instead of hatching.
What it is for: seeing where price stands against the middle of recent ranges and how the cloud ahead is shaped. What it is not: a buy or sell signal or a forecast. A cross or a cloud break says nothing certain about what price will do next.
THE CALCULATION IN SHORT
Line | Formula (default length) | Same as TradingView?
Conversion Line | (highest high + lowest low) / 2 (9) | yes
Base Line | (highest high + lowest low) / 2 (26) | yes
Leading Span A | (Conversion + Base) / 2 | yes
Leading Span B | (highest high + lowest low) / 2 (52) | yes
Lagging Span | close | yes
Shift: with "Lagging Span" = 26, the leading spans are drawn 25 bars ahead and the Lagging Span 25 bars back, as on TradingView (offset = displacement - 1). MT4's built-in Ichimoku uses 26, so its cloud is one bar to the right of this one. Cloud color: green when Span A > Span B, red otherwise.
DOES IT REPAINT?
Closed bars: no. Their values are final.
The forming bar: yes, in the same way as on TradingView. Its lines, the newest cloud point 25 bars ahead and the newest Lagging Span point 25 bars back move with every tick until the bar closes. Alerts therefore look only at closed bars. Drawing spans ahead and behind is the normal Ichimoku layout, not a redraw of history.
MT4 SETUP NOTES - PLEASE READ
1. Colors come from the inputs. Set the line and cloud colors in the Inputs tab; the Colors tab is overridden by these inputs. Set a line color to None to hide that line.
2. MT4 has no area fill, so the cloud is drawn with histogram bars whose width follows the chart zoom. At large zoom levels you may see thin vertical gaps in the cloud. The cloud color is mixed with the chart background (Cloud opacity %, 1-100) and follows background changes.
3. Candles on top: with the fill on, the indicator switches on "Chart on foreground" so the candles stay visible above the cloud. This also puts the candles above the Ichimoku lines and any other indicator on the chart. The change may appear with the next price tick.
4. Removing the last copy restores your original setting (if another tool by the same author that uses this setting is still on the chart, it is restored when the last of them is removed). About once per second the indicator checks that the setting is still on. If you delete all chart objects while it is attached, the original setting may not come back; then switch off "Chart on foreground" in the chart properties (F8).
5. Right after loading, the name in the indicator list can briefly read "probe#..." while it checks that it is attached to a chart. This is normal.
6. MT4 shows the inputs without group headings, in the order listed below.
ALERTS
Off by default. Two independent switches:
- "Alert: Conversion Line crosses Base Line": one alert when a bar closes with the Conversion Line crossed above or below the Base Line;
- "Alert: close breaks above / below the cloud": one alert when a bar closes above the top or below the bottom of the cloud drawn under that bar (the cloud you see);
- never for bars that closed before the indicator was loaded, so a restart does not repeat old alerts;
- text example: "Ichimoku TV GBPUSD H4: Conversion Line crossed below Base Line (1.26985)";
- pop-up, sound and push (MetaQuotes ID required) can be combined; English or Japanese text (Language input).
- No alerts in the Strategy Tester.
COMPARED WITH TRADINGVIEW
We fed TradingView's own price bars into MetaTrader and compared the result with TradingView's built-in Ichimoku Cloud: the five lines, the cloud color and the shift agreed, with differences only at floating-point rounding level (around 1e-12). Your MT4 chart uses your broker's prices, which differ slightly from TradingView's feed, so expect small differences in the values.
iCUSTOM BUFFERS
0/1: cloud (Span A / Span B) on bars where Span A > Span B. 2/3: cloud (Span A / Span B) on the other bars. 4: Conversion Line. 5: Base Line. 6: Lagging Span (= close). 7: Leading Span A. 8: Leading Span B.
MT4's iCustom returns the value at the bar where it is drawn: for the cloud and the leading spans, the value calculated 25 bars earlier; for the Lagging Span, the close of the bar 25 bars newer. Outside the drawn range, MT4 returns 0.0 instead of EMPTY_VALUE.
Called through iCustom, the indicator does not change chart settings and sends no alerts. The inputs have no group headings, so pass the inputs in the order below.
INPUTS (MT4 ORDER)
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); 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; 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.
Out-of-range values stop the indicator from loading, with the reason in the Experts log.
GOOD TO KNOW
- No DLLs, no files, no internet access.
- This is an analysis tool. It does not open or close trades, and no trading result is promised.
SUPPORT
Help with installation, settings and bug reports via MQL5 messages. I do not answer questions about market direction or specific trades.
The MT5 edition (a separate product) and 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.
