arcLine
Syntax (one line)
Parameters
Return Value
Example
//@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
Warning
Good Practice
Last updated