Ichimoku Cloud Pine Script Custom — Tutorial TradingView
Ichimoku Kinkō Hyō (一目均衡表) — “one glance equilibrium chart” — adalah indikator Jepang yang menggabungkan 5 elemen dalam 1 view. Memberikan gambaran trend, momentum, dan support/resistance secara komprehensif. Tutorial ini punya Pine Script Ichimoku custom dengan alerts dan dashboard.
5 Komponen Ichimoku
Tenkan-sen
Conversion line (9-period). Short-term momentum.
Kijun-sen
Base line (26-period). Mid-term equilibrium.
Senkou A
Leading span A (avg Tenkan+Kijun, shifted 26 forward). Cloud boundary.
Senkou B
Leading span B (52-period mid, shifted 26 forward). Cloud boundary.
Chikou-span
Lagging span (close shifted 26 backward). Confirmation.
Cara Baca Ichimoku
Cloud (Kumo) — Trend Direction
- Price di ATAS cloud: Trend bullish kuat
- Price di BAWAH cloud: Trend bearish kuat
- Price di DALAM cloud: Sideways/uncertain, hindari trade
- Cloud hijau (Senkou A > Senkou B): Bullish bias
- Cloud merah (Senkou A < Senkou B): Bearish bias
Tenkan/Kijun Cross — Entry Signals
- Tenkan crosses ABOVE Kijun: Golden cross → bullish signal
- Tenkan crosses BELOW Kijun: Death cross → bearish signal
- Strong signal: kalau cross terjadi di atas cloud (bull) atau di bawah cloud (bear)
Chikou Confirmation
Chikou (lagging span) di atas price 26 bar lalu = confirm bullish. Di bawah price 26 bar lalu = confirm bearish. Jika tidak align, signal weak.
Pine Script Custom — Code Lengkap
//@version=5
indicator("Ichimoku Cloud Custom — IA Trader Pro", overlay=true)
// === INPUTS ===
tenkanLen = input.int(9, "Tenkan-sen Length")
kijunLen = input.int(26, "Kijun-sen Length")
senkouBLen = input.int(52, "Senkou Span B Length")
displacement = input.int(26, "Displacement")
showCloud = input.bool(true, "Show cloud")
showLines = input.bool(true, "Show all lines")
showSignals = input.bool(true, "Show entry signals")
showChikou = input.bool(true, "Show Chikou span")
showDashboard = input.bool(true, "Show dashboard")
// === CALCULATIONS ===
donchian(len) => math.avg(ta.lowest(len), ta.highest(len))
tenkan = donchian(tenkanLen)
kijun = donchian(kijunLen)
senkouA = math.avg(tenkan, kijun)
senkouB = donchian(senkouBLen)
chikou = close
// === PLOTS ===
tenkanPlot = plot(showLines ? tenkan : na, "Tenkan-sen",
color=color.new(#448AFF, 0), linewidth=2)
kijunPlot = plot(showLines ? kijun : na, "Kijun-sen",
color=color.new(#FF5252, 0), linewidth=2)
senkouAPlot = plot(showCloud ? senkouA : na, "Senkou Span A",
color=color.new(#00E676, 30), offset=displacement)
senkouBPlot = plot(showCloud ? senkouB : na, "Senkou Span B",
color=color.new(#FF5252, 30), offset=displacement)
fill(senkouAPlot, senkouBPlot,
color=senkouA > senkouB ? color.new(#00E676, 85) : color.new(#FF5252, 85),
title="Cloud Fill")
plot(showChikou ? chikou : na, "Chikou Span",
color=color.new(#E040FB, 0), offset=-displacement, linewidth=1)
// === TREND DETECTION ===
priceAboveCloud = close > senkouA[displacement] and close > senkouB[displacement]
priceBelowCloud = close < senkouA[displacement] and close < senkouB[displacement]
priceInCloud = not priceAboveCloud and not priceBelowCloud
bullCloud = senkouA > senkouB
bearCloud = senkouA < senkouB
// === ENTRY SIGNALS ===
tkCross = ta.crossover(tenkan, kijun)
tkCrossDown = ta.crossunder(tenkan, kijun)
strongBuy = tkCross and priceAboveCloud and bullCloud
strongSell = tkCrossDown and priceBelowCloud and bearCloud
normalBuy = tkCross and not priceBelowCloud
normalSell = tkCrossDown and not priceAboveCloud
// === SIGNAL LABELS ===
if showSignals and strongBuy
label.new(bar_index, low, "★ STRONG BUY",
color=color.new(#00E676, 0),
textcolor=color.white,
style=label.style_label_up,
size=size.small)
if showSignals and strongSell
label.new(bar_index, high, "★ STRONG SELL",
color=color.new(#FF5252, 0),
textcolor=color.white,
style=label.style_label_down,
size=size.small)
if showSignals and normalBuy and not strongBuy
plotshape(true, location=location.belowbar,
color=color.new(#00E676, 40), style=shape.triangleup, size=size.tiny)
if showSignals and normalSell and not strongSell
plotshape(true, location=location.abovebar,
color=color.new(#FF5252, 40), style=shape.triangledown, size=size.tiny)
// === ALERTS ===
alertcondition(strongBuy, title="Ichimoku STRONG BUY",
message="STRONG BUY: TK cross above + price above bullish cloud")
alertcondition(strongSell, title="Ichimoku STRONG SELL",
message="STRONG SELL: TK cross below + price below bearish cloud")
alertcondition(normalBuy, title="Ichimoku Buy",
message="Buy signal: Tenkan crossed above Kijun")
alertcondition(normalSell, title="Ichimoku Sell",
message="Sell signal: Tenkan crossed below Kijun")
// === DASHBOARD ===
var table dash = table.new(position.top_right, 2, 6,
bgcolor=color.new(color.black, 20),
border_width=1, border_color=color.gray)
if showDashboard and barstate.islast
table.cell(dash, 0, 0, "ICHIMOKU", text_color=color.white, text_size=size.small,
bgcolor=color.new(#E040FB, 30))
table.cell(dash, 1, 0, "STATUS", text_color=color.white, text_size=size.small,
bgcolor=color.new(#E040FB, 30))
table.cell(dash, 0, 1, "Price vs Cloud", text_color=color.white, text_size=size.tiny)
posText = priceAboveCloud ? "▲ ABOVE" : priceBelowCloud ? "▼ BELOW" : "◆ INSIDE"
posColor = priceAboveCloud ? #00E676 : priceBelowCloud ? #FF5252 : #FFC107
table.cell(dash, 1, 1, posText, text_color=posColor, text_size=size.tiny)
table.cell(dash, 0, 2, "Cloud Color", text_color=color.white, text_size=size.tiny)
table.cell(dash, 1, 2, bullCloud ? "GREEN (Bull)" : "RED (Bear)",
text_color=bullCloud ? #00E676 : #FF5252, text_size=size.tiny)
table.cell(dash, 0, 3, "TK Cross", text_color=color.white, text_size=size.tiny)
tkText = tenkan > kijun ? "▲ Bull" : "▼ Bear"
tkColor = tenkan > kijun ? #00E676 : #FF5252
table.cell(dash, 1, 3, tkText, text_color=tkColor, text_size=size.tiny)
table.cell(dash, 0, 4, "Tenkan", text_color=color.white, text_size=size.tiny)
table.cell(dash, 1, 4, str.tostring(tenkan, "#.##"),
text_color=#448AFF, text_size=size.tiny)
table.cell(dash, 0, 5, "OVERALL", text_color=color.white, text_size=size.tiny,
bgcolor=color.new(#FFC107, 50))
overall = strongBuy or (priceAboveCloud and bullCloud) ? "🚀 STRONG BUY" :
strongSell or (priceBelowCloud and bearCloud) ? "🛑 STRONG SELL" :
priceInCloud ? "⏸ WAIT" : "→ NEUTRAL"
overallColor = (strongBuy or (priceAboveCloud and bullCloud)) ? #00E676 :
(strongSell or (priceBelowCloud and bearCloud)) ? #FF5252 : color.gray
table.cell(dash, 1, 5, overall, text_color=overallColor, text_size=size.tiny,
bgcolor=color.new(#FFC107, 80))
Cara Install
- Buka TradingView, pilih chart asset
- Click tab “Pine Editor” di bottom
- Copy code di atas, paste di editor
- Save (Ctrl+S), nama: “Ichimoku Custom”
- Click “Add to chart”
- Cloud, lines, dan dashboard akan muncul
Strategi Trading dengan Ichimoku
Strategy A: Cloud Breakout (Conservative)
- Wait price break OUT dari cloud (atas atau bawah)
- Confirm dengan cloud color (green = above, red = below)
- Tenkan cross Kijun searah dengan breakout
- Chikou span confirm (di atas/bawah price 26 bar lalu)
- Entry, stop loss di sisi seberang cloud
- R/R minimum 1:2
Strategy B: TK Cross dalam Trend (Aggressive)
- Identify trend direction dari cloud color & price position
- Wait Tenkan cross Kijun searah trend
- Entry di confirmation bar berikutnya
- Stop loss di Kijun line
- Take profit di key resistance/support
Strategy C: Cloud Bounce (Counter-Trend Light)
- Identify trend bullish dengan price above green cloud
- Wait retracement ke top cloud (Senkou A atas)
- Wait bullish reversal candle di level cloud
- Entry buy, stop loss di bottom cloud (Senkou B)
- Take profit: prior high atau swing high
Best Practices
✓ Tips Sukses dengan Ichimoku
1. Higher timeframe context: Cek D1 / H4 trend sebelum entry di M15
2. Avoid trade dalam cloud: Choppy market, signals unreliable
3. Strong signal > normal signal: Pakai filter “strongBuy/strongSell” untuk best setups
4. Confirm dengan volume: Breakout cloud dengan volume spike = high probability
5. Patience > FOMO: Ichimoku give 2-5 signals seminggu, tidak banyak
Parameter Tuning
Default Ichimoku adalah 9/26/52/26 (developed di tahun 1930an). Untuk fast modern markets:
- Crypto / synthetic (24/7): 7/22/44/22 (faster response)
- Forex (default): 9/26/52/26
- Stocks (D1): 9/26/52/26 (tetap default)
- Scalping M5: 5/15/30/15 (very fast)
Limitations
⚠️ Yang Harus Disadari
Ichimoku lagging indicator. Reaksi lambat di reversal cepat. Signals sering muncul setelah significant move. Tidak cocok untuk:
• Ranging markets (terlalu banyak noise)
• News-driven volatility (lag terlalu jauh)
• Ultra short-term scalping (< 5 menit)
Combine dengan oscillator (RSI, MACD) untuk speed confirmation.
🚀 Test Ichimoku di chart Deriv (demo gratis $10,000 virtual):
Buka Demo Deriv GratisTopik Terkait
- SuperTrend + MACD Combo
- Auto Fibonacci Indicator
- 10 Pine Script Indikator Ready
- AI untuk Generate Pine Script
