本页源码来自 TradingView 公开发布的开源脚本,版权归原作者所有, 请遵循其原始许可(Pine 脚本常见 CC BY-NC-SA / MPL-2.0 / MIT)。 本项目仅用于研究检索与许可范围内的移植。
//@version=6
indicator("TMT", shorttitle="TMT", overlay=true)
// TMT - Show Your Name On Your Chart
// Anyone can add it and type their own name
myText = input.string("Type Your Name Here", "✏️ Write Your Name", tooltip="Type your name, brand or anything you want to show on top of chart")
txtColor = input.color(color.black, "Name Colour", tooltip="Change colour of your name")
txtSize = input.string("Large", "Name Size", options=["Small", "Normal", "Large", "Huge"])
fontLook = input.string("Normal", "Font Look", options=["Normal", "Stylish - Big", "Bold Look", "Premium"])
var table t = table.new(position.top_center, 1, 1)
sz = txtSize == "Small" ? size.small : txtSize == "Normal" ? size.normal : txtSize == "Large" ? size.large : size.huge
finalSize = fontLook == "Bold Look" ? size.huge : fontLook == "Premium" ? size.huge : fontLook == "Stylish - Big" ? size.large : sz
if barstate.islast
table.cell(t, 0, 0, myText, text_color=txtColor, bgcolor=color.new(color.black, 100), text_size=finalSize)