vdubus

London_Underground_V0

www.vdubus.co.uk/
Another coding mashup experiment
It's as simple as London Underground, when price exits the 'RED' main line board the train & get off at the next platform :)

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.

Want to use this script on a chart?
study("London_Underground_V0", shorttitle="London_Underground_V0", overlay=true)
len = input(21, minval=1, title="Length")
src = input(close, title="Source")
out = ema(src, len)
plot(out, title="EMA", color=blue)
last8h = highest(close,13)
lastl8 = lowest(close, 13)

plot(last8h, color=black,style=line, linewidth=3, title="Upper channel")
plot(lastl8, color=black,style=line, linewidth=3, title="Lower channel")

bearish = cross(close,out) == 1 and close[1] > close 
bullish = cross(close,out) == 1 and close[1] < close 
//======{RS}=======================================================================//
tf = input('240')
M = input('ATR')
P = input(14.00, type=float)
W = input(1)
pf = pointfigure(tickerid, 'close', M, P, W)
spfc = security(pf, tf, close)
p2 = plot(spfc, color=red, linewidth=4, title="Central Line")
//============================Ichomku---------------------------------------------//
show_cloud = input(true, title="Display Ichimoku Cloud:")
conversionPeriods = input(34, minval=1)
basePeriods = input(26, minval=1)
laggingSpan2Periods = input(52, minval=1)
displacement = input(26, minval=1)
donchian(len) => avg(lowest(len), highest(len))
conversionLine = donchian(conversionPeriods)
baseLine = donchian(basePeriods)
leadLine1 = avg(conversionLine, baseLine)
leadLine2 = donchian(laggingSpan2Periods)
plot(not show_cloud ? na : conversionLine, color=green,linewidth=3, style=line, title="Mid line resistance levels")
plot(baseLine, color=maroon, linewidth=4, title="Base Line")

p1 = plot(not show_cloud ? na : leadLine1, offset = displacement, color=white, linewidth=1, title="Lead 1")
p3 = plot(not show_cloud ? na : leadLine2, offset = displacement, color=blue, linewidth=4, title="Lead 2")
fill(p1, p3, color=blue, transp=100)
//----------------------------------------------------------------------------////