signpost

Places a signpost badge at a specific bar and price. It’s great for eye-catching tags like “Earnings”, “News”, or “Alert”. You can show an emoji on the plate and add a short label to explain the marker.

Syntax (one line)

signpost(time, price, styles?, text?)

Parameters

time (number) · Candle time where the signpost is placed (e.g., time(0)). price (number) · Price level where the signpost sits (e.g., closeC(0)). styles (SignpostLineToolOverrides) · Visual options for the badge:

  • bold (boolean) · Make the label text bold.

  • emoji (string) · Emoji shown on the sign plate (e.g., "📌", "⚠️").

  • fontSize (number) · Size of the label text.

  • italic (boolean) · Make the label text italic.

  • plateColor (RGBAColor | BaseColors) · Background color of the sign plate.

  • showImage (boolean) · Toggle the emoji/image display on the plate. text (string) · Optional short label next to/under the sign (e.g., "Earnings").

Return Value

(string) · The drawing ID of the created Signpost.

Example

What this does: Every 42 candles, it drops a yellow signpost with an emoji at the current close and shows a short label. All visuals live in one const style.

//@version=1
init = () => {
  indicator({ onMainPanel: true, format: 'inherit' });
};

onTick = () => {
  if (index % 42 === 0) { // draw occasionally to keep charts clean
    // 1) Style (SignpostLineToolOverrides)
    const style = {
      plateColor: color.rgba(255, 193, 7, 0.9), // amber plate
      emoji: "📌",
      showImage: true,
      fontSize: 12,
      bold: true,
      italic: false
    };

    // 2) Place the signpost at this bar’s close
    signpost(time(0), closeC(0), style, "Key level");
  }
};

Tips

  • Use a consistent emoji set (📌 highlight, ⚠️ warning, ✅ confirmed) so signals are instantly recognizable.

  • Keep labels short (1–2 words) to avoid covering candles.

Warning

  • Too many signposts in the same region can clutter the view—space them out or reduce frequency.

Good Practice

  • Reuse a small set of plate colors (e.g., amber for notes, red for risks, green for confirmations).

  • Centralize your preferred signpost styling in a single const style for easy reuse across scripts.

Last updated