OPEN-SOURCE SCRIPT
Manish 3 EMA with Auto Lines + Numbers

//version=5
indicator("Manish 3 EMA with Auto Lines + Numbers", overlay=true)
// === Input for EMAs ===
ema9Length = input.int(9, title="EMA 9")
ema15Length = input.int(15, title="EMA 15")
ema44Length = input.int(44, title="EMA 44")
// === Calculate EMAs ===
ema9 = ta.ema(close, ema9Length)
ema15 = ta.ema(close, ema15Length)
ema44 = ta.ema(close, ema44Length)
// === Plot EMAs ===
plot(ema9, color=color.new(color.green, 0), title="EMA 9", linewidth=2)
plot(ema15, color=color.new(color.red, 0), title="EMA 15", linewidth=2)
plot(ema44, color=color.new(color.yellow,0), title="EMA 44", linewidth=2)
// === Variables for lines and labels ===
var line line9 = na
var line line15 = na
var line line44 = na
var label label9 = na
var label label15 = na
var label label44 = na
if barstate.islast
// Delete previous lines and labels
line.delete(line9)
line.delete(line15)
line.delete(line44)
label.delete(label9)
label.delete(label15)
label.delete(label44)
// Draw new solid lines (1px)
line9 := line.new(bar_index - 1, ema9, bar_index, ema9, extend=extend.right, color=color.new(color.green, 0), width=1)
line15 := line.new(bar_index - 1, ema15, bar_index, ema15, extend=extend.right, color=color.new(color.red, 0), width=1)
line44 := line.new(bar_index - 1, ema44, bar_index, ema44, extend=extend.right, color=color.new(color.yellow, 0), width=1)
// Add small number labels near lines
label9 := label.new(bar_index, ema9, "9", style=label.style_label_left, color=color.new(color.green, 0), textcolor=color.white, size=size.tiny)
label15 := label.new(bar_index, ema15, "15", style=label.style_label_left, color=color.new(color.red, 0), textcolor=color.white, size=size.tiny)
label44 := label.new(bar_index, ema44, "44", style=label.style_label_left, color=color.new(color.yellow, 0), textcolor=color.black, size=size.tiny)
indicator("Manish 3 EMA with Auto Lines + Numbers", overlay=true)
// === Input for EMAs ===
ema9Length = input.int(9, title="EMA 9")
ema15Length = input.int(15, title="EMA 15")
ema44Length = input.int(44, title="EMA 44")
// === Calculate EMAs ===
ema9 = ta.ema(close, ema9Length)
ema15 = ta.ema(close, ema15Length)
ema44 = ta.ema(close, ema44Length)
// === Plot EMAs ===
plot(ema9, color=color.new(color.green, 0), title="EMA 9", linewidth=2)
plot(ema15, color=color.new(color.red, 0), title="EMA 15", linewidth=2)
plot(ema44, color=color.new(color.yellow,0), title="EMA 44", linewidth=2)
// === Variables for lines and labels ===
var line line9 = na
var line line15 = na
var line line44 = na
var label label9 = na
var label label15 = na
var label label44 = na
if barstate.islast
// Delete previous lines and labels
line.delete(line9)
line.delete(line15)
line.delete(line44)
label.delete(label9)
label.delete(label15)
label.delete(label44)
// Draw new solid lines (1px)
line9 := line.new(bar_index - 1, ema9, bar_index, ema9, extend=extend.right, color=color.new(color.green, 0), width=1)
line15 := line.new(bar_index - 1, ema15, bar_index, ema15, extend=extend.right, color=color.new(color.red, 0), width=1)
line44 := line.new(bar_index - 1, ema44, bar_index, ema44, extend=extend.right, color=color.new(color.yellow, 0), width=1)
// Add small number labels near lines
label9 := label.new(bar_index, ema9, "9", style=label.style_label_left, color=color.new(color.green, 0), textcolor=color.white, size=size.tiny)
label15 := label.new(bar_index, ema15, "15", style=label.style_label_left, color=color.new(color.red, 0), textcolor=color.white, size=size.tiny)
label44 := label.new(bar_index, ema44, "44", style=label.style_label_left, color=color.new(color.yellow, 0), textcolor=color.black, size=size.tiny)
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.