Drawing tools

Fibonacci & Gann

Fib retracement, trend-based fib extension and Gann fan.

ToolTypePoints
Fib retracementfibRetracement2
Trend-based fib extensionfibExtension3
Gann fangannFan2

Levels are part of the drawing style: style.levels is a list of { value, color?, visible? }, so each drawing can have its own levels. fillOpacity controls the per-level fills (0 disables them) and showLabels the level labels. The defaults are exported as FIB_LEVELS and GANN_LEVELS.

drawings.add({
  type: "fibRetracement",
  points: [a, b],
  style: { levels: [{ value: 0 }, { value: 0.382 }, { value: 0.5 }, { value: 0.618, color: "#f59e0b" }, { value: 1 }] },
});