OPEN-SOURCE SCRIPT
XI0033 Watermark

A watermark earns nothing. It labels a chart: whose it is, what instrument, what timeframe, and what price was doing when the snapshot was taken. If you publish charts, record trades or stream, that label is the difference between a screenshot and a document.
This script prints up to four lines of text over the chart: three free lines and one symbol line. Any line can carry live tokens that resolve to the current symbol, timeframe, date, weekday, clock, price, change against the previous daily, weekly or monthly close, and volume. It draws text and nothing else: no levels, no signals, no analysis.
One template language for every line
Each line is a template. Plain text stays as typed; tokens are replaced with live values:
{ticker} {exchange} {tf} {date} {time} {dow} {price} {chgabs} {chg} {chg:D} {chg:W} {chg:M} {vol}
{chg} is the percent change against the previous daily close — the same number the quote header shows. {chg:W} and {chg:M} measure against the previous weekly and monthly closes. {chgabs} is the daily change in price units, {dow} is the weekday name, {vol} is the current bar's volume compacted to K/M/B and printed as n/a where the instrument has no volume feed. Separators are typed straight into the template, so reordering a line is just reordering its text. An empty template hides the line.
The two free lines under the brand text are plain templates: one prints the daily, weekly and monthly change side by side, the other stamps the date and the exchange clock. What is typed is what resolves; the line at the bottom of the chart is the symbol line running its own template.
The symbol line
The fourth line ships with a default template that mirrors the quote header:
{exchange}:{ticker} · {tf} · {date} · {dow} · {price} · {chgabs} · {chg} · {vol}
It is an ordinary template line: delete a token you do not want, move the ones you keep, retype the separators. Nothing in its order is hardcoded.
Sign colouring, token by token
A Pine table cell holds exactly one text colour. To paint the price green and the weekly change red inside one line, the script slices the symbol line into segments: every {price}, {chgabs} and change token becomes its own cell, coloured by the sign of its own change — {price}, {chgabs} and {chg} follow the daily change, {chg:W} the weekly, {chg:M} the monthly. The text between tokens keeps the line colour. Turn the option off and the line renders as a single cell in a single colour. The one visible cost of the segmented mode is worth naming: cell padding makes the gaps around coloured tokens slightly wider than a plain space.
Sign colouring on: the daily percent carries the daily sign; the weekly percent, marked W and appended at the end of the template, carries its own — one line, two directions, base colour in between.
Nine anchors and offsets that tables do not have
Every line is anchored independently to one of nine chart positions. Lines that land on the same anchor do not overlap: they are collected into one table and stacked in declaration order — Line 1 above Line 2 above Line 3 above the symbol line.
Pine tables expose no pixel offset, so Offset X and Y are built from geometry instead: an empty spacer column sized in percent of chart width pushes a group inward from a left or right edge, and an empty spacer row sized in percent of chart height pushes it away from the top or bottom. X is ignored on a centered anchor and Y on a middle one, because there is no edge to push from. When several lines share an anchor, the group takes the offsets of its first line.
Four lines on four different anchors, each block its own table; the corner blocks are pushed inward from their edges by the spacer offsets.
Every line is yours
Per line: colour, size from 8 to 80, Default or Monospace font, bold, italic. A free line can additionally colour itself as a whole by the sign of the change token it contains. Global: the Positive/Negative pair used by all sign colouring, an extra transparency slider that fades every line on top of its own colour, and a background fill behind the text blocks.
What repaints, and what does not
Nothing is drawn on historical bars, so there is nothing to repaint in the signal sense. The tables are rebuilt on the last bar and every token updates with the live tape — price, changes and volume move tick by tick, which is what a live watermark is for. The previous daily, weekly and monthly closes are requested from the higher timeframes with a one-bar offset, so only completed bars are read and those references stay fixed until their period rolls over. {date}, {time} and {dow} follow the exchange clock, not bar time.
What is actually original here
A chart watermark is public domain — the platform has plenty, and another script that prints a static string would have no reason to exist. Three parts of this one are engineering rather than styling, and the source is open, so they can be read:
A single token engine for all four lines. One substitution pass resolves thirteen tokens, including three change bases — daily, weekly, monthly — measured the way the quote header measures them, so the symbol line and the free lines speak the same language.
Per-token colouring inside one table row. The symbol line is split into cells at token boundaries so each value carries the sign colour of its own change, while single-colour lines sharing the anchor are merged across the full row width and stay centered above the segmented one.
Offsets that Pine tables do not offer. Anchoring, stacking and two-axis fine-tuning are assembled from table geometry — spacer cells sized in percent of the pane — because the platform provides no pixel offset for tables.
What it does not do
It computes nothing tradeable. No levels, no signals, no alerts, no statistics — it reads the same values the quote header already shows and prints them where and how you want them. It is a labelling tool; the trading remains your job.
The Inputs allow you to set:
- Line 1–3: template text, colour, size, font (Default/Monospace), bold, italic, colour by change sign, anchor (vertical and horizontal), Offset X and Y
- Symbol line: show/hide, template text, colour price/change by sign, colour, size, font, bold, italic, anchor, Offset X and Y
- Appearance: Positive and Negative colours, extra transparency, background colour
About the chart
BYBIT:BTCUSDT.P, 5-minute chart. The only script on it is this one, and the three free lines stack at the top center on their default texts — XI0033 with a panda emoji, then the Example and Your text here placeholders. The symbol line sits at the bottom center; its template is trimmed to the exchange, ticker, timeframe, date, weekday and the daily percent change, and sign colouring paints that percent by the sign of the day. No other indicators, no drawings.
This script prints up to four lines of text over the chart: three free lines and one symbol line. Any line can carry live tokens that resolve to the current symbol, timeframe, date, weekday, clock, price, change against the previous daily, weekly or monthly close, and volume. It draws text and nothing else: no levels, no signals, no analysis.
One template language for every line
Each line is a template. Plain text stays as typed; tokens are replaced with live values:
{ticker} {exchange} {tf} {date} {time} {dow} {price} {chgabs} {chg} {chg:D} {chg:W} {chg:M} {vol}
{chg} is the percent change against the previous daily close — the same number the quote header shows. {chg:W} and {chg:M} measure against the previous weekly and monthly closes. {chgabs} is the daily change in price units, {dow} is the weekday name, {vol} is the current bar's volume compacted to K/M/B and printed as n/a where the instrument has no volume feed. Separators are typed straight into the template, so reordering a line is just reordering its text. An empty template hides the line.
The symbol line
The fourth line ships with a default template that mirrors the quote header:
{exchange}:{ticker} · {tf} · {date} · {dow} · {price} · {chgabs} · {chg} · {vol}
It is an ordinary template line: delete a token you do not want, move the ones you keep, retype the separators. Nothing in its order is hardcoded.
Sign colouring, token by token
A Pine table cell holds exactly one text colour. To paint the price green and the weekly change red inside one line, the script slices the symbol line into segments: every {price}, {chgabs} and change token becomes its own cell, coloured by the sign of its own change — {price}, {chgabs} and {chg} follow the daily change, {chg:W} the weekly, {chg:M} the monthly. The text between tokens keeps the line colour. Turn the option off and the line renders as a single cell in a single colour. The one visible cost of the segmented mode is worth naming: cell padding makes the gaps around coloured tokens slightly wider than a plain space.
Nine anchors and offsets that tables do not have
Every line is anchored independently to one of nine chart positions. Lines that land on the same anchor do not overlap: they are collected into one table and stacked in declaration order — Line 1 above Line 2 above Line 3 above the symbol line.
Pine tables expose no pixel offset, so Offset X and Y are built from geometry instead: an empty spacer column sized in percent of chart width pushes a group inward from a left or right edge, and an empty spacer row sized in percent of chart height pushes it away from the top or bottom. X is ignored on a centered anchor and Y on a middle one, because there is no edge to push from. When several lines share an anchor, the group takes the offsets of its first line.
Every line is yours
Per line: colour, size from 8 to 80, Default or Monospace font, bold, italic. A free line can additionally colour itself as a whole by the sign of the change token it contains. Global: the Positive/Negative pair used by all sign colouring, an extra transparency slider that fades every line on top of its own colour, and a background fill behind the text blocks.
What repaints, and what does not
Nothing is drawn on historical bars, so there is nothing to repaint in the signal sense. The tables are rebuilt on the last bar and every token updates with the live tape — price, changes and volume move tick by tick, which is what a live watermark is for. The previous daily, weekly and monthly closes are requested from the higher timeframes with a one-bar offset, so only completed bars are read and those references stay fixed until their period rolls over. {date}, {time} and {dow} follow the exchange clock, not bar time.
What is actually original here
A chart watermark is public domain — the platform has plenty, and another script that prints a static string would have no reason to exist. Three parts of this one are engineering rather than styling, and the source is open, so they can be read:
A single token engine for all four lines. One substitution pass resolves thirteen tokens, including three change bases — daily, weekly, monthly — measured the way the quote header measures them, so the symbol line and the free lines speak the same language.
Per-token colouring inside one table row. The symbol line is split into cells at token boundaries so each value carries the sign colour of its own change, while single-colour lines sharing the anchor are merged across the full row width and stay centered above the segmented one.
Offsets that Pine tables do not offer. Anchoring, stacking and two-axis fine-tuning are assembled from table geometry — spacer cells sized in percent of the pane — because the platform provides no pixel offset for tables.
What it does not do
It computes nothing tradeable. No levels, no signals, no alerts, no statistics — it reads the same values the quote header already shows and prints them where and how you want them. It is a labelling tool; the trading remains your job.
The Inputs allow you to set:
- Line 1–3: template text, colour, size, font (Default/Monospace), bold, italic, colour by change sign, anchor (vertical and horizontal), Offset X and Y
- Symbol line: show/hide, template text, colour price/change by sign, colour, size, font, bold, italic, anchor, Offset X and Y
- Appearance: Positive and Negative colours, extra transparency, background colour
About the chart
BYBIT:BTCUSDT.P, 5-minute chart. The only script on it is this one, and the three free lines stack at the top center on their default texts — XI0033 with a panda emoji, then the Example and Your text here placeholders. The symbol line sits at the bottom center; its template is trimmed to the exchange, ticker, timeframe, date, weekday and the daily percent change, and sign colouring paints that percent by the sign of the day. No other indicators, no drawings.
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันฟังก์ชันการทำงานของมันได้ ขอชื่นชมผู้เขียน! แม้ว่าคุณจะใช้งานได้ฟรี แต่โปรดจำไว้ว่าการเผยแพร่โค้ดซ้ำจะต้องเป็นไปตาม กฎระเบียบการใช้งาน ของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันฟังก์ชันการทำงานของมันได้ ขอชื่นชมผู้เขียน! แม้ว่าคุณจะใช้งานได้ฟรี แต่โปรดจำไว้ว่าการเผยแพร่โค้ดซ้ำจะต้องเป็นไปตาม กฎระเบียบการใช้งาน ของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน