Guide 11 min read

Ichimoku Cloud Explained: Automating the Most Complex Indicator

Break down the Ichimoku Cloud into programmable components. Learn what each of the five lines means and how to build automated trading signals with the TickAtlas API.

8Sections
4Code samples
11Min read
GuideCategory

Why Ichimoku is Perfect for Bots

Ichimoku Kinko Hyo ("one glance equilibrium chart") is the most visually complex indicator in technical analysis. Traders spend years learning to read it. But for a bot, it is actually ideal: five distinct numerical components, each with clear programmable rules, that together form a complete trading system — trend, momentum, support, and resistance all in one API call.

The Five Components

Tenkan-sen (Conversion Line)

Average of the 9-period high and low. Acts like a fast moving average. When it crosses above the Kijun-sen, it is a bullish signal.

Kijun-sen (Base Line)

Average of the 26-period high and low. Acts like a slow moving average and a dynamic support/resistance level.

Senkou Span A (Leading Span A)

Average of Tenkan and Kijun, plotted 26 periods ahead. Forms one edge of the cloud.

Senkou Span B (Leading Span B)

Average of the 52-period high and low, plotted 26 periods ahead. Forms the other edge of the cloud.

Chikou Span (Lagging Span)

Current close plotted 26 periods back. Confirms trend when it is above/below price from 26 periods ago.

API Response

JSON API Response
// GET /v1/indicators?symbol=EURUSD&timeframe=H4
{
  "success": true,
  "data": {
    "symbol": "EURUSD",
    "timeframe": "H4",
    "ohlcv": {
      "close": 1.0868
    },
    "indicators": {
      "Ichimoku_tenkan": 1.0862,
      "Ichimoku_kijun": 1.0845,
      "Ichimoku_senkou_a": 1.0854
    },
    "updated_at": 1787229614
  }
}

Automated Signal Logic

Ichimoku generates signals from the relationships between its components. Here is a scoring system that quantifies the overall signal strength:

Python Automated Signal Logic
import requests

API_KEY = "your_api_key_here"
BASE_URL = "https://tickatlas.com/v1"

def ichimoku_score(symbol: str, timeframe: str = "H4") -> dict:
    """Score Ichimoku signal from -5 (strong bearish) to +5 (strong bullish)."""
    resp = requests.get(f"{BASE_URL}/indicators", params={
        "symbol": symbol,
        "timeframe": timeframe,
    }, headers={"X-API-Key": API_KEY})

    data = resp.json()["data"]
    ich = data["indicators"]
    price = data["ohlcv"]["close"]

    # The API publishes Tenkan, Kijun and Senkou Span A. Senkou Span B and the
    # Chikou Span are not published, so derive both from the candles.
    candles = requests.get(f"{BASE_URL}/ohlc", params={
        "symbol": symbol, "timeframe": timeframe, "limit": 60
    }, headers={"X-API-Key": API_KEY}).json()["data"]["candles"]

    last_52 = candles[-52:]
    senkou_a = ich["Ichimoku_senkou_a"]
    senkou_b = (max(c["high"] for c in last_52) + min(c["low"] for c in last_52)) / 2
    close_26_ago = candles[-27]["close"]

    score = 0
    reasons = []

    # 1. Price vs Cloud
    cloud_top = max(senkou_a, senkou_b)
    cloud_bottom = min(senkou_a, senkou_b)

    if price > cloud_top:
        score += 1
        reasons.append("Price above cloud (bullish)")
    elif price < cloud_bottom:
        score -= 1
        reasons.append("Price below cloud (bearish)")
    else:
        reasons.append("Price inside cloud (neutral)")

    # 2. Tenkan-sen vs Kijun-sen (TK cross)
    if ich["Ichimoku_tenkan"] > ich["Ichimoku_kijun"]:
        score += 1
        reasons.append("Tenkan above Kijun (bullish cross)")
    else:
        score -= 1
        reasons.append("Tenkan below Kijun (bearish cross)")

    # 3. Cloud color (future cloud direction)
    if senkou_a > senkou_b:
        score += 1
        reasons.append("Cloud is bullish (Span A > Span B)")
    else:
        score -= 1
        reasons.append("Cloud is bearish (Span A < Span B)")

    # 4. Price vs Kijun-sen
    if price > ich["Ichimoku_kijun"]:
        score += 1
        reasons.append("Price above Kijun (bullish)")
    else:
        score -= 1
        reasons.append("Price below Kijun (bearish)")

    # 5. Chikou span: today's close against the price 26 periods back
    if price > close_26_ago:
        score += 1
        reasons.append("Chikou above price (bullish confirmation)")
    else:
        score -= 1
        reasons.append("Chikou below price (bearish confirmation)")

    # Determine signal
    if score >= 4:
        signal = "STRONG_BUY"
    elif score >= 2:
        signal = "BUY"
    elif score <= -4:
        signal = "STRONG_SELL"
    elif score <= -2:
        signal = "SELL"
    else:
        signal = "NEUTRAL"

    return {
        "symbol": symbol,
        "signal": signal,
        "score": score,
        "reasons": reasons
    }

Multi-Pair Scanner

Python Multi-Pair Scanner
# Scan all major pairs with Ichimoku
pairs = ["EURUSD", "GBPUSD", "USDJPY", "AUDUSD", "XAUUSD", "BTCUSD"]

for pair in pairs:
    result = ichimoku_score(pair)
    if result["signal"] in ("STRONG_BUY", "STRONG_SELL"):
        print(f"\n{result['symbol']}: {result['signal']} (score: {result['score']})")
        for reason in result["reasons"]:
            print(f"  - {reason}")

# Example output:
# XAUUSD: STRONG_BUY (score: 5)
#   - Price above cloud (bullish)
#   - Tenkan above Kijun (bullish cross)
#   - Cloud is bullish (Span A > Span B)
#   - Price above Kijun (bullish)
#   - Chikou above price (bullish confirmation)

Cloud as Support and Resistance

The cloud acts as a dynamic support/resistance zone. Use it to set stop losses and take profit targets:

Python Cloud as Support and Resistance
def ichimoku_levels(symbol: str) -> dict:
    """Extract key support/resistance levels from Ichimoku."""
    resp = requests.get(f"{BASE_URL}/indicators", params={
        "symbol": symbol,
        "timeframe": "H4",
    }, headers={"X-API-Key": API_KEY})

    ich = resp.json()["data"]["indicators"]

    return {
        "cloud_edge": ich["Ichimoku_senkou_a"],  # Senkou Span A — one cloud boundary
        "key_level": ich["Ichimoku_kijun"],  # Strong S/R level
        "fast_level": ich["Ichimoku_tenkan"],  # Minor S/R level
    }

Common Mistakes

Trading Inside the Cloud

The cloud represents indecision. Wait for price to break clearly above or below before taking signals.

Using on Low Timeframes

Ichimoku was designed for daily charts. H4 is the lowest timeframe where it remains reliable. Avoid M5/M15.

Ignoring the Chikou Span

Many traders skip it, but the Chikou span is the final confirmation. A signal is stronger when all five components agree.

Further Reading

Run this against live data.

Every account starts pay-as-you-go with $2.50 of credit and no card. Paste the key into the samples above and the requests work unchanged.

Prefer the API to the article

Build it instead of reading about it.

Create a key, run the first request, then extend one layer at a time. Every account starts pay-as-you-go with $2.50 of credit — no card required.