arrowLeft
The arrowLeft method places a left-pointing arrow marker at a specific bar and price. It’s useful to highlight important events, support/resistance reactions, or just to annotate chart zones in a simple and clear way.
Syntax (one line)
arrowLeft(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.yellow).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.,"Support").
Return Value
(string) · The drawing ID of the created arrow marker.
Example
What this does: Every 45 candles, it places a yellow left arrow at the current bar close, with a label.
//@version=1
init = () => {
indicator({ onMainPanel: true, format: 'inherit' });
};
onTick = () => {
if (index % 45 === 0) { // draw occasionally to keep charts clean
// 1) Define style once (ArrowMarkLineToolOverrides)
const style = {
arrowColor: color.yellow,
color: color.black,
fontsize: 12,
bold: true,
italic: false,
showLabel: true
};
// 2) Place the arrow
arrowLeft(time(0), closeC(0), style, "Left mark");
}
};Tips
Use arrows as annotations to make backtests and signals easier to read later.
Keep label text short so the chart stays clean.
Warning
Don’t overload the chart with too many markers—this can cause clutter and reduce readability.
Good Practice
Use color conventions (e.g., yellow arrows for highlights, green for longs, red for shorts) so the meaning is always obvious.
Last updated