Skip to main content
Skip to main content

Levels and channels

These tools draw structure from a few anchor points — Fibonacci retracements, parallel channels, pitchforks, Gann grids, regression bands. They are popular in technical analysis; you do not need to understand the math to place them on the chart.

Drawing preset
What this example shows

Use two anchors to define the measured move, then pass the retracement or extension levels that should render.

Live MDX exampletoolDrawer.drawTool({ type: "fibonLines" })fibonLines1000 candlesBTC/USD fixture
Loading chart…

Use the buttons above to preview each family on live data.

Plain-language map

Tool familyWhat it shows on the chart
Fibonacci retracement (fibonLines)Horizontal levels between a low and a high (23.6%, 38.2%, 50%, …)
Fibonacci extension (fibonExtension)Levels beyond 100% of the swing
Parallel channel (parallelChannel)Two parallel lines — trend + width
Pitchfork (pitchfork)Three-pronged median line tool
Regression channel (regressionChannel)Statistical fit band with ±σ lines
Gann fan / grid / boxAngle and square grid overlays
ABCD (abcd)Measured-move projection

Full type list: Catalog.


Fibonacci retracement (most common)

Place between a swing low and swing high. The runtime draws horizontal levels at standard ratios.

chart.toolDrawer.drawTool({
type: "fibonLines",
color: "#5cc8ff",
width: 1,
anchors: [
{
stamp: candles[8].stamp,
offset: 0,
value: candles[8].l,
_index: 0,
expandable: true,
expanded: false,
defaultDirection: "left",
},
{
stamp: candles[20].stamp,
offset: 0,
value: candles[20].h,
_index: 0,
expandable: true,
expanded: false,
defaultDirection: "right",
},
],
values: [0, 23.6, 38.2, 50, 61.8, 78.6, 100, 161.8],
valuesState: [true, true, true, true, true, true, true, false],
});
FieldMeaning
valuesLevel percentages to draw
valuesStatetrue = visible, false = hidden

In ChartUI: Analytical → Fibonacci Retracement — click low, click high.


Parallel channel

Three anchors: two define the main line, the third sets channel width.

chart.toolDrawer.drawTool({
type: "parallelChannel",
color: "#14f7ab",
fillBg: false,
anchors: [
{ stamp: candles[10].stamp, offset: 0, value: candles[10].l, _index: 0 },
{ stamp: candles[24].stamp, offset: 0, value: candles[24].h, _index: 0 },
{ stamp: candles[24].stamp, offset: 0, value: candles[24].l, _index: 0 },
],
});

Think of it as “draw the trend, then drag how wide the channel is.”


Pitchfork (three anchors)

Pivot point first, then two points on the baseline. The runtime draws the median line and outer parallels.

chart.toolDrawer.drawTool({
type: "pitchfork",
color: "#21c1f2",
anchors: [
{ stamp: candles[8].stamp, offset: 0, value: candles[8].h, _index: 0 },
{ stamp: candles[20].stamp, offset: 0, value: candles[20].l, _index: 0 },
{ stamp: candles[26].stamp, offset: 0, value: candles[26].h, _index: 0 },
],
});

Regression channel

Fits a line through close prices between two times and draws ±σ bands. Shows Pearson R on the chart.

chart.toolDrawer.drawTool({
type: "regressionChannel",
color: "#21c1f2",
source: "c",
fillBg: true,
values: [-2, 0, 2],
valuesState: [true, true, true],
anchors: [
{ stamp: candles[10].stamp, offset: 0, value: candles[10].c, _index: 0 },
{ stamp: candles[40].stamp, offset: 0, value: candles[40].c, _index: 0 },
],
});

More tools in this family

Each tool below uses drawTool({ type, anchors, … }). Switch presets in the showcase above, or read the full write-up in Complete tool reference.

typeWhat it draws
fibonExtensionFib levels beyond 100% of the swing
fibonTimeZoneVertical Fib time multiples
fibonChannelParallel Fib levels in a channel (3 anchors)
fibonArcsSemi-elliptical Fib arcs
fibonCirclesConcentric Fib circles
gannFanGann angle rays from origin
gannGridGann square grid in a box
gannBoxGann grid + internal fan diagonals
abcdABCD measured-move projection (3 anchors)

TypeScript note

Advanced fields (values, valuesState, fillBg) are recognized by the runtime but do not always have dedicated exported types. Pass them through drawTool() — the shape matches what ChartUI sends internally.

What is next?