JDN

Ichimoku V5 by ChrisMoody - Daily Kijun Mod by JDN

Ichimoku V5 by ChrisMoody with Daily Kijun-Sen Mod by JDN            

This indicator has been modified to allow you to display the Daily Kijun-Sen on all time frames.
Remove from Favorite Scripts Add to Favorite Scripts
//Created By User ChrisMoody
//Modified by JDN
//Last Update 22/04/2015
//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
//
//JDN - Credit to ChrisMoody for this indicator - I've added one small thing, the ability to have the Daily Kijun-sen displayed on all timeframes
//Enjoy!
study(title="Ichimoku V5 by ChrisMoody - Daily Kijun Mod by JDN", shorttitle="Ichimoku V5 by ChrisMoody - Daily Kijun Mod by JDN", overlay=true)
turningPeriods = input(9, minval=1, title="Tenkan-Sen")
standardPeriods = input(26, minval=1, title="Kinjun-Sen")
leadingSpan2Periods = input(52, minval=1, title="Senkou Span B")
displacement = input(26, minval=1, title="-ChinkouSpan/+SenkouSpan A")
sts = input(true, title="Show Tenkan-Sen (9 Period)?")
sks = input(true, title="Show Kijun-Sen (26 Period)?")
sdks = input(true, title="Show Daily Kijun-Sen on all timeframes (26 Period)?")
sll = input(true, title="Show Chinkou Span (Lagging Line)?")
sc = input(true, title="Show Cloud?")
cr1 = input(false, title="Show Crosses up/down Tenkan-Sen (9 Period) and Kinjun-Sen (26 Period?")

//Definitions for Tenkan-Sen (9 Period), Kinjun-Sen (26 Period), Chinkou Span (Lagging Line)
donchian(len) => avg(lowest(len), highest(len))
donchianDaily(len) => avg( security(tickerid, 'D', lowest(len)), security(tickerid, 'D', highest(len)))

turning = donchian(turningPeriods)
standard = donchian(standardPeriods)
leadingSpan1 = avg(turning, standard)
leadingSpan2 = donchian(leadingSpan2Periods)
DailyKijun = donchianDaily(standardPeriods)

//Crosses up/down Tenkan-Sen (9 Period) and Kinjun-Sen (26 Period)
crossUpTenkanKinjun = turning[1] < standard[1] and turning > standard ? 1 : 0
crossDnTenkanKinjun = turning[1] > standard[1] and turning < standard ? 1 : 0
cupA = crossUpTenkanKinjun == 1 ? crossUpTenkanKinjun : 0
cdnB = crossDnTenkanKinjun == 1 ? crossDnTenkanKinjun : 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 ? blue : 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=blue)
plot(sdks and DailyKijun ? DailyKijun : na, title = 'Daily Kinjun-Sen (26 Period)', linewidth=1, color=black)


plot(sll and close ? close : na, title='Chinkou Span (Lagging Line)', linewidth=1, offset = -displacement, color=#FF1493)
//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=blue, 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)
plotarrow(cr1 and cupA ? cupA : na, title="CrossUp Tenkan Kinjun Entry Arrow", colorup=yellow, maxheight=90, minheight=50, transp=0)
plotarrow(cr1 and cdnB*-1 ? cdnB*-1 : na, title="CrossDn Tenkan Kinjun Entry Arrow", colordown=yellow, maxheight=90, minheight=50, transp=0)
Ideas Scripts Chart
United States
United Kingdom
India
España
Italia
Brasil
Россия
Türkiye
日本
한국
Home Stock Screener Economic Calendar How It Works Chart Features House Rules Moderators For the WEB Widgets Stock Charting Library Priority Support Feature Request Blog & News FAQ Help & Wiki Twitter
Private Messages Chat Ideas Published Followers Following Priority Support Public Profile Profile Settings Billing Sign Out