// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/ // © JalenTrades — https://jalentrades.com/tools/pine //@version=5 indicator("JalenRange") i = input(defval = -1) j = input(title = "Look Back", defval = 100) total = high - low total2 = math.abs(open - close) plot(total, style = plot.style_columns, title = "HLRange", color = color.orange) plot(total[1], title = "pRange", color = color.gray, show_last = i) plot(title = "Avg", series = ta.sma(total, j)) plot(ta.highest(total, j), title = "High") plot(ta.lowest(total, j), title = "Low") plot(total2, style = plot.style_columns, title = "OCRange", color = color.purple)