arcLine
Draws a curved arc using three anchors. Great for highlighting rounded moves, curved support/resistance, or rhythm in price swings. You can softly fill the area under the arc and keep the line clean and readable.
Syntax (one line)
arcLine(point1, point2, point3, styles?)
Parameters
point1 (PricedData) · First anchor (time & price) to start the arc.
point2 (PricedData) · Middle control point that shapes the curve.
point3 (PricedData) · Final anchor where the arc ends.
styles (ArcLineToolOverrides) · Visual options for the arc and optional fill:
backgroundColor(RGBAColor | BaseColors) · Fill color under the arc.color(RGBAColor | BaseColors) · Arc line color.fillBackground(boolean) · Turn the area fill on/off.linewidth(number) · Arc line thickness.transparency(number) · 0–100 fill transparency (higher = lighter).
Return Value
(string) · The drawing ID of the created Arc Line.
Example
What this does: Every 45 candles, it draws a blue arc from an older low to a later high, using a midpoint to shape the curve. We keep all visuals in one const style.
//@version=1
init = () => {
indicator({ onMainPanel: true, format: 'inherit' });
};
onTick = () => {
if (index % 45 === 0) { // draw occasionally to keep charts clean
// 1) Choose three anchors to form the arc
const p1 = newPoint(time(80), low(80)); // start
const p2 = newPoint(time(55), (high(55)+low(55))/2); // bend the curve
const p3 = newPoint(time(30), high(30)); // end
// 2) Style (ArcLineToolOverrides)
const style = {
color: color.blue,
linewidth: 2,
fillBackground: true,
backgroundColor: color.rgba(0, 102, 255, 0.2),
transparency: 80
};
// 3) Draw the arc
arcLine(p1, p2, p3, style);
}
};Tips
Use a meaningful midpoint (
point2) to control how much the arc bows; closer topoint1orpoint3makes it tighter.Keep fills subtle so candles remain visible (raise
transparencyif it feels heavy).
Warning
Very short spans can look like a straight line; space anchors enough to show a clear curve.
Good Practice
Reuse a small set of arc colors (e.g., blue for bullish curves, red for bearish) for instant recognition.
Pair arcs with ellipse or sineLine to study cyclical behavior.
Last updated