arrowDown

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

Syntax (one line)

arrowDown(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.red).

  • 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., "Exit").

Return Value

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

Example

What this does: Every 48 candles, it drops a red downward arrow at the current close and shows a short label. All styling stays 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.red,
      color: color.white,
      fontsize: 12,
      bold: true,
      italic: false,
      showLabel: true
    };

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

Tips

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

  • Use a consistent color scheme (e.g., red arrows for shorts) 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 arrowDown with your exit/short logic inside the same if (...) block to document exactly why the signal appeared.

Last updated