DINEXSPACEXAUUSD SpecialistEAs available to rentCustom EA: Strategy → Code → BacktestView rentable EA bots
// ICHIMOKU.MQ5

What is Ichimoku?

Ichimoku Kinko HyoTrend

A complete system in one indicator: trend, support/resistance and entry signals in the same view.

What is Ichimoku Cloud?

A multi-line system giving an overall view of trend, support/resistance and momentum on one chart.

Ichimoku Kinko Hyo — Ichimoku(9,26,52) 2,410.8 / 2,407.1 — SIMULATEDDINEXSPACE / TrendIchimoku(9,26,52) 2,410.8 / 2,407.1XAUUSD · 1H / SIMULATEDRESSUP2,334.82,363.42,449.12,422.1▲ BUYCandle 52: BUY▼ SELLCandle 95: SELL▲ BUYCandle 111: BUYVOL*CANDLE 1CANDLE 29CANDLE 57CANDLE 85CANDLE 112MA · EMA 14 ━━━━ / VOL* · ILLUSTRATIVE CANDLE RANGETenkanKijunSenkou ASenkou BChikouEMA 14Illustrative data — not real market data, not a trading signalIchimoku Kinko Hyo — Ichimoku(9,26,52) 2,410.8 / 2,407.1 — SIMULATEDICHIMOKU 9/26/52XAUUSD · 1H / SIMULATEDRESSUP2,334.82,363.42,449.12,422.1▲ BUYCandle 111: BUYVOL*Ichimoku Kinko Hyo — Ichimoku(9,26,52) 2,410.8 / 2,407.1 — SIMULATEDICHIMOKU 9/26/52XAUUSD · 1H / SIMULATEDRESSUP2,334.82,363.42,449.12,422.1▲ BUYCandle 111: BUYVOL*Ichimoku Kinko Hyo — Ichimoku(9,26,52) 2,410.8 / 2,407.1 — SIMULATEDICHIMOKU 9/26/52XAUUSD · 1H / SIMULATEDRESSUP2,334.82,363.42,449.12,422.1▲ BUYCandle 111: BUYVOL*TenkanKijunSenkou ASenkou BChikouEMA 14Illustrative data — not real market data, not a trading signal

Illustrative signals of the rule on simulated data — not a trading recommendation.

Rule: Tenkan crosses above Kijun: buy; crosses below: sell. The cloud gives the trend context at the signal candle. Entry = close of the signal candle; SL = entry ∓ 1.5 × ATR(14); TP1/TP2/TP3 = 1R/2R/3R.

Use this indicator to create a Custom EA brief →
// WHY_USE_IT

Where this indicator is strong

Three reasons Ichimoku Cloud is still used after decades.

Everything in one look

No need to stack other indicators to see the trend and resistance zones.

The cloud is a zone, not a line

Support and resistance appear as a band with thickness, closer to reality than a single line.

It has a time dimension

The cloud is pushed forward, so it shows the expected resistance zone for coming sessions.

// READING_SIGNALS

How to read Ichimoku Cloud signals

How Ichimoku Kinko Hyo produces its number, and what each shape on the chart means.

Formula and how it works

Tenkan-sen and Kijun-sen are the midpoints of the highest high and lowest low over 9 and 26 periods. Senkou A (the average of Tenkan and Kijun) and Senkou B (the 52-period midpoint) are shifted 26 candles forward to form the cloud (Kumo). Chikou is the close shifted 26 candles back for comparison with the past.

How to use it in an EA

Price above the cloud = uptrend, below the cloud = downtrend. A Tenkan/Kijun cross is the entry signal; the cloud's thickness shows the strength of support/resistance.

Fits when

Higher timeframes (H4 and above) with trends lasting many sessions.

Struggles when

Low timeframes and noisy markets. Price keeps moving in and out of the cloud, so there is no stable context to follow.

Price is above the cloudUptrend context; below the cloud is downtrend context.
Tenkan crosses above KijunAn entry signal; much more reliable when it happens on the same side as the cloud.
A thick cloudA strong resistance zone; harder for price to break through than a thin cloud.
Price is inside the cloudNo clear trend. This is a zone to stay out of.
Common mistakes

Using only the Tenkan/Kijun cross and ignoring where price sits relative to the cloud. Without the cloud, Ichimoku is just a pair of moving averages.

// PARAMETERS

Recommended MT5 parameters for Ichimoku Cloud

Default values of the sample file; test them for your market and timeframe.

ParameterDescription
InpTenkanTenkan-sen period (default 9).
InpKijunKijun-sen period and cloud shift (default 26).
InpSenkouBSenkou Span B period (default 52).
// INSTALL

Put the indicator into MetaTrader 5

Four steps, no software needed besides MT5.

01Download the .mq5 file

Click the download button above; the file saves to your computer under the indicator's name.

02Open the data folder

In MetaTrader 5 choose File → Open Data Folder, then go to MQL5/Indicators.

03Compile

Open the file in MetaEditor and click Compile. No errors means the indicator is ready.

04Drag it onto the chart

Go back to MT5, refresh the Navigator and drag the indicator onto the price chart.

📄 ichimoku.mq5

DinexSpace wrote this file from the indicator's public formula, not from any commercial source. You are free to edit and reuse it.

// THE_DIFFERENCE

How it differs from MetaTrader 5's built-in indicator

The short answer: the formula is not different. What differs is what you can do with it.

Ichimoku Cloud here gives exactly the same number as MetaTrader 5's built-in version — on purpose. The four points below are what differs, and all four can be read from the very ichimoku.mq5 you download.

Calls a built-in indicator
No — the calculation sits in OnCalculate and can be copied straight into an EA
External libraries
Not a single #import declaration
Code length
68 lines · 3 input parameters
How it draws
Drawn over the price chart · calculated incrementally, does not redraw the past

Why this library promises no secret formula — read the full explanation on the library page.

// COMBINATIONS

Which indicators to pair Ichimoku Cloud with, and what you gain

Each indicator only answers one question. Pairing well means covering the right weakness, not stacking more.

Ichimoku CloudAverage True Range
What you gain
A stop-loss placed outside the cloud based on the real range, instead of a guessed fixed number of pips.
Note
A thick cloud needs a wider stop; ATR gives a number instead of an eyeball estimate.
See Average True Range
What you gain
Avoids entering after price has already run too far. Ichimoku gives the context, RSI shows whether the current swing is stretched.
Note
Still only enter on the same side as the cloud. RSI handles timing here, not direction.
See Relative Strength Index
// FAQ

Frequently asked questions about Ichimoku Cloud

Does Ichimoku need other indicators?

On its own it is enough to identify the trend, resistance zones and entry points. What it lacks is risk management — stop-loss distance and position size. That is why the most common pairing is Ichimoku with ATR.

What should I do when price is inside the cloud?

Stay out. Being inside the cloud means there is no clear trend, and this is exactly where all of Ichimoku's signals are least reliable.

Does Ichimoku Cloud on this page use real or simulated data?

The chart on this page uses a deterministic simulated candle series; it is not market prices or trading results.

// SAME_GROUP

Other trend indicators

Indicators in the same trend group, often used instead of or alongside Ichimoku Cloud.

Turn Ichimoku Cloud into an automated EA

An indicator draws signals, but when to enter, where to stop out and how much to risk are still your set of rules. Send those rules and DinexSpace builds them into an EA.

Use this indicator to create a Custom EA brief