Ichimoku Cloud MT4 Indicator showing Kumo cloud and TK cross arrows.
The Ichimoku Cloud MT4 Indicator is a free MQL4 technical tool that visualizes the Kumo Cloud, Tenkan-sen, and Kijun-sen with simplified modern styling, non-repainting buy/sell signal arrows, and real-time audio alerts.
Ichimoku Cloud MT4 Indicator Overview
What Is the Ichimoku Kinko Hyo (Ichimoku Cloud) Indicator?
Developed in Japan by journalist Goichi Hosoda and published in 1969, Ichimoku Kinko Hyo translates literally to "One Look Equilibrium Chart". It is an all-in-one technical analysis framework that defines market trend direction, dynamic support and resistance zones, momentum velocity, and actionable buy/sell signals at a single glance.
While traditional Ichimoku charts can appear cluttered and overwhelming to modern traders, this custom Ichimoku Cloud MT4 Indicator simplifies the interface into a sleek modern visualization. It highlights the Kumo Cloud (Senkou Span A & B), Tenkan-sen (Conversion Line), and Kijun-sen (Base Line), firing real-time audio and popup alerts when high-conviction TK Cross and Kumo Breakout events occur.
The 5 Mathematical Components of Ichimoku
1. Tenkan-sen (Conversion Line - 9 Period)
(Highest High + Lowest Low) / 2 over past 9 bars. Measures short-term momentum and acts as dynamic micro-support/resistance.
2. Kijun-sen (Base Line - 26 Period)
(Highest High + Lowest Low) / 2 over past 26 bars. Measures intermediate equilibrium and serves as primary trailing stop baseline.
3. Senkou Span A (Leading Span A)
(Tenkan-sen + Kijun-sen) / 2 plotted 26 bars ahead. Forms the faster boundary of the future Kumo Cloud.
4. Senkou Span B (Leading Span B - 52 Period)
(Highest High + Lowest Low) / 2 over 52 bars plotted 26 bars ahead. Forms the slower macro boundary of the future Kumo Cloud.
Pro Trader Execution Rules for Ichimoku Trading
- Strong Bullish TK Cross: Tenkan-sen crosses above Kijun-sen while price is positioned firmly ABOVE the Kumo Cloud.
- Neutral TK Cross: Tenkan-sen crosses Kijun-sen while price is trading inside the Kumo Cloud (avoid taking entries in cloud chop).
- Kumo Twist Early Warning: When Senkou Span A crosses Senkou Span B 26 bars ahead, it projects future trend rotation.
Supported MT4 Timeframes & Trading Modes
| Timeframe | Trading Style | Application |
|---|---|---|
| M15 / M30 | Intraday Trading | TK cross signal execution and intraday cloud breakout entries. |
| H1 / H4 | Day & Swing Trading | Standard Ichimoku setting applications across Forex majors and Gold. |
| D1 / W1 | Macro Position | Macro trend determination and institutional multi-month asset positioning. |
Key Features & Capabilities
Input Parameters & Settings Guide
Configure the indicator inputs inside MetaTrader MT4 via the Inputs tab upon attaching to your chart:
| Parameter | Default Value | Description | Recommended |
|---|---|---|---|
| InpTenkanPeriod | 9 | Tenkan-sen conversion period | 9 |
| InpKijunPeriod | 26 | Kijun-sen base line period | 26 |
| InpSenkouPeriod | 52 | Senkou Span B cloud period | 52 |
| InpAlertOnTKCross | true | Alert on Tenkan/Kijun cross | True |
| InpAlertOnKumoBreak | true | Alert on Cloud breakout close | True |
Trading Strategy & Entry Rules
Step 1: Verify Price vs Kumo Cloud
Only look for Long trades when price is trading cleanly above the Kumo Cloud (Bullish regime) and Short when below (Bearish regime).
Step 2: Await TK Crossover Above the Cloud
Look for Tenkan-sen to cross above Kijun-sen while price is positioned above the Cloud (Strong Bullish TK Cross).
Step 3: Trailing Stop along Kijun-sen
Trail your protective stop loss beneath the flat Kijun-sen line as the trend expands.
MQL4 Source Code
//+------------------------------------------------------------------+
//| Ichimoku_Cloud_Signals_MT4.mq4 |
//| Copyright 2026, TraderSentiments Quant Team |
//| https://tradersentiments.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2026, TraderSentiments"
#property link "https://tradersentiments.com/indicators/mt4/trend/ichimoku-cloud-indicator"
#property version "2.00"
#property strict
#property indicator_chart_window
#property indicator_buffers 5
input int InpTenkan = 9; // Tenkan-sen Period
input int InpKijun = 26; // Kijun-sen Period
input int InpSenkou = 52; // Senkou Span B Period
input bool InpAlertOnTKCross = true; // Alert on TK Cross
int OnInit() {
IndicatorShortName("Ichimoku Cloud MT4 (" + IntegerToString(InpTenkan) + "/" + IntegerToString(InpKijun) + "/" + IntegerToString(InpSenkou) + ")");
return(INIT_SUCCEEDED);
}How to Install & Compile in MetaTrader MT4
Follow this complete step-by-step technical guide to install, compile, and configure the custom MQL4 indicator on your desktop trading terminal:
Download Source File
Download the raw .mq4 source file to your computer using the direct download button below.
Open MT4 Data Folder
Open your MetaTrader terminal, navigate to the top menu bar, click File → Open Data Folder, and open the MQL4 → Indicators subfolder.
Copy & Compile in MetaEditor
Paste the downloaded file into the Indicators directory. Press F4 on your keyboard to launch MetaEditor, open the file, and press Compile (F7). Ensure the compiler reports 0 errors and 0 warnings.
Attach to Chart & Configure
Return to your terminal, refresh the Navigator (Ctrl+N) panel, drag the indicator onto your active chart, check Allow DLL imports (if applicable), and customize input parameters.
Integrating with Expert Advisors (EA) via iCustom()
Algorithmic traders and quant developers can seamlessly integrate this indicator into custom automated Expert Advisors (EAs). Because the indicator calculates values into standardized plot buffers on closed bars, you can query buffer values using native MQL4 functions without recompilation:
// MT4 MQL4 iCustom Calling Syntax Example
double signalBuy = iCustom(Symbol(), Period(), "Ichimoku_Cloud_Signals_MT4", 0, 1);
double signalSell = iCustom(Symbol(), Period(), "Ichimoku_Cloud_Signals_MT4", 1, 1);
if (signalBuy != 0.0 && signalBuy != EMPTY_VALUE) {
// Bullish signal confirmed on closed bar [1] -> Execute Buy Order
}
if (signalSell != 0.0 && signalSell != EMPTY_VALUE) {
// Bearish signal confirmed on closed bar [1] -> Execute Sell Order
}How to Set Up Mobile Push Notifications on iOS & Android
To receive real-time push alerts on your smartphone whenever an institutional signal triggers:
- Install the official MetaTrader MT4 app on your iPhone or Android smartphone.
- Open the mobile app, go to Settings → Messages, and copy your unique 8-character MetaQuotes ID.
- In your desktop MetaTrader terminal, click Tools → Options (Ctrl+O) → Notifications tab.
- Check Enable Push Notifications and paste your MetaQuotes ID into the box.
- Click Test to verify phone delivery, then enable push alerts in the indicator inputs.
Institutional Risk Management & Capital Preservation Protocol
Professional proprietary trading desks operate under strict risk control parameters to ensure longevity:
- Maximum 1% - 2% Risk Rule: Never risk more than 1% to 2% of total account equity on any individual trade setup.
- Minimum 1:2.5 Risk-to-Reward Ratio (RRR): Only execute setups where the potential profit target is at least 2.5 times greater than the stop-loss invalidation distance.
- Multi-Timeframe Confluence Required: Never take an intraday trade against the primary Daily or 4-Hour trend direction.
- High-Impact Economic News Awareness: Avoid entering new positions 15 minutes before and after major macroeconomic data releases (such as US Non-Farm Payrolls, CPI Inflation, and central bank FOMC/ECB interest rate announcements).
Strategy Backtesting & Historical Modeling Protocol
Before deploying any indicator or automated strategy in a live trading environment, professional quants conduct rigorous multi-year backtesting across varying market conditions:
- 99.9% Tick Data Modeling: Use high-precision tick history from reputable data providers (such as Dukascopy or TrueFX) to eliminate spread anomalies and slippage distortion.
- Spread & Commission Inclusion: Always test with realistic variable spreads and broker commission structures to simulate true real-world execution friction.
- Out-of-Sample Walk-Forward Optimization: Avoid curve-fitting by validating parameters on 70% in-sample data and testing robustness on 30% out-of-sample data.
- Monte Carlo Drawdown Analysis: Run randomized trade sequence simulations to calculate the maximum potential drawdown under adverse market volatility regimes.
Virtual Private Server (VPS) & Execution Latency Optimization
For active day traders, scalpers, and automated Expert Advisors, execution speed is paramount:
- Low-Latency Proximity Hosting: Deploy your MetaTrader MT4 terminal on a dedicated Windows VPS located in the same financial data center (e.g. Equinix LD4 in London or NY4 in New York) as your broker server to achieve sub-millisecond execution times.
- Terminal Memory Optimization: Go to Tools → Options → Charts and decrease Max bars in chart to 5,000 to conserve CPU and RAM resources.
- Audio & News Feed Disabling: Turn off unneeded terminal audio event chimes and background news feeds to ensure 100% of CPU cycles are dedicated to indicator calculations.
Common MetaTrader Error Codes & Resolution Matrix
| Error Code | Description | Exact Resolution Action |
|---|---|---|
| ERR_INVALID_STOPS (130) | Stop Loss or Take Profit is too close to current price. | Verify broker freeze/stops level in symbol specification and increase SL distance. |
| ERR_OFF_QUOTES (136) | Broker server has no available liquidity quotes. | Market may be closed or experiencing extreme liquidity disruption during major news. |
| ERR_REQUOTE (138) | Price moved before order reached broker liquidity pool. | Increase slippage tolerance deviation parameter in your order execution settings. |
| ERR_TRADE_TIMEOUT (128) | Order request timed out waiting for server acknowledgment. | Check internet connection latency or migrate terminal to a dedicated trading VPS. |
Institutional Quantitative Trading Lexicon
Broker Execution Models & Raw Spread Compatibility
To achieve optimal performance when using custom technical indicators:
- ECN / Raw Spread Accounts: Use True ECN accounts with 0.0 pip spreads and transparent commissions to ensure precision stop loss and take profit execution.
- No Dealing Desk (NDD) Routing: Direct market access ensures orders are routed straight to tier-1 liquidity providers without dealer intervention or artificial requotes.
- Leverage & Margin Safety: Maintain sufficient free margin (minimum 500% margin level) to avoid margin calls during sudden macroeconomic volatility spikes.
Ichimoku_Cloud_Signals_MT4.mq4
Version: v2.00File Size: 17.4 KBTotal Downloads: 15,000+License: Free Open SourcePlatform: MetaTrader MT4
Frequently Asked Questions

Quantitative algorithmic trading research desk specializing in MetaTrader MQL4/MQL5 automated systems, institutional order book mechanics, and risk management tools.
