Code:
study("DOW GAP")
higherRes = input("15", type=resolution)
is_newbar(res) =>
t = time(res)
change(t) != 0 ? 1 : 0
o = security("US30", higherRes, open)
h = security("US30", higherRes, high)
l = security("US30", higherRes, low)
c = security("US30", higherRes, close)
plotcandle(is_newbar(higherRes) ? o : na, h, l, c, color=c >= o ? lime : red)
source: https://www.tradingview.com/script/ZWm7ExOD-DAX-GAPS/