Strategy · Pine Script v5 · On the chart

Ichimoku Breakout

by muammeryldrm42

This strategy executes trades based on Ichimoku Kinko Hyo breakouts combined with Tenkan-sen and Kijun-sen crosses.

View on GitHub

GitHub stars7on the repository
Pine versionv5runs as is
Lines of code45
Settings3inputs
LicenceMIT
Last update3 months ago8 Jul 2026

Add It to Your TradingView Chart

  1. 1Copy the scriptPress Copy script above, or the copy button on the code below.
  2. 2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
  3. 3Paste over the templateCreate a new strategy, select all of the template text and paste. Press Save and give it a name.
  4. 4Add it to the chartPress Add to chart. The trades and results appear in the Strategy Tester tab; adjust the settings with the gear icon.

Source Code

45 lines of Pine Script v5 from public/code/indicators__ichimoku.pine, published under MIT. Keep the author's credit and licence lines when you reuse it.

indicators__ichimoku.pine
//@version=5
strategy("Ichimoku Breakout", overlay=true,
         default_qty_type=strategy.percent_of_equity, default_qty_value=10)

tenkanLen = input.int(9, "Tenkan")
kijunLen  = input.int(26, "Kijun")
senkouLen = input.int(52, "Senkou B")

tenkan = (ta.highest(high, tenkanLen) + ta.lowest(low, tenkanLen)) / 2
kijun  = (ta.highest(high, kijunLen) + ta.lowest(low, kijunLen)) / 2
senkouA = ((tenkan + kijun) / 2)
senkouB = (ta.highest(high, senkouLen) + ta.lowest(low, senkouLen)) / 2

cloudTop = math.max(senkouA[kijunLen], senkouB[kijunLen])
cloudBot = math.min(senkouA[kijunLen], senkouB[kijunLen])
kumoGreen = senkouA[kijunLen] > senkouB[kijunLen]

tkUp = ta.crossover(tenkan, kijun)
tkDn = ta.crossunder(tenkan, kijun)

longSig  = close > cloudTop and tkUp and kumoGreen
shortSig = close < cloudBot and tkDn and not kumoGreen

if longSig and strategy.position_size == 0
    sl = kijun
    risk = close - sl
    if risk > 0
        strategy.entry("Ich L", strategy.long)
        strategy.exit("X", "Ich L", stop=sl, limit=close + risk * 3)

if shortSig and strategy.position_size == 0
    sl = kijun
    risk = sl - close
    if risk > 0
        strategy.entry("Ich S", strategy.short)
        strategy.exit("X", "Ich S", stop=sl, limit=close - risk * 3)

plot(tenkan, "Tenkan", color.red)
plot(kijun,  "Kijun",  color.blue)
p1 = plot(senkouA, "Senkou A", color.green, offset=kijunLen)
p2 = plot(senkouB, "Senkou B", color.red,   offset=kijunLen)
fill(p1, p2, color=kumoGreen ? color.new(color.green, 80) : color.new(color.red, 80))

plotshape(longSig,  "L", shape.triangleup,   location.belowbar, color.lime)
plotshape(shortSig, "S", shape.triangledown, location.abovebar, color.red)

Overview

A long position triggers when price closes above the cloud top while the Tenkan-sen crosses above the Kijun-sen within a bullish cloud. A short position triggers when price closes below the cloud bottom while the Tenkan-sen crosses below the Kijun-sen within a bearish cloud. Trades use a dynamic stop loss placed at the Kijun-sen and set a take profit based on a 1:3 risk-to-reward ratio. The indicator plots lines, cloud shading, and entry shapes on the main price chart.

Details

Published by

muammeryldrm42 on GitHub

Type

Strategy, Pine Script v5

Draws

On the price chart

Category

Trend, Breakout

Markets

Any symbol

Timeframes

Any timeframe

Risk Notes

No repainting, lookahead or stacked entries were found in its code or README. That says nothing about how well it works: test it first.

Topics

cryptofuturessodexsosovaluestrategyvaluechain

Settings

The inputs you can change from the gear icon on the chart. Defaults are the author's.

SettingTypeDefaultVariable
Tenkanint9tenkanLen
Kijunint26kijunLen
Senkou Bint52senkouLen
Third-party code. ForexR did not write, test or endorse this script, and the summary above was generated automatically from its code and README. Indicators describe the past, and a strategy's backtest can look better than live trading, especially when a script repaints. Check it in the Strategy Tester and on a demo account before you rely on it.

Similar Pine Scripts

This trend-following strategy executes a classic Donchian channel breakout system designed to cross-validate backtest results against external framework benchmarks. It triggers a long entry when the closing price breaks above the highest high of the prior entr

Strategy v6 BreakoutTrend
Updated today · AGPL-3.0 GitHub repository of Forven S01509 - Simple Donchian 20/10 Breakout
257 stars

This strategy plots running pivot highs as red R circles and pivot lows as blue S circles directly on the price chart. It computes an EMA 3 and a Cto trend line from close prices, then generates long signals on upward EMA-Cto crossovers combined with price pos

Strategy v6 TrendMoving averages Repaints
Updated 6 weeks ago · None stated GitHub repository of Best Chart 1m Strategy Candle Bar

12/26-IT Strategy

by hasnocool
106 stars

This strategy executes trades based on crossovers between a 12-period and a 26-period exponential moving average (EMA). Long positions can be filtered by pivot resistance breakouts and RSI boundary ranges. For trade management, it provides two configurable par

Strategy v5 TrendMoving averages
Updated 2 years ago · GPL-3.0 GitHub repository of 12/26-IT Strategy

均线突破交易系统

by tangly1024
76 stars

This strategy trades long breakouts of a fast and a slow moving average on the price chart. It opens a long position when price crosses above either average, using a percentage of equity as size. It reduces the position by a set share when the high reaches the

Strategy v5 TrendMoving averages
Updated 4 months ago · None stated GitHub repository of 均线突破交易系统
53 stars

This strategy enters long or short on the price chart when price is on the correct side of a 200-period EMA, MACD agrees, RSI is not at the opposing extreme, ADX exceeds a threshold, volume beats a 20-bar average, and close breaks the recent high or low. A tim

Strategy v6 TrendOscillators & momentum
Updated 2 months ago · MPL-2.0 GitHub repository of BTCUSD 5M Optimized Strategy

More strategys

Trade Your Charts With a Regulated Broker

Compare brokers that connect to TradingView, with spreads, minimum deposits and leverage side by side.

Compare brokers