arrowUp

Places an upward arrow at a specific bar and price so you can mark bullish signals, entries, or any “heads-up” moment on the chart. You can optionally show a short label next to the arrow.

Syntax (one line)

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

Parameters

time (number) · Candle time where the arrow is placed (e.g., time(0) for current bar). price (number) · Price level where the arrow points (e.g., closeC(0)). styles (ArrowMarkLineToolOverrides) · Look & label options for the marker.

  • arrowColor (RGBAColor | BaseColors) · Arrow color (e.g., color.green).

  • bold (boolean) · Make label text bold.

  • color (RGBAColor | BaseColors) · Label text color.

  • fontsize (number) · Label font size.

  • italic (boolean) · Make label text italic.

  • showLabel (boolean) · Show/hide the label text. text (string) · Optional short label shown near the arrow (e.g., "Entry").

Return Value

(string) · The drawing ID of the created arrow marker.

Example

What this does: Every 48 candles, it drops a green upward arrow at the current close and shows a short label. We keep all styling in one const style object.

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

onTick = () => {
  if (index % 48 === 0) {  // draw occasionally to keep charts clean
    // 1) Define style once (ArrowMarkLineToolOverrides)
    const style = {
      arrowColor: color.green,
      color: color.white,
      fontsize: 12,
      bold: true,
      italic: false,
      showLabel: true
    };

    // 2) Build the marker at this bar’s close
    arrowUp(time(0), closeC(0), style, "Bullish signal");
  }
};

Tips

  • Keep labels short (1–2 words) so markers don’t crowd the candles.

  • Use a consistent color scheme (e.g., green arrows for longs) to make charts easy to scan.

Warning

  • Don’t place arrows on every bar—too many markers can clutter the view and slow performance.

Good Practice

  • Centralize your marker styles in a const style so you can reuse the same look across strategies.

  • Pair arrowUp with your entry logic inside the same if (...) block to document exactly why the signal appeared.

Last updated