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 without coeff) · Default line look (e.g., linestyle, linewidth, color).

    • level1level24 (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, and anglePoint so the channel aligns with real market structure.

  • Use extendRight: true to project future rails where price may react.

  • If labels clutter the view, set showPrices: false and keep only showCoeffs: true for a cleaner read.

  • To quickly tighten/loosen spacing, move scalePoint vertically farther/closer from basePoint.

Warning

Good Practice

Last updated