parallelChannel
This tool lets you draw two parallel trendlines to mark a channel, plus an optional midline. Traders often use it to visualize when price is “bouncing” between two levels (support & resistance in trend form).
Syntax
parallelChannel(fromPoint, toPoint, parallelDistance, styles?, text?)
Parameters
fromPoint: The starting point of the channel (use
newPoint(time, price)).toPoint: The second point, which sets the direction (slope) of the channel.
parallelDistance: A third point that tells the tool how far away the parallel line should be (the “width” of the channel).
- Parameters (Styles)PropertyTypeDescription
backgroundColor
BaseColors/RGBAColorFill background color of the channel.
extendLeft
booleanExtend the lines indefinitely to the left.
extendRight
booleanExtend the lines indefinitely to the right.
fillBackground
booleanFill the channel background (default transparent if false).
labelBold
booleanMakes the label text bold.
labelFontSize
numberFont size of the label.
labelHorzAlign
stringHorizontal alignment of the label (
left,center,right).labelItalic
booleanMakes the label text italic.
labelTextColor
BaseColors/RGBAColorColor of the label text.
labelVertAlign
stringVertical alignment of the label (
top,middle,bottom).labelVisible
booleanShow or hide the label.
midlinestyle
numberStyle of the midline.
midlinewidth
numberThickness of the midline.
showMidline
booleanShow or hide the midline.
transparency
number(0–100)Transparency level of the background fill.
text (optional) A short label for the channel.
Return Value
string — Unique drawing
id.
Example
This script draws a parallel channel every 40 candles. It uses an old low as the base, a recent high to set the slope, and another recent low to define the distance (width) of the channel.
The result: a purple channel running through recent price action, with a label “Channel.”
Result

Tips
Tip: Great for spotting ranges or sloping channels in trends.
Tip: Try using swing highs/lows for the anchors to make the channel more meaningful.
Warning
Warning: If your third point (
parallelDistance) is too close to the base, the channel may look flat or invisible.Warning: Adding too many channels can clutter your chart quickly.
Good Practice
Good Practice: Use consistent colors (e.g., purple for channels) so you can instantly recognize them on your chart.
Good Practice: Always base your channel on obvious swing highs and lows — this makes it easier to trust the lines.
Last updated