Untitled

mail@pastecode.io avatar
unknown
plain_text
7 months ago
757 B
8
Indexable
Never
[pine{curr_time = str.tostring(hour(timenow), "00:") + str.tostring(minute(timenow), "00:") + str.tostring(second(timenow), "00")
label blabel = na 
label slabel = na 
if above and show_labels
    blabel := label.new(x=bar_index, y=0, text=curr_time, xloc=xloc.bar_index, yloc = yloc.belowbar, textalign=text.align_left,style=label.style_label_up, color = color.new(color.white,0),textcolor=color.black, size=size.normal)
    label.delete(blabel[1])
else
    if below and show_labels
        slabel := label.new(x=bar_index, y=0, text=curr_time, xloc=xloc.bar_index, yloc = yloc.abovebar, textalign=text.align_left,style=label.style_label_down, color = color.new(color.white,0),textcolor=color.black, size=size.normal)
        label.delete(slabel[1])[/pine]