INDICATOR MANUAL
Fair value gap (FVG) indicatorFVG Confluence [AFD] · full manual · published to TradingView
Read confirmed gaps, optional order blocks, higher-timeframe overlap provenance, lifecycle states, and alerts.
Start here
What the indicator does, the questions it can help answer, and its fresh-install defaults.
Chart-timeframe FVGs and order blocks are standalone drawings. The confluence engine instead compares zones from two selected higher timeframes; both must be higher than the chart timeframe and different from each other.
A confluence band requires positive same-direction overlap that meets the configured minimum measured from confirmed TF1 ATR, with a minimum-tick floor. Its label preserves the contributing timeframes and zone types.
Pure FVG overlaps can report penetration through FRESH, TESTED, PARTIAL, and FILLED states. Mixed FVG/order-block evidence is STATIC because it has no shared pure-FVG fill cycle to measure, and reaches FILLED once its FVG side fully traverses.
Fresh-install defaults11 documented defaults
Swipe or scroll horizontally to see every column.
| Area | Default | Result |
|---|---|---|
| Chart FVGs | On | Chart FVG detection and drawings start active, so gaps appear and the FVG formed alert is reachable without opening settings. |
| Chart Order Blocks | Off | Order Blocks do not start enabled. Breakers are shown only after the feature is turned on. |
| FVG detection | Wick · ATR · 0.05 | Uses a 0.05 × ATR minimum gap and wick-based lifecycle when chart FVGs are enabled. |
| MTF comparison | On · Auto × Auto | Auto tracks the chart timeframe, resolving to the first and second standard step above it, including on Weekly and Monthly charts. Raw HTF drawings start hidden. |
| Raw HTF lifecycle | Partial fill on · FILLED hidden | TF1 and TF2 raw boxes can shrink, but 100% filled raw zones remain hidden by default. |
| Confluence inputs | FVG only | Include Order Blocks in confluence starts off, so default bands use FVG × FVG evidence. |
| Confluence display | Labels, state, age, and partial fill on | FRESH, TESTED, and PARTIAL show; 100% FILLED bands start hidden. |
| Label sizes | FVG Medium · MTF Normal | Confluence label size is set separately under Visuals. |
| 50% midpoint (CE) | On · chart, raw HTF, and bands | A dashed gray line marks the original 50% level on all three surfaces. It is anchored to the original gap, so partial-fill shrinking never moves it. |
| Dashboard | On · Top right · Small | Reports the nearest active confluence band, or the nearest active chart FVG when no band currently qualifies. |
| Confluence alerts | All four armed | Band formed, Price entered, Reached 50%, and Filled are enabled; they still require a TradingView alert created with Any alert() function call. |
How it works
How the indicator turns chart data into the states and drawings you see.
Chart FVG detection
A confirmed three-candle gap must meet the ATR or tick minimum. The selected Wick or Close basis governs test, midpoint, full-fill, and confluence-break measurements.
Chart Order Blocks
When enabled, the indicator locates the last opposite candle before a confirmed swing break. Crossed blocks can flip to BREAKER; optional partial fill shrinks their near edge as penetration advances.
Confirmed HTF references
Each selected timeframe has its own completed-bar event engine for FVGs and order blocks. Raw drawing type filters are visual only and do not remove a zone from confluence pairing. The higher-timeframe order-block engine carries its own swing strength and candle lookback under MTF Structure, so chart Order Block settings no longer silently change which HTF blocks feed confluence.
Auto comparison timeframes
Compare timeframe 1 and 2 both default to Auto, which resolves to the first and second standard timeframe step above the chart. Moving the chart timeframe moves the comparison pair with it, so the pair stays higher than the chart without being re-picked by hand. A fixed timeframe can still be chosen for either slot.
50% midpoint line
The consequent-encroachment level can be drawn on chart zones, raw higher-timeframe zones, and confluence bands, each toggled independently. The line is anchored to the original gap rather than the drawn box, so it stays on the level the MITIGATED state already measures against even after partial fill shrinks the display.
Dashboard
A compact panel reports the nearest active confluence band, falling back to the nearest active chart FVG when no band qualifies: source timeframes or chart-only, direction, state, fill percentage, and age. Every row restates something already drawn on the chart. None of it is a signal, score, probability, or forecast.
Confluence qualification
TF1 and TF2 zones must point in the same direction and share positive price territory. The overlap must meet the TF1 ATR threshold, which is fixed when the band forms so a later ATR change does not retroactively remove it. The chart timeframe is not a third confluence input.
Lifecycle and fill
Chart and raw HTF FVGs use FRESH, TESTED, MITIGATED, and FILLED. Pure confluence bands use FRESH, TESTED, PARTIAL, and FILLED. States latch forward instead of regressing after deeper penetration.
Provenance and density
Labels identify direction, contributing timeframes, zone kinds, state, fill, and age. Band color can also reflect whether one, two, or three-plus active same-direction confluence records overlap its price territory.
Drawing-only transforms
Partial-fill shrinking, raw-zone type filters, state visibility, age formatting, and label placement change the rendered view. External labels keep their zone price when space allows, then use collision-aware columns and vertical tiers; text can temporarily clear when no legible slot remains while the zone anchor and available tooltip stay in place. None of this rewrites zone identity or confluence provenance.
Output and state reference9 documented states
Swipe or scroll horizontally to see every column.
| Output or state | When it appears | Meaning |
|---|---|---|
| FRESH | 0% penetration | Price has not entered the FVG or pure confluence band. |
| TESTED | >0% and <50% | Price entered but has not reached the original midpoint. |
| MITIGATED | 50% to <100% | A chart or raw HTF zone reached its original midpoint. |
| PARTIAL | 50% to <100% | A pure confluence band reached its overlap midpoint. |
| FILLED | 100% | Price fully traversed the original zone or overlap; hidden by default in raw and confluence views. |
| BREAKER | Order block crossed | A chart block flipped direction and restarted penetration from its new near edge. |
| STATIC | Mixed FVG / OB band | The overlap has provenance but no shared pure-FVG fill cycle to measure. It can still reach FILLED once its FVG side fully traverses. |
| RAW HTF LABEL | Raw drawing enabled | Shows direction, timeframe, kind, lifecycle state, and fill percentage. |
| CONFLUENCE LABEL | Qualifying overlap | Shows contributing timeframes, kinds, state, fill, age, and provenance. |
Settings
The 77 rows below are the current public settings. They reflect chart FVGs on by default, Auto comparison timeframes, the Midpoint (CE) line group, a separate MTF Structure pair for higher-timeframe order blocks, four confluence alert toggles, and the dashboard.
FVG Drawings11 inputs
Swipe or scroll horizontally to see every column.
| Setting | Control | Default | Choices, limits & availability |
|---|---|---|---|
| Enable FVGsfvg_enable | Toggle | On | — |
| Max FVGs per sidefvg_max | Whole number | 12 | Min 1 · Max 30 |
| Mitigation / fill rulefvg_confirm | Choice / text | Wick | Wick · Close |
| Minimum gap filterfvg_min_mode | Choice / text | ATR | ATR · Ticks |
| Minimum gapfvg_min_value | Decimal | 0.05 | Min 0.0 · Step 0.01 |
| Minimum ticksfvg_min_ticks | Decimal | 1.0 | Min 1.0 |
| Shrink on partial fillfvg_shrink | Toggle | Off | — |
| Keep filled FVGsfvg_keep_filled | Toggle | Off | — |
| Show state on FVGfvg_show_state | Toggle | Off | — |
| FVG bull / bearbull_fvg_color | Color | Green · 82% transparent | — |
| Colorbear_fvg_color | Color | Red · 82% transparent | — |
FVG Labels5 inputs
Swipe or scroll horizontally to see every column.
| Setting | Control | Default | Choices, limits & availability |
|---|---|---|---|
| Show % filledfvg_pct_show | Toggle | On | — |
| Label positionfvg_pct_pos | Choice / text | Right of Box | Inside Box · Right of Box |
| Right offset (bars)fvg_pct_offset | Whole number | 2 | Min 0 · Max 50 |
| Text sizefvg_pct_size | Choice / text | Medium | Small · Medium · Large |
| FVG label colorfvg_pct_color | Color | White | — |
Order Blocks8 inputs
Swipe or scroll horizontally to see every column.
| Setting | Control | Default | Choices, limits & availability |
|---|---|---|---|
| Enable Order Blocksob_enable | Toggle | Off | — |
| Max OBs per sideob_max | Whole number | 8 | Min 1 · Max 20 |
| Swing strengthob_swing | Whole number | 5 | Min 1 · Max 20 |
| OB candle lookbackob_lookback | Whole number | 10 | Min 2 · Max 40 |
| Show breakersob_show_breakers | Toggle | On | — |
| OB partial fillob_partial_fill | Toggle | Off | — |
| OB bull / bearbull_ob_color | Color | Teal · 78% transparent | — |
| Colorbear_ob_color | Color | Maroon · 78% transparent | — |
MTF Confluence18 inputs
Swipe or scroll horizontally to see every column.
| Setting | Control | Default | Choices, limits & availability |
|---|---|---|---|
| Enable MTF zonesmtf_enable | Toggle | On | — |
| Compare timeframe 1mtf_tf1_input | Choice / text | Auto | Auto · 1 · 3 · 5 · 10 · 15 · 30 · 45 · 60 · 120 · 180 · 240 · 480 · 720 · D · W · M |
| Compare timeframe 2mtf_tf2_input | Choice / text | Auto | Auto · 1 · 3 · 5 · 10 · 15 · 30 · 45 · 60 · 120 · 180 · 240 · 480 · 720 · D · W · M |
| Include TF1 in confluencesrc_tf1 | Toggle | On | — |
| Include TF2 in confluencesrc_tf2 | Toggle | On | — |
| Show TF1 raw zonesmtf_show_raw_tf1 | Toggle | Off | — |
| TF1 raw zone typesmtf_raw_tf1_kind | Choice / text | FVGs and Order Blocks | FVGs and Order Blocks · FVGs only · Order Blocks only |
| TF1 raw partial fillmtf_raw_tf1_partial_fill | Toggle | On | — |
| Show TF1 100% filled zonesmtf_raw_tf1_show_filled | Toggle | Off | — |
| TF1 colormtf_tf1_color | Color | Blue · 75% transparent | — |
| Show TF2 raw zonesmtf_show_raw_tf2 | Toggle | Off | — |
| TF2 raw zone typesmtf_raw_tf2_kind | Choice / text | FVGs and Order Blocks | FVGs and Order Blocks · FVGs only · Order Blocks only |
| TF2 raw partial fillmtf_raw_tf2_partial_fill | Toggle | On | — |
| Show TF2 100% filled zonesmtf_raw_tf2_show_filled | Toggle | Off | — |
| TF2 colormtf_tf2_color | Color | Purple · 75% transparent | — |
| Max zones per HTF/typemtf_max | Whole number | 12 | Min 1 · Max 30 |
| HTF lookback (calendar days)mtf_days | Whole number | 20 | Min 1 · Max 365 |
| Show raw HTF labelsmtf_show_raw_labels | Toggle | On | — |
Confluence Evidence18 inputs
Swipe or scroll horizontally to see every column.
| Setting | Control | Default | Choices, limits & availability |
|---|---|---|---|
| Include Order Blocks in confluenceconfl_include_obs | Toggle | Off | — |
| Minimum overlap (ATR)confl_min_atr | Decimal | 0.05 | Min 0.0 · Step 0.01 |
| Max confluence bandsconfl_max | Whole number | 8 | Min 1 · Max 20 |
| Confluence partial fillconfl_partial_fill | Toggle | On | — |
| Confluence fill % labelconfl_fill_label | Toggle | On | — |
| Show provenance labelsconfl_show_labels | Toggle | On | — |
| Show confluence stateconfl_show_state | Toggle | On | — |
| Show confluence ageconfl_show_age | Toggle | On | — |
| Confluence age formatconfl_age_mode | Choice / text | Chart bars | HH:MM:SS · Chart bars |
| Label spacing (ATR)confl_label_gap_atr | Decimal | 0.75 | Min 0.25 · Max 2.0 · Step 0.05 |
| Confluence label offset (bars)confl_label_row_bars | Whole number | 3 | Min 1 · Max 100 |
| FRESHconfl_show_fresh | Toggle | On | — |
| TESTEDconfl_show_tested | Toggle | On | — |
| PARTIALconfl_show_partial | Toggle | On | — |
| FILLEDconfl_show_filled | Toggle | Off | — |
| Overlap 1 / 2 / 3+confl_single_color | Color | Yellow | — |
| Colorconfl_double_color | Color | Orange | — |
| Colorconfl_dense_color | Color | Red | — |
Visuals1 input
Swipe or scroll horizontally to see every column.
| Setting | Control | Default | Choices, limits & availability |
|---|---|---|---|
| Label sizevisual_size | Choice / text | Normal | Tiny · Small · Normal |
Midpoint (CE)7 inputs
Swipe or scroll horizontally to see every column.
| Setting | Control | Default | Choices, limits & availability |
|---|---|---|---|
| Show 50% midpointce_show | Toggle | On | — |
| Chart zonesce_show_chart | Toggle | On | — |
| Raw HTFce_show_htf | Toggle | On | — |
| Bandsce_show_bands | Toggle | On | — |
| Line color / style / widthce_color | Color | Gray · 25% transparent | — |
| ce style inputce_style_input | Choice / text | Dashed | Solid · Dashed · Dotted |
| ce widthce_width | Whole number | 1 | Min 1 · Max 4 |
MTF Structure2 inputs
Swipe or scroll horizontally to see every column.
| Setting | Control | Default | Choices, limits & availability |
|---|---|---|---|
| HTF swing strengthmtf_ob_swing | Whole number | 5 | Min 1 · Max 20 |
| HTF OB candle lookbackmtf_ob_lookback | Whole number | 10 | Min 2 · Max 40 |
Alerts4 inputs
Swipe or scroll horizontally to see every column.
| Setting | Control | Default | Choices, limits & availability |
|---|---|---|---|
| Band formedalert_band_formed | Toggle | On | — |
| Price enteredalert_band_entered | Toggle | On | — |
| Reached 50%alert_band_mitigated | Toggle | On | — |
| Filledalert_band_filled | Toggle | On | — |
Dashboard3 inputs
Swipe or scroll horizontally to see every column.
| Setting | Control | Default | Choices, limits & availability |
|---|---|---|---|
| Show dashboarddash_show | Toggle | On | — |
| Positiondash_position | Choice / text | Top right | Top right · Top left · Middle right · Bottom right · Bottom left |
| Text sizedash_size | Choice / text | Small | Tiny · Small · Normal |
Alerts and limitations
What can notify you, what can change the output, and what the indicator cannot establish.
6 fixed alert conditions
A new chart-timeframe FVG confirmed.
A new chart-timeframe Order Block confirmed.
A new confluence band qualified on a confirmed bar.
Price first touched a tracked confluence band.
A tracked band reached its original overlap midpoint.
A tracked band was fully traversed.
Limits to keep visible
- TF1 and TF2 must both be higher than the chart timeframe and must be different; otherwise confluence is unavailable.
- Confluence means overlapping zone geometry. It is not a probability, quality score, recommendation, or outcome forecast.
- Close-basis penetration reads chart-bar closes, so lifecycle detail can differ across chart timeframes even when confirmed HTF geometry is unchanged.
- Raw-zone type filters and partial-fill drawings do not change which records feed confluence.
- FVG and OB records, confluence bands, boxes, and labels use bounded caps. Older records are removed as those caps are reached.
- A mixed STATIC band deliberately does not claim the pure-FVG percentage lifecycle, though it can still reach FILLED once its FVG side fully traverses.
- Label placement responds to the visible price range and zoom. In a crowded area, a label can temporarily keep only its zone anchor while its text is hidden rather than overlapped.
- Changing symbol, session, timeframe, or available history can change the set of zones and their apparent age.
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 don’t I see any confluence bands?
A band appears only when two qualifying zones overlap in the same direction. First turn on Enable MTF zones. Then make sure TF1 and TF2 are different, both are higher than the chart timeframe, and an overlap actually exists in the loaded history.
Why did my comparison timeframes move when I changed the chart timeframe?
Both comparison slots default to Auto, which tracks the chart: they resolve to the first and second standard step above whatever timeframe you are on, including on Weekly and Monthly charts. Choose a fixed timeframe in either slot if you want it to stay where you put it.
Why don’t Order Blocks show after I add the indicator?
Order Blocks start turned off. Enable Order Blocks to draw them on the chart. If you also want them to contribute to mixed confluence bands, turn on Include Order Blocks in confluence as a separate step.
Where is the consequent-encroachment (CE) line?
It is drawn by default. The Midpoint (CE) group toggles it independently for chart zones, raw higher-timeframe zones, and confluence bands, and sets its color, style, and width. It marks the original 50% level, so it stays put when partial fill shrinks the drawn box.
Why didn’t the confluence bands change when I changed the raw-zone display?
The TF1 and TF2 raw-zone dropdowns control what you see, not which eligible records feed the overlap calculation. Use them to reduce chart clutter; do not expect them to change confluence.
Why did a fully filled raw zone disappear?
Fully filled TF1 and TF2 zones are hidden by default. Turn on Show TF1/TF2 100% filled zones if you want the completed zone to remain visible. Its record can still be tracked even while the drawing is hidden.
Why is a mixed band labeled STATIC?
That band combines FVG and Order Block evidence. Because the two zone types do not share one fill-percentage lifecycle, the script labels the overlap STATIC instead of showing a misleading percentage.
Why did a label temporarily lose its text?
The chart became too crowded to place every label legibly. The zone anchor stays visible while extra text is hidden. Zoom in, scroll, or reduce nearby labels; the text can return when there is room.
Why does a fresh chart FVG have no 0% label?
With Keep filled FVGs off, a fresh chart-timeframe FVG can remain visible without showing the 0% fill text. The FRESH state still identifies it. Turn on Keep filled FVGs if you want the full percentage lifecycle displayed.
Why is an alert I created from the defaults staying quiet?
Check which kind you created. FVG formed now fires from a fresh install because chart FVGs start on, but Order Block formed still needs Enable Order Blocks turned on first. The four confluence alerts are emitted through alert() instead of a named condition, so they arrive only on an alert created with Any alert() function call.