VPT Timeleft v.10
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © vptradingschool

//@version=5
indicator("VPT Timeleft v1", overlay=true)
timeLeft = input(true, title ='Time Counter in Minutes')

// Counter in Minutes
secondsLeft = barstate.isrealtime ?
     (time_close - timenow) / 1000 :
     100

if (timeLeft == true) 
    liveGuide_label = label.new(x=bar_index, y=high, color=(secondsLeft < 59? #e60000: color.teal), textcolor=color.white, style=label.style_label_left) 
    label.set_text(id=liveGuide_label, text=(secondsLeft == 100? "❤": str.tostring ( int(secondsLeft/60) ) + "." + (math.round(secondsLeft % 60,0) < 10? "0" : "") + str.tostring( math.round(secondsLeft % 60,0) ) + " m"))
    label.set_xy(liveGuide_label,bar_index[0] +3 ,close) // VPTDC instead of linePrice
    label.delete(liveGuide_label[1])

