INDICATOR MANUAL
Auto Fibonacci retracement indicatorFibonacci Retracement [AFD] · full manual · published to TradingView
Draw a primary and optional higher-timeframe Fibonacci reference grid from selected ranges.
Start here
What the indicator does, the questions it can help answer, and its fresh-install defaults.
The primary grid can use the Current Day, Previous Day, Current Week, or Latest Swing range. Auto direction assigns 0.00 to the more recent extreme and 1.00 to the leg origin; Long and Short override that interpretation.
Latest Swing uses the newest confirmed consecutive alternating high-low pair. Current Day and Current Week are developing ranges, so their extremes and every derived level can move as the active period expands.
The optional higher-timeframe grid uses the latest confirmed higher-timeframe swing. Adaptive chooses a strictly higher interval below the terminal 12-month rung; Custom is suppressed when it is not higher than the chart.
Fresh-install defaults9 documented defaults
Swipe or scroll horizontally to see every column.
| Area | Default | Result |
|---|---|---|
| Primary Fibonacci | On · Current Day · Auto | Draws the developing daily range with six interior ratios plus 0.00 and 1.00. |
| Swing engine | Strength 5 | Confirms Latest Swing and higher-timeframe pivots five bars after origin. |
| HTF context | Off · Adaptive · custom 240 | Keeps the optional confirmed higher-timeframe layer hidden on a fresh install. |
| Color | Gradient · Auction Gold | Maps each ratio between the theme’s low- and high-end colors. |
| Fill | OTE Band · 72 transparency | Shades 0.618–0.786 and increases opacity while price is inside it. |
| Glow | On · width 4 · 58 transparency | Draws a soft halo beneath each visible line. |
| Geometry | Solid · width 1 · left 40 · right 30 | Extends the grid beyond its anchors and latest chart bar. |
| Labels | 10-bar offset · decimal · prices off | Shows ratio tags in the right margin without numeric prices. |
| Extensions | Off | Keeps negative-ratio levels hidden until enabled per grid. |
How it works
How the indicator turns chart data into the states and drawings you see.
Primary range selection
Current Day and Current Week update with their active period; Previous Day is completed; Latest Swing waits for a confirmed alternating pivot pair. One current range is displayed rather than a historical ladder of grids.
Direction and ratio scale
Auto uses which selected extreme occurred later. The recent end of the impulse is 0.00 and the origin is 1.00. Negative ratios continue beyond 0.00 on the same scale.
Higher-timeframe context
The optional grid derives confirmed HTF pivots from the standard symbol’s OHLC. Adaptive steps to a higher interval; Custom requires an interval strictly above the chart timeframe.
Independent level visibility
The primary and HTF grids own separate 0.236 through 0.786 switches. Extension ratio switches are shared, while each grid has its own extension on/off control.
Gradient and single-color modes
Gradient maps ratio depth through Auction Gold, Neon, Ember, Ice, Mono, or custom endpoints. Single Color gives the primary and HTF grids separate chosen colors.
Fills and golden-zone emphasis
Off, All Bands, OTE Band, and Custom Bands control intervals independently of line visibility. The reactive highlight only changes the existing 0.618–0.786 fill while price is inside it.
Standard-symbol geometry
The range calculations request the standard ticker so synthetic chart candles do not silently become the higher-timeframe basis. The drawings still appear on the active chart and should be interpreted as references to standard OHLC geometry.
Output and state reference7 documented states
Swipe or scroll horizontally to see every column.
| Output or state | When it appears | Meaning |
|---|---|---|
| PRIMARY GRID | Primary layer on with usable range | 0.00, 1.00, and selected interior ratios across the active range. |
| HTF GRID | HTF on with confirmed higher-timeframe swing | Dimmed reference grid from the effective higher interval. |
| OTE BAND | Fill mode includes 0.618–0.786 | Shaded retracement interval, not an entry or probability claim. |
| GOLDEN-ZONE HIGHLIGHT | Price inside the included OTE band | Temporary opacity change to the existing fill. |
| EXTENSION LEVEL | Grid extensions and ratio enabled | Negative-ratio reference beyond the 0.00 end of the leg. |
| RATIO LABEL | Visible level | Decimal or percent ratio with optional price. |
| NO HTF GRID | Custom timeframe not strictly higher or no confirmed range | Layer remains blank rather than substituting a misleading interval. |
Settings
The 63-input reference follows the nine settings groups: Fibonacci, Engine, Higher Timeframe, Color, Fill, Glow, Geometry, Extensions, and Labels. Conditional controls remain dimmed until their parent layer or mode is active.
🌀 Fibonacci10 inputs
Swipe or scroll horizontally to see every column.
| Setting | Control | Default | Choices, limits & availability |
|---|---|---|---|
| Show Primary Fibonaccishow_primary_fib | Toggle | On | — |
| Anchor Rangefib_anchor | Choice / text | Current Day | Latest Swing · Current Day · Previous Day · Current Week | Conditional |
| Fib Directionfib_dir | Choice / text | Auto | Auto · Long · Short |
| 0.236fib_l236 | Toggle | On | Conditional |
| 0.382fib_l382 | Toggle | On | Conditional |
| 0.50fib_l5 | Toggle | On | Conditional |
| 0.618fib_l618 | Toggle | On | Conditional |
| 0.705fib_l705 | Toggle | On | Conditional |
| 0.786fib_l786 | Toggle | On | Conditional |
| Show Extension Levelsshow_ext | Toggle | Off | Conditional |
⚙️ Engine1 input
Swipe or scroll horizontally to see every column.
| Setting | Control | Default | Choices, limits & availability |
|---|---|---|---|
| Swing Strength (bars)swing_strength | Whole number | 5 | Min 1 · Max 50 |
🧭 Higher-Timeframe Context10 inputs
Swipe or scroll horizontally to see every column.
| Setting | Control | Default | Choices, limits & availability |
|---|---|---|---|
| Show HTF Contextshow_htf | Toggle | Off | — |
| HTF Modehtf_mode | Choice / text | Adaptive | Adaptive · Custom | Conditional |
| Custom HTFcustom_htf | Timeframe | 240 | Conditional |
| 0.236htf_l236 | Toggle | On | Conditional |
| 0.382htf_l382 | Toggle | On | Conditional |
| 0.50htf_l5 | Toggle | On | Conditional |
| 0.618htf_l618 | Toggle | On | Conditional |
| 0.705htf_l705 | Toggle | On | Conditional |
| 0.786htf_l786 | Toggle | On | Conditional |
| Show HTF Extension Levelshtf_show_ext | Toggle | Off | Conditional |
🎨 Colors & Gradients7 inputs
Swipe or scroll horizontally to see every column.
| Setting | Control | Default | Choices, limits & availability |
|---|---|---|---|
| Color Modecolor_mode | Choice / text | Gradient | Gradient · Single Color |
| Gradient Themecolor_theme | Choice / text | Auction Gold | Auction Gold · Neon · Ember · Ice · Mono · Custom | Conditional |
| Gradient Low (0.00 End)grad_low_color | Color | #00B0FF | Conditional |
| Gradient High (1.00 End)grad_high_color | Color | #FFB300 | Conditional |
| Fib Line Colorfib_color | Color | Gray · 20% transparent | Conditional |
| HTF Fib Line Colorhtf_line_color | Color | Yellow · 0% transparent | Conditional |
| HTF Layer Dimminghtf_dim | Whole number | 20 | Min 0 · Max 90 · Step 5 | Conditional |
🌈 Fills & Zones12 inputs
Swipe or scroll horizontally to see every column.
| Setting | Control | Default | Choices, limits & availability |
|---|---|---|---|
| Fill Between Levelsfib_fill_mode | Choice / text | OTE Band | Off · All Bands · OTE Band · Custom Bands |
| Fill Transparencyfill_shift | Whole number | 72 | Min 0 · Max 100 · Step 2 | Conditional |
| Fib Fill Colorfib_fill_color | Color | Gray · 90% transparent | Conditional |
| 0.00–0.236fib_fill_0_236 | Toggle | On | Conditional |
| 0.236–0.382fib_fill_236_382 | Toggle | On | Conditional |
| 0.382–0.50fib_fill_382_50 | Toggle | On | Conditional |
| 0.50–0.618fib_fill_50_618 | Toggle | On | Conditional |
| 0.618–0.705fib_fill_618_705 | Toggle | On | Conditional |
| 0.705–0.786fib_fill_705_786 | Toggle | On | Conditional |
| 0.786–1.00fib_fill_786_100 | Toggle | On | Conditional |
| Highlight Golden Zone at Priceote_reactive | Toggle | On | — |
| Highlight Strengthote_boost | Whole number | 28 | Min 0 · Max 90 · Step 2 | Conditional |
✨ Glow & Emphasis3 inputs
Swipe or scroll horizontally to see every column.
| Setting | Control | Default | Choices, limits & availability |
|---|---|---|---|
| Enable Glowglow_enabled | Toggle | On | — |
| Glow Widthglow_width | Whole number | 4 | Min 1 · Max 8 | Conditional |
| Glow Transparencyglow_shift | Whole number | 58 | Min 0 · Max 95 · Step 2 | Conditional |
📐 Geometry6 inputs
Swipe or scroll horizontally to see every column.
| Setting | Control | Default | Choices, limits & availability |
|---|---|---|---|
| Line Styleline_style_name | Choice / text | Solid | Solid · Dashed · Dotted |
| Fib Line Widthfib_line_width | Whole number | 1 | Min 1 · Max 4 | Conditional |
| HTF Line Widthhtf_line_width | Whole number | 1 | Min 1 · Max 4 | Conditional |
| Line Extension Left (bars)line_left_bars | Whole number | 40 | Min 0 · Max 4000 |
| Line Extension Right (bars)line_right_bars | Whole number | 30 | Min 0 · Max 200 |
| Label Right Offset (bars)label_offset | Whole number | 10 | Min 0 · Max 200 |
📏 Extensions7 inputs
Swipe or scroll horizontally to see every column.
| Setting | Control | Default | Choices, limits & availability |
|---|---|---|---|
| -0.272ext_m272 | Toggle | Off | Conditional |
| -0.414ext_m414 | Toggle | Off | Conditional |
| -0.618ext_m618 | Toggle | On | Conditional |
| -1.00ext_m1000 | Toggle | Off | Conditional |
| -1.618ext_m1618 | Toggle | On | Conditional |
| -3.236ext_m3236 | Toggle | Off | Conditional |
| Extension Fade (per level)ext_fade | Whole number | 10 | Min 0 · Max 30 | Conditional |
🏷️ Labels7 inputs
Swipe or scroll horizontally to see every column.
| Setting | Control | Default | Choices, limits & availability |
|---|---|---|---|
| Show Price Labelsshow_level_prices | Toggle | Off | — |
| Ratio Label Formatratio_label_format | Choice / text | Decimal | Decimal · Percent |
| Label Background Transparencylabel_bg_shift | Whole number | 58 | Min 0 · Max 100 · Step 2 |
| Fib Label Sizefib_label_size_name | Choice / text | Small | Tiny · Small · Normal · Large · Huge | Conditional |
| Fib Label Text Colorfib_label_text_color | Color | White | Conditional |
| HTF Label Sizehtf_label_size_name | Choice / text | Small | Tiny · Small · Normal · Large · Huge | Conditional |
| HTF Label Text Colorhtf_label_text_color | Color | White | Conditional |
Alerts and limitations
What can notify you, what can change the output, and what the indicator cannot establish.
Alerts
Limits to keep visible
- Current Day and Current Week are developing ranges. A new extreme resizes the range and every derived line during the active period.
- Latest Swing and the HTF grid require confirmed pivots, so their newest possible range is delayed by Swing Strength.
- Only the active primary and optional HTF grids are retained. The script is not a historical Fibonacci-study archive.
- A Custom HTF at or below the chart timeframe is intentionally suppressed. Adaptive has no higher rung from a 12-month chart.
- The higher-timeframe request uses completed values, but that implementation detail is not a blanket non-repainting claim for every primary-range mode.
- Negative-ratio extensions are reference lines, not price targets or statements that price will continue.
- On synthetic chart types, standard-symbol OHLC can place the grid differently from the visible synthetic candles. Exact published-build behavior across every chart type was not observed.
- The published-build warning count was not separately recorded. A historical predecessor’s warning result does not transfer to the current build.
Troubleshooting
Start with what you see on the chart. Each answer explains the likely cause and the first setting, timeframe, or data condition to check.
Why does the Current Day grid keep moving?
Current Day uses today’s developing high and low, so the grid changes whenever the range expands. Choose Previous Day for a fixed completed range or Latest Swing for a confirmed pivot-to-pivot range.
Why hasn’t Latest Swing updated yet?
The newest turning point is not usable until Swing Strength bars confirm it, and the grid also needs an alternating high-low pair. Lowering Swing Strength confirms sooner but accepts smaller swings.
Why is the higher-timeframe grid blank?
Turn on Show HTF Context, then use Adaptive or choose a Custom HTF above the chart timeframe. A confirmed higher-timeframe swing pair must also exist, so load more history if the settings are correct but the grid is still blank.
Why are extension ratios selected but no extensions are visible?
The ratio checkboxes choose which extensions are available; they do not turn the drawings on. Enable Show Extension Levels for the main grid or Show HTF Extension Levels for the higher-timeframe grid.
Why is the OTE highlight missing?
The fill mode must include both the 0.618–0.705 and 0.705–0.786 bands, and current price must be inside their combined interval. Check the fill mode first, then compare price with the selected grid.