fibChannel
Draws a Fibonacci Channel: a set of parallel lines based on a base point, a scale point (distance), and an angle point (tilt). Use it to visualize trending “rails” where price often reacts. Great for trend following, take-profit zoning, and spotting pullbacks in channels. The three points you pick define where the channel starts, how wide it is, and its slope.
Syntax (one line)
fibChannel(basePoint, scalePoint, anglePoint, styles?)
Parameters
basePoint(PricedData). The 0% level starting reference (time & price), e.g.newPoint(time(30), closeC(30)).scalePoint(PricedData). Sets the vertical distance between 0% and 100% (controls spacing of levels).anglePoint(PricedData). Tilts the whole channel (controls inclination).styles(FibChannelLineToolOverrides). Visual and level options for the tool. Key options:coeffsAsPercents(boolean) · Show levels as percentages.extendLeft(boolean) · Extend lines to the left.extendRight(boolean) · Extend lines to the right.fillBackground(boolean) · Fill area between levels.horzLabelsAlign(string) · Horizontal labels alignment.vertLabelsAlign(string) · Vertical labels alignment.labelFontSize(number) · Label text size.showCoeffs(boolean) · Show level values.showPrices(boolean) · Show price labels.transparency(number) · Background transparency (0–100).levelsStyle(LinesLevels withoutcoeff) · Default line look (e.g.,linestyle,linewidth,color).level1…level24(Levels) · Enable/hide each level and customize:visible(boolean) · Show this level.color(RGBAColor | BaseColors) · Line color.coeff(number) · Level value (e.g., 0.382, 1, 1.618).
Return Value
(string) The drawing ID of the created Fibonacci Channel (you can store it if you plan to update/delete later).
Example
Goal: Every 40 candles, draw a clean Fib Channel that extends forward, with a few classic levels and soft background fill. We’ll anchor the base at 30 candles ago, use a scale point 20 candles ago to set spacing, and use an angle point 10 candles ago to tilt with the trend.
Result

Tips
Prefer swing points for
basePoint,scalePoint, andanglePointso the channel aligns with real market structure.Use
extendRight: trueto project future rails where price may react.If labels clutter the view, set
showPrices: falseand keep onlyshowCoeffs: truefor a cleaner read.To quickly tighten/loosen spacing, move
scalePointvertically farther/closer frombasePoint.
Warning
Don’t pass malformed points (e.g., missing time or price) to fibChannel—the drawing won’t be created. Always build them with newPoint(time(offset), priceValue).
Good Practice
Keep all your style choices in a single
const styleso you can tweak levels/colors without touching the call site.Combine Fib Channel with a trend filter (e.g., moving average slope) and draw channels only when the market is trending, not ranging.
Use consistent level sets across strategies (e.g.,
0,0.382,0.5,0.618,1,1.618) so your backtests are comparable.
Last updated