doubleCurve
Draws a smooth double-bend curve between two anchors using two control points. It’s ideal when a single curve isn’t enough—use it to sketch gentle “S-shapes”, parabolic moves with a mid-adjustment, or flowing paths that better follow price rhythm.
Syntax (one line)
doubleCurve(fromPoint, toPoint, controlPoint1, controlPoint2, styles?)
Parameters
fromPoint (PricedData) · Starting anchor of the curve.
toPoint (PricedData) · Ending anchor of the curve.
controlPoint1 (PricedData) · First control point that shapes the curve near the start.
controlPoint2 (PricedData) · Second control point that shapes the curve near the end.
styles (BeziercubicLineToolOverrides) · Visual and fill options:
backgroundColor(RGBAColor | BaseColors) · Fill color for the area under/around the curve.extendLeft(boolean) · Extend the curve leftward.extendRight(boolean) · Extend the curve rightward.fillBackground(boolean) · Turn background fill on/off.leftEnd(number) · Style of the left end cap (e.g., flat/arrow, when supported).linecolor(RGBAColor | BaseColors) · Curve color.linestyle(number) · 0=solid, 1=dotted, 2=dashed…linewidth(number) · Curve thickness.rightEnd(number) · Style of the right end cap.transparency(number) · 0–100 transparency for fills/line (higher = lighter).
Return Value
(string) · The drawing ID of the created double curve.
Example
What this does: Every 54 candles, it draws a gentle S-curve connecting two anchors. We keep a soft fill and define both control points to fine-tune the shape. All visuals live in one const style.
Tips
Move
controlPoint1closer tofromPointto influence the initial bend; movecontrolPoint2nearertoPointto adjust the final bend.Keep fills subtle so candles remain visible; increase
transparencyif it feels heavy.
Warning
If both control points lie on a straight line between the anchors, the curve may look nearly straight—spread them to create a clear “S” shape.
Good Practice
Use consistent colors for curves (e.g., teal for flow guides) so they’re recognizable at a glance.
Save a reusable
const styleand tweak onlylinecoloror transparency per scenario.
Last updated