OPEN-SOURCE SCRIPT
Updated Minute speciale universale (3,11,17,29,41,47,53,59)

//version=5
indicator("Minute speciale universale (3,11,17,29,41,47,53,59)", overlay=true, max_labels_count=500)
// lista de minute speciale
var int[] specials = array.from(3, 11, 17, 29, 41, 47, 53, 59)
// minutul de start al barei (0..59)
mStart = minute(time)
// durata barei (secunde) -> minute
secInBar = timeframe.in_seconds(timeframe.period)
isIntraday = timeframe.isintraday
minutesInBar = (isIntraday and not na(secInBar)) ? math.max(1, int(math.ceil(secInBar / 60.0))) : 0
// caută dacă vreo valoare din `specials` cade în intervalul barei
bool hit = false
var int first = na
if minutesInBar > 0
for i = 0 to array.size(specials) - 1
s = array.get(specials, i)
delta = (s - mStart + 60) % 60
if delta < minutesInBar
hit := true
if na(first)
first := s
// etichetă (o singură linie ca să evităm parse issues)
if hit
label.new(bar_index, high, str.tostring(first), xloc=xloc.bar_index, yloc=yloc.abovebar, style=label.style_label_up, color=color.black, textcolor=color.white, size=size.tiny)
indicator("Minute speciale universale (3,11,17,29,41,47,53,59)", overlay=true, max_labels_count=500)
// lista de minute speciale
var int[] specials = array.from(3, 11, 17, 29, 41, 47, 53, 59)
// minutul de start al barei (0..59)
mStart = minute(time)
// durata barei (secunde) -> minute
secInBar = timeframe.in_seconds(timeframe.period)
isIntraday = timeframe.isintraday
minutesInBar = (isIntraday and not na(secInBar)) ? math.max(1, int(math.ceil(secInBar / 60.0))) : 0
// caută dacă vreo valoare din `specials` cade în intervalul barei
bool hit = false
var int first = na
if minutesInBar > 0
for i = 0 to array.size(specials) - 1
s = array.get(specials, i)
delta = (s - mStart + 60) % 60
if delta < minutesInBar
hit := true
if na(first)
first := s
// etichetă (o singură linie ca să evităm parse issues)
if hit
label.new(bar_index, high, str.tostring(first), xloc=xloc.bar_index, yloc=yloc.abovebar, style=label.style_label_up, color=color.black, textcolor=color.white, size=size.tiny)
Release Notes
//version=5indicator("Minute speciale – vizibil & deasupra candelei", overlay=true, max_labels_count=500)
// lista minute speciale
var int[] SPECIALS = array.from(3, 11, 17, 29, 41, 47, 53, 59)
// minutul de start al barei (0..59)
mStart = minute(time)
// durata barei -> minute (intraday)
secInBar = timeframe.in_seconds(timeframe.period)
isIntraday = timeframe.isintraday
minutesInBar = (isIntraday and not na(secInBar)) ? math.max(1, int(math.ceil(secInBar / 60.0))) : 0
// adună toate minutele speciale din interiorul barei
string txt = ""
if minutesInBar > 0
for i = 0 to array.size(SPECIALS) - 1
s = array.get(SPECIALS, i)
delta = (s - mStart + 60) % 60
if delta < minutesInBar
txt := txt == "" ? str.tostring(s) : txt + ", " + str.tostring(s)
// etichetă mare, exact deasupra candelei (apel pe o singură linie)
if (txt != "")
pad = math.max(ta.atr(14) * 0.03, syminfo.mintick * 10)
label.new(bar_index, high + pad, txt, xloc=xloc.bar_index, yloc=yloc.price, style=label.style_label_up, color=color.new(color.black, 85), textcolor=color.white, size=size.huge)
Release Notes
//version=5indicator("Minute speciale – toate deasupra candelei", overlay=true, max_labels_count=500)
// minutele speciale
var int[] SPECIALS = array.from(3, 11, 17, 29, 41, 47, 53, 59)
// minutul de început al barei (0..59)
mStart = minute(time)
// durata barei -> minute (doar intraday)
secInBar = timeframe.in_seconds(timeframe.period)
isIntraday = timeframe.isintraday
minutesInBar = (isIntraday and not na(secInBar)) ? math.max(1, int(math.ceil(secInBar / 60.0))) : 0
// text cu TOATE minutele speciale cuprinse în bară (ex. "3, 11")
string txt = ""
if minutesInBar > 0
for i = 0 to array.size(SPECIALS) - 1
s = array.get(SPECIALS, i)
delta = (s - mStart + 60) % 60
if delta < minutesInBar
txt := (txt == "") ? str.tostring(s) : (txt + ", " + str.tostring(s))
// etichetă: text mic, fix deasupra candelei, FĂRĂ multiline în apelul label.new
if (txt != "")
label.new(bar_index, na, txt, xloc=xloc.bar_index, yloc=yloc.abovebar, style=label.style_none, textcolor=color.white, size=size.tiny)
Release Notes
//version=5indicator("Minute speciale – vizibile deasupra candelei", overlay=true, max_labels_count=500)
// minutele speciale
var int[] SPECIALS = array.from(3, 11, 17, 29, 41, 47, 53, 59)
// minutul de început al barei
mStart = minute(time)
// durata barei în minute (intraday only)
secInBar = timeframe.in_seconds(timeframe.period)
isIntraday = timeframe.isintraday
minutesInBar = (isIntraday and not na(secInBar)) ? math.max(1, int(math.ceil(secInBar / 60.0))) : 0
// text cu toate minutele speciale din bară
string txt = ""
if minutesInBar > 0
for i = 0 to array.size(SPECIALS) - 1
s = array.get(SPECIALS, i)
delta = (s - mStart + 60) % 60
if delta < minutesInBar
txt := txt == "" ? str.tostring(s) : txt + ", " + str.tostring(s)
// eticheta: text clar, galben, exact deasupra fiecărei candele
if (txt != "")
label.new(bar_index, high + syminfo.mintick * 20, txt, xloc=xloc.bar_index, yloc=yloc.price, style=label.style_none, textcolor=color.yellow, size=size.large)
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.