priceNote
Attaches a text note to a price point and draws a small pointer/leader toward another point. Great for tagging levels with a quick comment (e.g., “liquidity grab”) while keeping the note readable with background, border, and word-wrap.
Syntax (one line)
priceNote(originPoint, commentPoint, styles?, text?)
Parameters
originPoint (PricedData) · First anchor (time & price) where the note is attached.
commentPoint (PricedData) · Second anchor (time & price) the note points toward.
styles (TextLineToolOverrides) · Visual and layout options:
backgroundColor(RGBAColor | BaseColors) · Box fill color.backgroundTransparency(number) · 0–100 background opacity (higher = lighter).bold(boolean) · Make the note text bold.borderColor(RGBAColor | BaseColors) · Box border color.color(RGBAColor | BaseColors) · Text color.drawBorder(boolean) · Show a border around the box.fillBackground(boolean) · Fill the box background.fixedSize(boolean) · Keep the on-screen size constant when zooming.fontsize(number) · Text size.italic(boolean) · Italicize the text.wordWrap(boolean) · Wrap text onto multiple lines.wordWrapWidth(number) · Pixel width used when wrapping.text(string) · The message shown in the note.
Return Value
(string) · The drawing ID of the created Price Note.
Example
What this does: Every 45 candles, adds a note at the current close that points toward a nearby candle, using soft background and a thin border. All visuals live in one const style.
Tips
Use wordWrap + wordWrapWidth to keep multi-line notes tidy and readable.
Pick high-contrast color vs backgroundColor so text stays visible over candles.
fixedSize: truekeeps font size consistent while zooming.
Warning
Very long notes can cover price action; keep messages short and bump up
backgroundTransparencyif needed.
Good Practice
Create color presets (info/warning/confirm) and reuse the same
const styleacross scripts.Point the note toward the nearest relevant bar so the context is obvious at a glance.
Last updated