callout
Places a callout box with a pointer at a specific bar and price. Perfect for drawing attention to important candles (breakouts, reversals) with a short message. You can style the box, border, and text, and enable word wrap for longer notes.
Syntax (one line)
callout(time, price, styles?, text?)
Parameters
time (number) · Candle time where the callout points (e.g., time(0)).
price (number) · Price level where the callout pointer anchors (e.g., closeC(0)).
styles (CalloutLineToolOverrides) · Visual and text options for the callout box:
backgroundColor(RGBAColor | BaseColors) · Fill color of the callout box.bold(boolean) · Make the callout text bold.bordercolor(RGBAColor | BaseColors) · Color of the callout border.color(RGBAColor | BaseColors) · Text color.fontsize(number) · Font size for the message.italic(boolean) · Make the callout text italic.linewidth(number) · Border thickness.transparency(number) · 0–100 box transparency (higher = lighter).wordWrap(boolean) · Wrap text onto multiple lines.wordWrapWidth(number) · Pixel width used for wrapping whenwordWrapis true.text(string) · Message shown inside the callout.
Return Value
(string) · The drawing ID of the created Callout.
Example
What this does: Every 50 candles, it drops a callout that points to the current close, with a short wrapped message. All styling is in one const style.
Tips
Use wordWrap + wordWrapWidth to keep longer messages tidy.
Choose high-contrast color vs backgroundColor for readability over candles.
Keep messages short (1–2 lines) so the box doesn’t cover the chart.
Warning
Very large callouts or many callouts close together can clutter the chart—use them sparingly.
Good Practice
Keep a few presets (info, warning, success) so callouts are instantly recognizable.
Centralize your preferred callout styling in a single
const styleand reuse it across scripts.
Last updated