Ichimoku Cloud Strategy for Trading View

Creating a trading strategy based on the Ichimoku Cloud involves using its various components to identify potential trading opportunities. Below is a step-by-step guide to a strategy you can use on TradingView:

Ichimoku Cloud Components

  • Tenkan-sen (Conversion Line): 9-period average.
  • Kijun-sen (Base Line): 26-period average.
  • Senkou Span A (Leading Span A): Average of Tenkan-sen and Kijun-sen, plotted 26 periods ahead.
  • Senkou Span B (Leading Span B): 52-period average, plotted 26 periods ahead.
  • Chikou Span (Lagging Span): Closing price plotted 26 periods back.

Basic Trading Strategy

This strategy focuses on trend-following and using the Ichimoku Cloud to identify entry and exit points.

1. Setup in TradingView

  • Add the Ichimoku Cloud indicator to your chart on TradingView.
  • Use the default settings (9, 26, 52) for the Ichimoku Cloud.

2. Entry Rules

  • Buy Signal (Long Position):
    • Price Above Cloud: The current price must be above the Ichimoku Cloud.
    • Bullish Cross: Tenkan-sen crosses above Kijun-sen.
    • Cloud Color: The cloud (between Senkou Span A and Senkou Span B) should be green, indicating an uptrend.
    • Chikou Span: The Chikou Span should be above the price line, confirming bullish momentum.
  • Sell Signal (Short Position):
    • Price Below Cloud: The current price must be below the Ichimoku Cloud.
    • Bearish Cross: Tenkan-sen crosses below Kijun-sen.
    • Cloud Color: The cloud should be red, indicating a downtrend.
    • Chikou Span: The Chikou Span should be below the price line, confirming bearish momentum.

3. Exit Rules

  • For Long Positions:
    • Stop Loss: Place a stop loss slightly below the Kijun-sen (Base Line) or below the cloud.
    • Take Profit: Consider taking profit when the price closes below the Tenkan-sen or when the Tenkan-sen crosses below the Kijun-sen.
  • For Short Positions:
    • Stop Loss: Place a stop loss slightly above the Kijun-sen or above the cloud.
    • Take Profit: Consider taking profit when the price closes above the Tenkan-sen or when the Tenkan-sen crosses above the Kijun-sen.

4. Additional Filters

  • Volume Confirmation: Use volume indicators to confirm the strength of the trend.
  • Timeframe Consideration: This strategy works well on daily and 4-hour charts, but you can adjust it according to your preferred timeframe.

5. Example TradingView Script (Pine Script)

6. Backtesting & Optimization

  • Backtest the strategy on historical data to understand its performance.
  • Adjust parameters like stop loss, take profit levels, and timeframe based on the backtest results.

7. Risk Management

  • Use a risk-reward ratio that suits your trading style (e.g., 1:2).
  • Never risk more than a small percentage of your trading capital on a single trade.

This strategy is trend-following and works well in trending markets. In sideways or choppy markets, consider using additional indicators or avoiding trades altogether.

Modified Trading View Strategy



//@version=4
// Any timeFrame/pair , Ichimoku + Daily-Candle_cross + HULL-MA_cross + custom Hull/MacD combination 420 special blend
strategy("Max Ichimoku2", shorttitle="max ich2", overlay=true, initial_capital=10000, default_qty_type=strategy.percent_of_equity, max_bars_back=2999, default_qty_value=1, commission_type=strategy.commission.cash_per_contract,commission_value=0.5,slippage=1)
Period=input(title="Double HullMA X Period",type=input.integer,defval=14, minval=1)

//GC 200/440, NQ 200/220
SL = input(defval=-200, title="Stop Loss in $", type=input.float, step=0.001)
TP = input(defval=240, title="Target Point in $", type=input.float, step=0.001)
res = input(title="Candle X Resolution", type=input.resolution, defval="D")
price=input(title="Source of Price",type=input.source,defval=close)

//NQ 26, GC 2.2, CL 0.1
luft=input(title="Luft from Cloud", type=input.float, defval=26)
hma1=hma(price, Period)
hma2=hma(price[1], Period)

b=hma1>hma2?color.lime:color.red
c=hma1>hma2?color.green:color.red
d=hma1>hma2?color.red:color.green
D1=security(syminfo.tickerid,  res, price, barmerge.gaps_off, barmerge.lookahead_off)
D2=security(syminfo.tickerid,  res, price[1], barmerge.gaps_off, barmerge.lookahead_off)
conversionPeriod = input(9, minval=1, title="Conversion Line Period")
basePeriod = input(26, minval=1, title="Base Line Period")
laggingSpanPeriod = input(52, minval=1, title="Lagging Span 2 Period")
displacement = input(26, minval=0, title="Displacement")
donchian(len) => avg(lowest(len), highest(len))
conversionLine = donchian(conversionPeriod)
baseLine = donchian(basePeriod)
leadLine1 = avg(conversionLine, baseLine)
leadLine2 = donchian(laggingSpanPeriod)
LS=price, offset = -displacement
MACD_Length = input(9)
MACD_fastLength = input(12)
MACD_slowLength = input(26)
//MACD = hma(price, MACD_fastLength) - hma(price, MACD_slowLength)

