Symbol Viewer
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © SamRecio

//@version=5
indicator("Symbol Viewer", shorttitle = "🔎")
//Settings
ticker = input.symbol("TICK", title = "Symbol:", inline = "1")
green = input.color(#26a69a, title = "Up Color", inline = "2")
red = input.color(#ef5350, title = "Down Color", inline = "2")
//Grabbing Values
[tick_open,tick_high,tick_low,tick_close] = request.security(ticker, "", [open,high,low,close])
//Candle Color
rg = tick_open > tick_close ? red : tick_open < tick_close ? green : color.gray
//Plotting
plotcandle(tick_open, tick_high,tick_low,tick_close, title = "Symbol", color = rg, wickcolor = rg, bordercolor = rg, editable = false)
plot(tick_open, display = display.none, title = "Open")
plot(tick_high, display = display.none, title = "High")
plot(tick_low, display = display.none, title = "Low")
plot(tick_close, display = display.none, title = "Close")
//Tracking Line
l1 = line.new(bar_index, tick_close, bar_index - 1, tick_close, extend = extend.both, color = rg, style = line.style_dotted)
line.delete(l1[1])
lab1 = label.new(bar_index + 10, tick_close, text = ticker + "\n" + str.tostring(tick_close), size = size.normal, style = label.style_none, textcolor = rg, textalign = text.align_left)
label.delete(lab1[1])
hline(0, title = "Zero Line")