Code: Select all
//@version=5
indicator("My script", overlay = true, max_labels_count = 500)
high5min = request.security(syminfo.tickerid, "5", high)
bar5Index = request.security(syminfo.tickerid, "5", bar_index)
// Bug visualization
label.new( bar_index, low, yloc = yloc.belowbar,
text = "5 min\nbar_index\n" + str.tostring(bar5Index, "#"),
textcolor = color.new(color.red, 10),
color = color.new(color.black, 20), style = label.style_label_up)
label.new( bar_index, low, yloc = yloc.abovebar,
text = "5 min\nhigh\n" + str.tostring(high5min, "#.00"),
textcolor = color.new(color.green, 10),
color = color.new(color.black, 20), style = label.style_label_down)
