Watermark
"Watermark" by the original source, MPL-2.0. Ported to FloScript by FloSignals; modifications under MPL-2.0. Original: Watermark (v2.0), read 2026-10-12T16:10:24.259Z; source language v5.
Licence: Mozilla Public License 2.0 (MPL-2.0) — full text. The source is published with it, modifications included, under the same licence.
Watermark by TradingView, ported from Pine v5. Overlay indicator with drawings and 9 inputs.
// This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
// © TradingView
// ------------------------------------------------------------------------------------------------
// Original author: TradingView
// Original title: Watermark
// Licence: MPL-2.0 (the header above is the original notice, kept verbatim)
// Pine version: 5
// Fetched: 2026-10-12
// Ported to FloScript by FloSignals; modifications under MPL-2.0.
// Converter: @flosignals/floscript 0.1.0, strict mode, score 100/100
// ------------------------------------------------------------------------------------------------
//@floscript=1
//@version=5
indicator("Watermark", "", true)
// Watermark
// v2 2022.07.24
// This code was written using the recommendations from the Pine Script™ User Manual's Style Guide:
// https://www.tradingview.com/pine-script-docs/en/v5/writing/Style_guide.html
// ———————————————————— Constants and Inputs {
// ————— Constants
color WHITE = color.new(color.white, 30)
color BLUE = color.new(color.blue, 50)
string ST_1 = "I💙TradingView"
string ST_2 = "I💚Pine"
// ————— Inputs
string GRP1 = "═════════ Text Input ══════════"
string textInput1 = input.string(ST_1, "Text 1", group=GRP1)
string textInput2 = input.string(ST_2, "Text 2", group=GRP1, tooltip="Clear 'Text 2' to prevent animation.")
string GRP2 = "════════ Information Box ═════════"
string infoBoxSizeInput = input.string("small", "Size", inline="21", group=GRP2, options=["tiny", "small", "normal", "large", "huge", "auto"])
string infoBoxYPosInput = input.string("bottom", "↕", inline="21", group=GRP2, options=["top", "middle", "bottom"])
string infoBoxXPosInput = input.string("left", "↔", inline="21", group=GRP2, options=["left", "center", "right"])
int heightInput = input.int(3, "Height", inline="22", minval=1, maxval=100, tooltip="1-100")
int widthInput = input.int(10, "Width", inline="22", minval=1, maxval=100, tooltip="1-100")
color textColorInput = input.color(WHITE, "Text")
color bgColorInput = input.color(BLUE, "Background")
// }
// ———————————————————— Visuals {
// We use `var` to only initialize the table on the first bar.
var table watermark = table.new(infoBoxYPosInput + "_" + infoBoxXPosInput, 1, 1)
// We only populate the table on the last bar; it's more efficient.
if barstate.islast
// This `varip` variable will preserve its value across realtime updates.
varip bool changeText = true
// Toggle this value on each update.
changeText := not changeText
// If there's a "Text 2" string in inputs and it's time to flip, change the text.
string txt = str.length(textInput2) != 0 and changeText ? textInput2 : textInput1
// Populate our table cell.
table.cell(watermark, 0, 0, txt, widthInput, heightInput, textColorInput, text_size=infoBoxSizeInput, bgcolor=bgColorInput)
// }
This file is under the Mozilla Public License 2.0; it is a port of the original by TradingView, with the original licence header kept and the changes made for FloScript noted in the file.
- v2
Library refresh 2026-10-14
- v1
Library refresh 2026-10-12
Disclaimer. Scripts are written and published by members, or ported by FloSignals from open-source originals, and are their authors' own work and opinion. FloSignals does not review them for correctness and nothing in a script is financial advice or a recommendation to buy or sell anything — read the Risk Disclaimer. Posting here is under the Community Rules; a script that is not the poster's to post can be reported as the Copyright & Takedowns page says.

Comments (0)
No comments yet. Members can leave one.