gannboxFan
The Gann Box Fan combines the square grid of a Gann Box with diagonal fan lines inside it. This helps you see not only time and price proportions, but also angled trend projections from within the box. It’s useful for anticipating support/resistance lines that extend diagonally, aligned with Gann’s “squaring of price and time” idea.
Syntax
gannboxFan(originPoint, targetPoint, styles?)
Parameters
originPoint (PricedData) · The starting anchor (time & price) for the fan box.
targetPoint (PricedData) · The second anchor that sets the opposite corner, defining the box size.
styles (GannBoxFanStyleOverrides) · Optional style configuration:
fillBackground(boolean) · Fill the background inside the box.transparency(number) · Adjust background transparency (0–100).showLabels(boolean) · Show ratio labels on both grid and fan lines.priceLevels(array of numbers) · Horizontal ratio divisions (e.g.,[0.25, 0.5, 1]).timeLevels(array of numbers) · Vertical ratio divisions (e.g.,[0.25, 0.5, 1]).fanLevels(array of numbers) · Angled fan divisions (e.g.,[0.25, 0.5, 1]for classic fans).grid(LinesLevels without coeff) · Style for grid lines (linestyle,linewidth,color).border(LinesLevels without coeff) · Style for box border (linestyle,linewidth,color).fanline(LinesLevels without coeff) · Style for fan lines (linestyle,linewidth,color).
Return Value
(string) · The drawing ID of the created Gann Box Fan.
Example
Every 60 candles we draw a Gann Box Fan from an older swing high to a recent swing low, with clear grid and fan projections.
Tips
Use major swing points for the two anchors so fan angles reflect real price movement.
If the chart feels cluttered, reduce the number of
fanLevelsand keep only the most relevant ones (e.g., 0.5, 1).
Warning
Both anchors must be valid
newPoint(time, price)objects. Passing rawtime()orhigh()alone will break the drawing.
Good Practice
Keep your fan and grid line styles consistent across tests to make comparisons easier.
Look for confluence where fan diagonals meet horizontal/vertical divisions — these spots often become important reaction zones.
Last updated