mariarjekan

Ichimoku Cloud-V5a

146 0 18
The indicator for the turbo option on the basis of the indicator Chris Moody.
Remove from Favorite Scripts Add to Favorite Scripts
//Created By User ChrisMoody
//Last Update 10/20/2014
//new Updates include Cloud Color Change based on Trend.based on Trend
//Added ability to turn on/off Tenkan-Sen (9 Period), Kinjun-Sen (26 Period), Chinkou Span (Lagging Line), and "Cloud"
//Correct Plot Names for Alerts
study(title="Ichimoku Cloud-V5a", shorttitle="Ichimoku-V5a", overlay=true)
turningPeriods = input(1, minval=0, title="Tenkan-Sen")
standardPeriods = input(1, minval=0, title="Kinjun-Sen")
leadingSpan2Periods = input(2, minval=0, title="Senkou Span B")
displacement = input(0, minval=0, title="-ChinkouSpan/+SenkouSpan A")
sts = input(false, title="Show Tenkan-Sen (9 Period)?")
sks = input(false, title="Show Kinjun-Sen (26 Period)?")
sll = input(false, title="Show Chinkou Span (Lagging Line)?")
sc = input(true, title="Show Cloud?")
cr1 = input(true, title="Show Crosses up/down Senkou Span A (26 Period) and Senkou Span B (52 Period)?")

//Definitions for Tenkan-Sen (9 Period), Kinjun-Sen (26 Period), Chinkou Span (Lagging Line)
donchian(len) => avg(lowest(len), highest(len))
turning = donchian(turningPeriods)
standard = donchian(standardPeriods)
leadingSpan1 = avg(turning, standard)
leadingSpan2 = donchian(leadingSpan2Periods)

//Crosses up/down Tenkan-Sen (9 Period) and Kinjun-Sen (26 Period)
crossUpleadingSpan1leadingSpan2 = leadingSpan1[1] < leadingSpan2[1] and leadingSpan1 > leadingSpan2 ? 1 : 0
crossDnleadingSpan1leadingSpan2 = leadingSpan1[1] > leadingSpan2[1] and leadingSpan1 < leadingSpan2 ? 1 : 0
cupA = crossUpleadingSpan1leadingSpan2 == 1 ? crossUpleadingSpan1leadingSpan2 : 0
cdnB = crossDnleadingSpan1leadingSpan2 == 1 ? crossDnleadingSpan1leadingSpan2 : 0

//First Definition for Ability to Color Cloud based on Trend.
leadingSpan1Above = leadingSpan1 >= leadingSpan2 ? 1 : na
leadingSpan2Below = leadingSpan1 <= leadingSpan2 ? 1 : na
//Next 4 lines are code used as plots in order to Color Cloud based on Trend
span1plotU = leadingSpan1Above ? leadingSpan1 : na
span2plotU = leadingSpan1Above ? leadingSpan2 : na

span1plotD = leadingSpan2Below ? leadingSpan1 : na
span2plotD = leadingSpan2Below ? leadingSpan2 : na

col = leadingSpan1 >= leadingSpan2 ? lime : red

//plots for 3 lines other than cloud.
plot(sts and turning ? turning : na, title = 'Tenkan-Sen (9 Period)', linewidth=1, color=lime)
plot(sks and standard ? standard : na, title = 'Kinjun-Sen (26 Period)', linewidth=1, color=fuchsia)
plot(sll and close ? close : na, title='Chinkou Span (Lagging Line)', linewidth=1, offset = -displacement, color=aqua)
//Cloud Lines Plot Statements - ***Regular Lines to Fill in Break in Gap
plot(sc and leadingSpan1 ? leadingSpan1 : na, title = 'Senkou Span A (26 Period) Cloud', style=line, linewidth=1, offset = displacement, color=col)
plot(sc and leadingSpan2 ? leadingSpan2 : na, title = 'Senkou Span B (52 Period) Cloud', style=line, linewidth=1, offset = displacement, color=col)
//Cloud Lines Plot Statements - ***linebr to create rules for change in Shading
p1 = plot(sc and span1plotU ? span1plotU  : na, title = 'Senkou Span A (26 Period) Above Span B Cloud', style=linebr, linewidth=1, offset = displacement, color=col)
p2 = plot(sc and span2plotU ? span2plotU  : na, title = 'Senkou Span B (52 Period) Below Span A Cloud', style=linebr, linewidth=1, offset = displacement, color=col)
p3 = plot(sc and span1plotD ? span1plotD  : na, title = 'Senkou Span A (26 Period) Below Span B Cloud', style=linebr, linewidth=1, offset = displacement, color=col)
p4 = plot(sc and span2plotD ? span2plotD  : na, title = 'Senkou Span B (52 Period) Above Span A Cloud', style=linebr, linewidth=1, offset = displacement, color=col)
//Fills that color cloud based on Trend.
fill(p1, p2, color=lime, transp=70, title='Kumo (Cloud)')
fill(p3, p4, color=red, transp=70, title='Kumo (Cloud)')
//Arrow Plots At Tenkan-Sen (9 Period) and Kinjun-Sen (26 Period)


plotshape(cr1 and cupA ? cupA : na,title="Low Plots-Triangle Up", offset=0, style=shape.arrowup, location=location.belowbar, color=teal, transp=0)
plotshape(cr1 and cdnB ? cdnB : na,title="High Plots-Triangle Down", offset=0, style=shape.arrowdown, location=location.abovebar, color=red, transp=0)
United States
United Kingdom
India
Deutschland
España
France
Italia
Polska
Brasil
Россия
Türkiye
Indonesia
Malaysia
日本
한국
简体
繁體
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 Priority Support Feature Request Blog & News FAQ Help & Wiki Twitter
Profile Profile Settings Account and Billing Priority Support Ideas Published Followers Following Private Messages Chat Sign Out