//@version=2
//FxLowe - NR4 & NR7.
study(title = "NR4 & NR7", overlay = true)
insidebar = (high < high[1] and low > low[1])
nr4 = (tr <= tr[1]) and (tr <= tr[2]) and (tr <= tr[3])
nr7 = nr4 and (tr <= tr[4]) and (tr <= tr[5]) and (tr <= tr[6])
nr13= nr7 and (tr <= tr[7]) and (tr <= tr[8]) and (tr <= tr[9]) and (tr <= tr[10]) and (tr <= tr[11]) and (tr <= tr[12])
nr21 = nr13 and (tr <= tr[13]) and (tr <= tr[14]) and (tr <= tr[15]) and (tr <= tr[16]) and (tr <= tr[17]) and (tr <= tr[18]) and (tr <= tr[19]) and (tr <= tr[20])
nr7ib = nr7 and insidebar
//barcolor( nr7 ? fuchsia : na, offset = 0, editable = true, title = "NR7")
//barcolor( nr4 ? blue : na, offset = 0, editable = true, title = "NR4")
//plotshape(nr4, title= "NR4", location=location.abovebar, color=white, style=shape.arrowdown, text="NR\n4")
plotshape(nr7, title= "NR7", location=location.abovebar, color=white, style=shape.arrowdown, text="NR\n7")
//plotshape(nr7, title= "NR21", location=location.abovebar, color=white, style=shape.arrowdown, text="NR\n21")