Indicator · Pine Script v5 · On the chart

Watermark

by suyons· code credited to syoungs

Watermark is a chart overlay that prints custom title and subtitle text, the symbol with its timeframe, and the current date and time in a chosen timezone.

View on GitHub

GitHub stars7on the repository
Pine versionv5runs as is
Lines of code122
Settings24inputs
LicenceNone statedfile: MPL-2.0
Last update4 months ago21 Jun 2026

Add It to Your TradingView Chart

  1. 1Copy the scriptPress Copy script above, or the copy button on the code below.
  2. 2Open the Pine EditorOpen a TradingView chart and choose Pine Editor at the bottom of the screen.
  3. 3Paste over the templateCreate a new indicator, select all of the template text and paste. Press Save and give it a name.
  4. 4Add it to the chartPress Add to chart, then adjust the settings with the gear icon next to its name.

Source Code

122 lines of Pine Script v5 from other/05-watermark.pine, published under MPL-2.0 (file header). Keep the author's credit and licence lines when you reuse it.

05-watermark.pine
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © syoungs
// @version=5

indicator(title='Watermark', shorttitle='Watermark', overlay=true)

// Title & subtitle text input
show_title = input.bool(true, '', group = 'title / subtitle', inline = '1')
title = input.string('TITLE HERE', '', group = 'title / subtitle', inline = '1')
show_subtitle = input.bool(true, '', group = 'title / subtitle', inline = '1')
subtitle = input.string('subtitle here', '', group = 'title / subtitle', inline = '1')

// Symbol & time setting
show_symbol = input.bool(true, 'Symbol', group = 'symbol / time', inline = '1')
show_time = input.bool(true, 'Time', group = 'symbol / time', inline = '1')
timezone = input.string('UTC+09:00', '', group = 'symbol / time', inline = '1')
show_notrealtime = input.bool(false, 'Do not show in realtime (For replay)', group = 'symbol / time', inline = '2')

string symbol_period = switch timeframe.period
    '60' => '1H'
    '120' => '2H'
    '180' => '3H'
    '240' => '4H'
    '300' => '5H'
    '360' => '6H'
    '420' => '7H'
    '480' => '8H'
    '540' => '9H'
    '600' => '10H'
    '660' => '11H'
    '720' => '12H'
    '780' => '13H'
    '840' => '14H'
    '900' => '15H'
    '960' => '16H'
    '1020' => '17H'
    '1080' => '18H'
    '1140' => '19H'
    '1200' => '20H'
    '1260' => '21H'
    '1320' => '22H'
    '1380' => '23H'
    '1440' => 'D'
    => timeframe.period

if chart.is_kagi
    symbol_period += ', Kagi'
if chart.is_linebreak
    symbol_period += ', Linebreak'
if chart.is_pnf
    symbol_period += ', P&F'
if chart.is_range
    symbol_period += ', Range'
if chart.is_renko
    symbol_period += ', Renko'

symbol_info = syminfo.prefix + ':' + syminfo.ticker + '  [' + symbol_period + ']'
string time_now = na
if show_notrealtime
    time_now := str.format('{0,number,0000}-{1,number,00}-{2,number,00}  ', year(time, timezone), month(time, timezone), dayofmonth(time, timezone)) + str.format('{0,number,00}:{1,number,00}', hour(time, timezone), minute(time, timezone))    
else
    time_now := str.format('{0,number,0000}-{1,number,00}-{2,number,00}  ', year(timenow, timezone), month(timenow, timezone), dayofmonth(timenow, timezone)) + str.format('{0,number,00}:{1,number,00}', hour(timenow, timezone), minute(timenow, timezone))

