UnknownUnicorn187266

Gap Finder - Max Warren

Finds gaps. Nuff said

Ill make an overlay version
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(title="Gap Finder - Max Warren", shorttitle="GapFinder-MW", overlay=false, precision=4)
ldist = high-low[1]
hdist = high[1]-low

gline=input(true, title="Display lines")
zline=input(true, title="Zero line")
ldistout = gline==true ? ldist : na
hdistout = gline==true ? hdist : na
zout = zline==true ? 0 : na
plot(ldistout)
plot(hdistout)
hline(zout, linestyle=dotted)

cgapup = #ff0000
cgapdown = #f0ff0f
cnogap = na
gapthing = high[1] < low ? cgapup : low[1] > high ? cgapdown : cnogap
bgcolor(gapthing, transp=60)