Appearance
Personalize your experience
Fibonacci Confluence Zones
NewFreeRetracements of five legs clustered into ranked confluence zones
Favourites and Admin's Choice analyses are listed in the terminal's indicators window under Analysis Marketplace.
- Language
- QuaScript
- Engine
- Native C++, incremental on live ticks
- Rendering
- WebGPU + Canvas
- Placement
- Price overlay
- Settings
- 6
- Plots
- 2
- Lines of code
- 167
- Source
- presets/analysis/levels/fibonacci_confluence_zones.qs
About
Retracement levels from the last five swing legs at once, clustered into zones. A single leg's 38.2 / 50 / 61.8 / 78.6 % levels are weak on their own; where levels from several different legs land within a fraction of an ATR of each other, many traders are watching the same price. Every cluster of two or more levels becomes a zone, its strength is the number of legs that agree (61.8 % counts one and a half), and zones are painted on a plasma ramp from violet (two legs) to gold (five or more). Reading: the brightest zone below price in an uptrend is the most likely pullback target; a close back above it after a probe is a high-quality long. A close through a bright zone on momentum usually runs to the next one. Signals: bounce from a support zone, rejection from a resistance zone, close through a strong zone.
What it draws
Price overlay · counted from the engine's plot table and the script's draw calls
Series
- Step line2Nearest support zoneNearest resistance zone
Signal marks
Drawings and chart effects
- Dashboard tables1 created
- Zones1 created
How it runs
From source to the live chart, for this script
- 1Compile
The QuaScript compiler checks the 167-line script (154 lines of code) and lowers it for the native C++ engine. Compile errors point at the exact line and column.
- 2Place
The header sets
overlay = true, so everything is drawn on the price chart, on the same scale as the candles. - 3Compute
The script runs once per bar, oldest to newest. Each bar also runs 9 loops (5 for, 4 while). 5
persistvariables keep state (objects, counters) across bars. - 4Stay live
On the terminal the script keeps one live engine session: a tick rolls the forming bar back to its checkpoint and re-executes only that bar, and new bars are appended, so history is never rerun while the market moves. The live result is identical to a full run.
- 5Render
The results are handed to the chart: series on WebGPU, drawings on the Canvas 2D QuaScript layer.
- 6Tune
6 settings in 3 groups appear in the chart's settings dialog. Changing one reruns the engine with the new value.
Rendering
Hybrid: this script draws on 2 surfaces at once
The browser's modern GPU API. The chart uploads every line, band and mark of the script as GPU buffers and draws them in one pass, so dense heatmaps and dozens of series stay smooth while you pan and zoom. Without WebGPU support the chart's GPU layer falls back to WebGL 2, then Canvas 2D.
- • 2 plotted series
- • 4 signal mark types
Chosen by render = webgpu in the header.
GPU drawing through WebGL 2, available in every current browser. Used for chart-native profiles and for series that ask for it with backend = "webgl". Fast for large numbers of bars and wide fills.
The browser's 2D drawing API. Text-heavy and object-style output (dashboard tables, zones, tags, segments), candle colors and backgrounds are painted by the QuaScript layer, a Canvas 2D surface over the chart. Series use Canvas when the script's header does not ask for a GPU.
- • 1 dashboard tables (QuaScript layer)
- • 1 zones (QuaScript layer)
Alerts
3 alert rules declared with alert.rule
Price probed a Fibonacci confluence zone and closed back above it
Price probed a Fibonacci confluence zone and closed back below it
Price closed through a confluence zone of strength three or more
Settings
6 settings, grouped as in the chart's settings dialog
| Setting | Type | Default | Range / options | Id |
|---|---|---|---|---|
| Swing bars left | Integer | 8 | 2 – 50 | swing_bars_left |
| Swing bars right | Integer | 4 | 1 – 30 | swing_bars_right |
| Setting | Type | Default | Range / options | Id |
|---|---|---|---|---|
| Cluster tolerance (ATR) | Number | 0.35 | 0.05 – 2, step 0.05 | cluster_tolerance_atr |
| Minimum strength | Number | 2 | 1.5 – 6, step 0.5 | minimum_strength |
| Zones drawn | Integer | 6 | 1 – 16 | zones_drawn |
| Setting | Type | Default | Range / options | Id |
|---|---|---|---|---|
| Bars between repeats | Integer | 12 | 1 – 500 | bars_between_repeats |
Script
packages/quascript/presets/analysis/levels/fibonacci_confluence_zones.qs
Header
analysis "Fibonacci Confluence Zones" {
overlay = true
render = webgpu
short_title = FCZ
precision = 2
max_objects = 80
}- Total lines
- 167
- Code lines
- 154
- Comment lines
- 12
- Helper functions
- 0
- Loops
- 9
- Persistent variables
- 5
- Higher-interval feeds
- 0
- Engine plots
- 2
Built with
ta.atrta.bars_sinceta.pivot_highta.pivot_lowlist.clearlist.createlist.getlist.lastlist.poplist.pushlist.setlist.shiftlist.sizelist.sort_bymath.coalescemath.is_namath.maxmath.minviz/premium
Discussion