MACD = hma(price, MACD_slowLength)

aMACD = hma(MACD, MACD_Length)

//if (strategy.openprofit>TP)
//    strategy.close_all(comment="close all profit")



//plot(cross(hma1, hma2) ? hma1 : na, style=plot.style_circles, color=b, linewidth = 4)// remove the "//" from before the plot script if want to see the indicators on chart
longCondition =   crossover(price,leadLine1) //crossover(low ,leadLine1) and leadLine1>leadLine2 //and close<open
//MACD>aMACD and price> leadLine1
//cross(hma1, hma2)
//hma1>hma2 and  D1>D2 and price>hma2 and leadLine1>leadLine2 and MACD>aMACD

if (longCondition)
    strategy.entry("Long",strategy.long,1,limit=leadLine1)

if(close-strategy.position_avg_price>2*luft )
    strategy.exit("Exit Long", from_entry="Long",stop=close-luft)

shortCondition =   crossunder(price,leadLine1) //crossunder(high, leadLine1)  //and leadLine1<leadLine2 //and close>open  leadLine2-luft
//crossover(leadLine1, leadLine2) and
//MACD<aMACD and price< leadLine1
//hma1<hma2 and D1<D2 and price<hma2 and leadLine1<leadLine2 and MACD<aMACD

if (shortCondition)
    strategy.entry("Short",strategy.short,limit=close)//
    //strategy.exit("Short Exit", from_entry="Short", profit=TP)

//strategy.exit("Exit Short", from_entry="Short", trail_points=5,trail_offset=luft)
if(strategy.position_avg_price-close>2*luft )
    strategy.exit("Exit Short", from_entry="Short",stop=close+luft)


//strategy.exit(trail_price)

if (strategy.openprofit>TP or (strategy.openprofit>0 and shortCondition))
    strategy.close("Long",comment="Profit",alert_message="Long Close Profit")
//strategy.position_size>0 and strategy.openprofit<SL and hma1>hma2 and price>hma2 // or hma1<hma2 and price<hma2
if (strategy.openprofit<SL)
    strategy.close("Long",comment="SL ",alert_message="Long Close SL")

closeshort=strategy.openprofit>TP or strategy.openprofit<SL
// strategy.position_size>0 and strategy.openprofit<SL and hma1<hma2 and price<hma2 // or hma1>hma2 and price>hma2
if (strategy.openprofit>TP or (strategy.openprofit>0 and longCondition) )
    strategy.close("Short",comment="Profit ",alert_message="Short Close Profit")
if (strategy.openprofit<SL)
    strategy.close("Short",comment="SL ",alert_message="Short Close SL")


a1=plot(hma1,color=c)// remove the "//" from before the plot script if want to see the indicators on chart
a2=plot(hma2,color=c)// remove the "//" from before the plot script if want to see the indicators on chart
//plot(shortCondition? hma1-10 : na, style = plot.style_circles, color=color.red, linewidth = 4)// remove the "//" from before the plot script if want to see the indicators on chart

//plot(cross(hma1, hma2) ? hma1 : na, style=plot.style_circles, color=b, linewidth = 4)// remove the "//" from before the plot script if want to see the indicators on chart
//plot(longCondition ? hma1-10 : na, style=plot.style_circles, color=color.green, linewidth = 4)// remove the "//" from before the plot script if want to see the indicators on chart


plot(leadLine1,  color=#0496ff, title="Conversion Line")// remove the "//" from before the plot script if want to see the indicators on chart
plot(baseLine, color=#991515, title="Base Line")// remove the "//" from before the plot script if want to see the indicators on chart
//plot(price, offset = -displacement, color=color.black, title="Lagging Span")// remove the "//" from before the plot script if want to see the indicators on chart
p1=plot (leadLine1, offset = displacement, color=color.green,  title="Lead 1")// remove the "//" from before the plot script if want to see the indicators on chart
p2=plot (leadLine2, offset = displacement, color=color.red,  title="Lead 2")// remove the "//" from before the plot script if want to see the indicators on chart
fill(p1, p2, color = leadLine1 > leadLine2 ? color.green : color.red)// remove the "//" from before the plot script if want to see the indicators on chart
// remove the "//" from before the plot script if want to see the indicators on chart

Overall successful strategy generating profit factor .1.1 and percent profitable 37.1

That resulted in 12000$ profit of NQ futures trading for the month of August 2024  

Similar Posts