Tracha

Ichimoku Cloud ALERT v 1.2

221 3 28
Now Price must to be above red line to buy and below to sell
Remove from Favorite Scripts Add to Favorite Scripts
study(title="Ichimoku Cloud", shorttitle="Ichimoku", overlay=true)

conversionPeriods = input(9, minval=1),
basePeriods = input(26, minval=1)
laggingSpan2Periods = input(52, minval=1)
EMAno1 = input(21, minval=1)
EMAno2 = input(144, minval=1)
EMAno3 = input(377, minval=1)
displacement = basePeriods

donchian(len) => avg(lowest(len), highest(len))

conversionLine = donchian(conversionPeriods)
baseLine = donchian(basePeriods)
leadLine1 = avg(conversionLine, baseLine)
leadLine2 = donchian(laggingSpan2Periods)

plot(conversionLine, color=red, title="Conversion Line")
plot(baseLine, color=blue, title="Base Line")
plot(close, offset = -displacement, color=green, title="Lagging Span")

p1 = plot(leadLine1, offset = displacement, color=green,
    title="Lead 1")
p2 = plot(leadLine2, offset = displacement, color=red, 
    title="Lead 2")

ema1=ema(close,EMAno1)
ema2=ema(close,EMAno2)
ema3=ema(close,EMAno3)

//sell signals
signal1 = baseLine > conversionLine

signal2 = close <= ema1
signal2a = close <= ema2
signal2b = close <= ema3

bottomcloud=leadLine2[displacement-1]
uppercloud=leadLine1[displacement-1]

signal3 = close<bottomcloud
signal3a = close[1]>bottomcloud[1]
signal3b = bottomcloud<uppercloud

signal4 = close<low[displacement]

signal5 = close < conversionLine
sellsignal = signal1 and signal2 and signal2a and signal2b and signal3 and signal3a and signal3b 
        and signal4 and signal5
plotchar(sellsignal, char='S', color=red, location=location.abovebar)
barcolor(sellsignal ? yellow : na)

signal3x = close<uppercloud
signal3ax = close[1]>uppercloud[1]
signal3bx = bottomcloud>uppercloud
sellsignal2 = signal1 and signal2 and signal2a and signal2b and signal3x and signal3ax 
            and signal3bx and signal4 and signal5
            
plotchar(sellsignal2, char='S', color=red, location=location.abovebar)
barcolor(sellsignal2 ? yellow : na)

/// buy signals
nsignal1 = baseLine < conversionLine

nsignal2 = close >= ema1
nsignal2a = close >= ema2
nsignal2b = close >= ema3

nsignal3 = close>uppercloud
nsignal3a = close[1]<uppercloud[1]
nsignal3b = bottomcloud<uppercloud

nsignal4 = close>high[displacement]

nsignal5 = close>conversionLine
 
buysignal = nsignal1 and nsignal2 and nsignal2a and nsignal2b and nsignal3 and nsignal3a 
        and signal3b and nsignal4 and nsignal5
plotchar(buysignal, char='B', color=blue, location=location.belowbar)
barcolor(buysignal ? blue : na)

nsignal3x = close>uppercloud
nsignal3ax = close[1]<uppercloud[1]
nsignal3bx = bottomcloud<uppercloud
buysignal2 = nsignal1 and nsignal2 and nsignal2a and nsignal2b and nsignal3x and nsignal3ax 
        and signal3bx and nsignal4 and nsignal5
        
plotchar(buysignal2, char='B', color=blue, location=location.belowbar)
barcolor(buysignal2 ? blue : na)

fill(p1, p2)
It would be great to show all confirmation signals, or make them selectable...
Say:

-Price above cloud, buy
-tenkan crosses over kijun, buy
-chikou over price or over cloud, buy

What do you think?
I'll try to modify the code myself meanwhile.

(have this work with the TV beta alerts would be epic)
+1 Reply
Tracha IvanLabrie
Yes, this is on my TODO list :)
+1 Reply
Excellent :D
I tried it but couldn't get the signals to disappear btw...if unchecking stuff from the menu.
Reply
United States
United Kingdom
India
Deutschland
France
España
Italia
Polska
Türkiye
Россия
Brasil
Indonesia
Malaysia
ประเทศไทย
Việt Nam
日本
한국
简体
繁體
Home Stock Screener Forex Signal Finder Cryptocurrency Signal Finder Economic Calendar How It Works Chart Features House Rules Moderators Website & Broker Solutions Widgets Stock Charting Library Feature Request Blog & News FAQ Help & Wiki Twitter
Profile Profile Settings Account and Billing My Support Tickets Contact Support Ideas Published Followers Following Private Messages Chat Sign Out