OPEN-SOURCE SCRIPT
Cập nhật 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)
Phát hành các Ghi chú
//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)
Phát hành các Ghi chú
//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)
Phát hành các Ghi chú
//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)
Mã nguồn mở
Theo đúng tinh thần TradingView, người tạo ra tập lệnh này đã biến tập lệnh thành mã nguồn mở để các nhà giao dịch có thể xem xét và xác minh công năng. Xin dành lời khen tặng cho tác giả! Mặc dù bạn có thể sử dụng miễn phí, nhưng lưu ý nếu đăng lại mã, bạn phải tuân theo Quy tắc nội bộ của chúng tôi.
Thông báo miễn trừ trách nhiệm
Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, người tạo ra tập lệnh này đã biến tập lệnh thành mã nguồn mở để các nhà giao dịch có thể xem xét và xác minh công năng. Xin dành lời khen tặng cho tác giả! Mặc dù bạn có thể sử dụng miễn phí, nhưng lưu ý nếu đăng lại mã, bạn phải tuân theo Quy tắc nội bộ của chúng tôi.
Thông báo miễn trừ trách nhiệm
Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.