ChrisMoody

CM_Gap_Indicator_Intra-Day_V1

CM_Gap_Indicator_Intra-Day_V1

This is a Simple Gap Indicator.

Version 1…Many Additional Features To Come.

***Designed for Intra-Day Charts.
***Great for Stocks…Forex and Futures Sunday Night Gaps.

***Plots Green Lines If Gap Up
***Plots Red Lines If Gap Down

Additional Filters Coming Soon:
***Minimum Gap% Filter
***Gap Mid Lines
***Color Coding On Filled Gaps

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?
//Created By ChrisMoody on 1-15-2015
//Version 1...More Features Coming Soon...

study(title="CM_Gap_Indicator_Intra-Day_V1", shorttitle="CM_Gaps_Intra-Day_V1", overlay=true)

tdo = security(tickerid, 'D', open)
pdc = security(tickerid, 'D', close[1])
pdh = security(tickerid, 'D', high[1])
pdl = security(tickerid, 'D', low[1])

gapUp = tdo > pdc ? 1 : 0

plotGapUpLine = gapUp ? tdo : na
plotGapUpLowLine = gapUp ? pdc : na

gapDn = tdo < pdc ? 1 : 0

plotGapDnLine = gapDn ? tdo : na
plotGapDnPDC = gapDn ? pdc : na

plot(plotGapUpLine, title="Gap Up - Upper Gap Line, Todays Open", style=circles, linewidth=3, color=lime)
plot(plotGapUpLowLine, title="Gap Up - Lower Gap Line, Yesterdays Close", style=circles, linewidth=3, color=lime)

plot(plotGapDnLine, title="Gap Down - Lower Gap Line, Todays Open", style=circles, linewidth=3, color=red)
plot(plotGapDnPDC, title="Gap Down - Upper Gap Line, Yesterdays Close", style=circles, linewidth=3, color=red)