// Title: Font size, color, alignment
title_color = input.color(color.new(#ffffff, 0), '', inline = '1', group = 'title')
title_size = input.string('large', '', options = ['auto', 'tiny', 'small', 'normal', 'large', 'huge'], inline = '1', group = 'title')
title_align = input.string('center', '', options = ['center', 'left', 'right'], inline = '1', group = 'title')

// Subtitle: Font size, color, alignment
subtitle_color = input.color(color.new(#b2b5be, 0), '', inline = '1', group = 'subtitle')
subtitle_size = input.string('normal', '', options = ['auto', 'tiny', 'small', 'normal', 'large', 'huge'], inline = '1', group = 'subtitle')
subtitle_align = input.string('center', '', options = ['center', 'left', 'right'], inline = '1', group = 'subtitle')

// Symbol: Font size, color, alignment
symbol_color = input.color(color.new(#ffffff, 0), '', inline = '1', group = 'symbol')
symbol_size = input.string('large', '', options = ['auto', 'tiny', 'small', 'normal', 'large', 'huge'], inline = '1', group = 'symbol')
symbol_align = input.string('center', '', options = ['center', 'left', 'right'], inline = '1', group = 'symbol')

// Time: Font size, color, alignment
time_color = input.color(color.new(#ffffff, 0), '', inline = '1', group = 'time')
time_size = input.string('large', '', options = ['auto', 'tiny', 'small', 'normal', 'large', 'huge'], inline = '1', group = 'time')
time_align = input.string('center', '', options = ['center', 'left', 'right'], inline = '1', group = 'time')

// Table config 
title_pos_in = input.int(2, '', 1, 9, 1, inline = '1', group = 'table config')
title_bg = input.color(color.new(color.blue, 100), '', inline = '1', group = 'table config')
title_pos = switch title_pos_in
    1 => position.top_left
    2 => position.top_center
    3 => position.top_right
    4 => position.middle_left
    5 => position.middle_center
    6 => position.middle_right
    7 => position.bottom_left
    8 => position.bottom_center
    => position.bottom_right

symbol_pos_in = input.int(8, '', 1, 9, 1, inline = '1', group = 'table config')
symbol_bg = input.color(color.new(color.blue, 100), '', inline = '1', group = 'table config')
symbol_pos = switch symbol_pos_in
    1 => position.top_left
    2 => position.top_center
    3 => position.top_right
    4 => position.middle_left
    5 => position.middle_center
    6 => position.middle_right
    7 => position.bottom_left
    8 => position.bottom_center
    => position.bottom_right

// Show tables
titleTable = table.new(title_pos, 1, 2)
if show_title
    table.cell(titleTable, 0, 0, title, 0, 0, title_color, title_align, text_size=title_size, bgcolor=title_bg)
if show_subtitle
    table.cell(titleTable, 0, 1, subtitle, 0, 0, subtitle_color, subtitle_align, text_size=subtitle_size, bgcolor = title_bg)

symbolTable = table.new(symbol_pos, 1, 2)
if show_symbol
    table.cell(symbolTable, 0, 0, symbol_info, 0, 0, symbol_color, symbol_align, text_size=symbol_size, bgcolor=symbol_bg)
if show_time
    table.cell(symbolTable, 0, 1, time_now, 0, 0, time_color, time_align, text_size=time_size, bgcolor=symbol_bg)

Overview

Watermark maps hourly periods to readable labels and appends chart type names such as Renko, Kagi, or Point and Figure. Settings control visibility, font size, color, alignment, and background for each line, plus an option to freeze the clock to bar time instead of live time for replay. It does not calculate prices or signals.

Details

Published by

suyons on GitHub

Code credit

syoungs, as written in the script's header

Type

Indicator, Pine Script v5

Draws

On the price chart

Markets

Any symbol

Timeframes

Any timeframe

Risk Notes

No repainting, lookahead or stacked entries were found in its code or README. That says nothing about how well it works: test it first.

Settings

The inputs you can change from the gear icon on the chart. Defaults are the author's.

SettingTypeDefaultVariable
show_titlebooltrueshow_title
titlestringTITLE HEREtitle
show_subtitlebooltrueshow_subtitle
subtitlestringsubtitle heresubtitle
Symbolbooltrueshow_symbol
Timebooltrueshow_time
timezonestringUTC+09:00timezone
Do not show in realtime (For replay)boolfalseshow_notrealtime
title_colorcolorcolor.new(#ffffff, 0)title_color
title_sizestringlargetitle_size
title_alignstringcentertitle_align
subtitle_colorcolorcolor.new(#b2b5be, 0)subtitle_color
Show all 24 settings
SettingTypeDefaultVariable
subtitle_sizestringnormalsubtitle_size
subtitle_alignstringcentersubtitle_align
symbol_colorcolorcolor.new(#ffffff, 0)symbol_color
symbol_sizestringlargesymbol_size
symbol_alignstringcentersymbol_align
time_colorcolorcolor.new(#ffffff, 0)time_color
time_sizestringlargetime_size
time_alignstringcentertime_align
title_pos_inint2title_pos_in
title_bgcolorcolor.new(color.blue, 100)title_bg
symbol_pos_inint8symbol_pos_in
symbol_bgcolorcolor.new(color.blue, 100)symbol_bg
Third-party code. ForexR did not write, test or endorse this script, and the summary above was generated automatically from its code and README. Indicators describe the past, and a strategy's backtest can look better than live trading, especially when a script repaints. Check it in the Strategy Tester and on a demo account before you rely on it.

Similar Pine Scripts

948 stars

The Adaptive Laguerre Filter calculates a smoothed, dynamically adjusted trendline plotted directly on the main price chart. It dynamically adjusts its damping factor (alpha) based on recent price range variations and median percentile calculations over a spec

Indicator v4 TrendMoving averages
Updated 10 days ago · GPL-3.0 GitHub repository of Adaptive Laguerre Filter
575 stars

The indicator plots ICT displacement candles on the price chart and can switch to retracement scanning. Displacement requires a move larger than a set share of the 14-bar average high-low range, lasting at least a chosen number of bars, with optional close, pr

Indicator v6 SMC / ICT / price actionCandlestick patterns
Updated 1 year ago · MPL-2.0 GitHub repository of ICT Displacement Candles Indicator
330 stars

This script plots three moving averages on the price chart: a fast EMA or SMA with 10 periods, a slow EMA or SMA with 20 periods, and a trend EMA or SMA with 100 periods. It signals trend changes by drawing a white cross when the fast moving average crosses ab

Indicator v4 TrendMoving averages
Updated 2 months ago · None stated GitHub repository of 3 EMA/SMA + Cross [Alorse]
318 stars

This indicator calculates an ATR trailing stop line derived from the highest high minus an average true range multiple over a specified lookback period. It plots the trailing stop line directly on the price chart and colors price bars based on whether the clos

Indicator v5 TrendVolatility & bands
Updated 2 months ago · MIT GitHub repository of ATR Trailing Stoploss

1833 Tracker

by Allen1212
303 stars

1833 Tracker is an overlay indicator that visualizes historical buy and sell transactions executed by ARK Invest ETFs for the stock on the main price chart. It displays trade dates using green buy and red sell labels positioned relative to price bars, indicati

Indicator v4
Updated 2 years ago · None stated GitHub repository of 1833 Tracker

More indicators

Trade Your Charts With a Regulated Broker

Compare brokers that connect to TradingView, with spreads, minimum deposits and leverage side by side.

Compare brokers