🔓 Get All Tools for FREE!
- ✅ Click here to open a trading account using our referral link and start trading.
- 📅 After 7 days of active trading under our referral link, you can get access to all tools in your account.
- ⚠️ Keep trading to keep access free — if you're inactive for 7 days, your access will be removed.
- 👉 Already have an account? You can change the IB (introducing broker) to our referral link ( https://one.exnesstrack.org/a/w7syl3vnjb ) and still qualify!
Ichimoku Cloud Trend-Following Strategy [algo_aakash] | Full Code Inside
This article introduces a powerful trend-following strategy built on the Ichimoku Cloud, a comprehensive technical analysis tool. We will explore its core components and how to systematically interpret their signals to identify high-probability market trends. The provided Pine Script code automates this process, generating clear visual and actionable trading alerts for your chart analysis.
Understanding the Ichimoku Cloud Components
🔓 Get All Tools for FREE!
- ✅ Click here to open a trading account using our referral link and start trading.
- 📅 After 7 days of active trading under our referral link, you can get access to all tools in your account.
- ⚠️ Keep trading to keep access free — if you're inactive for 7 days, your access will be removed.
- 👉 Already have an account? You can change the IB (introducing broker) to our referral link ( https://one.exnesstrack.org/a/w7syl3vnjb ) and still qualify!
The Ichimoku Kinko Hyo, or ‘one-glance’ chart, consists of five key lines that offer a holistic view of market momentum, support/resistance, and trend direction. The Tenkan-sen (Conversion Line) and Kijun-sen (Base Line) form a moving average crossover system. The Senkou Span A and B project a leading span, creating the ‘cloud’ or ‘kumo,’ which represents future support and resistance zones. Finally, the Chikou Span (Lagging Span) closes the system by comparing the current price to historical price action, confirming the strength of a trend.
Defining the Trend-Following Signals
The core of this strategy is to enter trades in the direction of the dominant trend as defined by the cloud’s position. A bullish trend is confirmed when the price is above the cloud, the Senkou Span A is above Senkou Span B (a green cloud), and the Chikou Span is above the price from 26 periods ago. A bearish trend is the opposite. Entry triggers are then generated by the Tenkan-sen crossing above the Kijun-sen for a long signal, or below it for a short signal, but only if this occurs in the direction of the established cloud trend, filtering out false moves in choppy markets.
Implementing the Strategy with Risk Management
No strategy is complete without prudent risk controls. The code includes logic for stop-loss and take-profit orders to manage trades effectively. A common approach is to set a stop-loss on the opposite side of the Kijun-sen or the nearby cloud edge, protecting capital if the trend unexpectedly reverses. This systematic approach to signal generation and risk management allows for disciplined, rule-based trading.
In summary, the Ichimoku Cloud provides a robust framework for identifying and trading with the trend. This automated strategy codifies its rules, helping traders avoid emotional decisions and capitalize on sustained market moves. By combining multiple confirming elements, it offers a high-reliability method for trend participation.
// Author: algo_aakash
//@version=5
strategy("Ichimoku Cloud Trend-Following Strategy [algo_aakash] | Full Code Inside", overlay=true, default_qty_type=strategy.percent_of_equity, default_qty_value=10)
// Inputs
tenkan_period = input.int(9, "Tenkan Period")
kijun_period = input.int(26, "Kijun Period")
senkou_b_period = input.int(52, "Senkou Span B Period")
sl_percent = input.float(1.0, "Stop Loss %") / 100
tp_percent = input.float(2.0, "Take Profit %") / 100
// Ichimoku Calculations
tenkan = ta.sma(ta.hlc3, tenkan_period)
kijun = ta.sma(ta.hlc3, kijun_period)
senkou_a = (tenkan + kijun) / 2
senkou_b = ta.sma(ta.hlc3, senkou_b_period)
chikou = close
// Cloud Definitions (Projected 26 bars forward)
cloud_top = ta.sma(senkou_a[26], 1) > ta.sma(senkou_b[26], 1) ? senkou_a[26] : senkou_b[26]
cloud_bottom = ta.sma(senkou_a[26], 1) > ta.sma(senkou_b[26], 1) ? senkou_b[26] : senkou_a[26]
// Trend Conditions
priceAboveCloud = close > cloud_top and close > cloud_bottom
priceBelowCloud = close < cloud_top and close < cloud_bottom
cloudBullish = senkou_a[26] > senkou_b[26]
cloudBearish = senkou_a[26] < senkou_b[26]
chikouBullish = chikou > close[26]
chikouBearish = chikou < close[26]
// Entry Signals
longSignal = ta.crossover(tenkan, kijun) and priceAboveCloud and cloudBullish and chikouBullish
shortSignal = ta.crossunder(tenkan, kijun) and priceBelowCloud and cloudBearish and chikouBearish
// Plot Ichimoku Components
plot(tenkan, color=color.blue, linewidth=2)
plot(kijun, color=color.red, linewidth=2)
plot(senkou_a, offset=26, color=color.green, linewidth=1)
plot(senkou_b, offset=26, color=color.red, linewidth=1)
fill(plot(senkou_a, offset=26), plot(senkou_b, offset=26), color = senkou_a[26] > senkou_b[26] ? color.green : color.red, transp=80)
// Plot Entry Signals
plotshape(longSignal, style=shape.triangleup, location=location.belowbar, color=color.green, size=size.small)
plotshape(shortSignal, style=shape.triangledown, location=location.abovebar, color=color.red, size=size.small)
// Strategy Logic
if (longSignal)
strategy.entry("Long", strategy.long)
strategy.exit("Exit Long", "Long", stop=close * (1 - sl_percent), limit=close * (1 + tp_percent))
if (shortSignal)
strategy.entry("Short", strategy.short)
strategy.exit("Exit Short", "Short", stop=close * (1 + sl_percent), limit=close * (1 - tp_percent))
0 Comments