Appearance

Personalize your experience

Mode
Accent Color
Direction
Analysis Marketplace
QuaScript

Fibonacci Confluence Zones

NewFree

Retracements of five legs clustered into ranked confluence zones

Trendlines & LevelsPrice overlay WebGPU CanvasHybridZonesDashboardSignalsAlerts
quascriptlevelsfibonacciconfluencezonesretracement

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
Fibonacci Confluence Zonesengine result
Loading the engine result…
quatick-charts · QuaScript engine on synthetic 1-minute bars · drag to pan · scroll to zoom · Run executes the script on the engine (⌘/Ctrl+Enter while editing)

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.

2
Plotted series
4
Signal marks
2
Drawings
3
Alert rules
6
Settings
154
Lines of code

What it draws

Price overlay · counted from the engine's plot table and the script's draw calls

Series

  • Step line2
    Nearest support zoneNearest resistance zone
Legend
Nearest support zone Nearest resistance zone

Signal marks

Zone bounceZone rejectionThrough strong zone upThrough strong zone down

Drawings and chart effects

  • Dashboard tables1 created
  • Zones1 created

How it runs

From source to the live chart, for this script

  1. 1
    Compile

    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.

  2. 2
    Place

    The header sets overlay = true, so everything is drawn on the price chart, on the same scale as the candles.

  3. 3
    Compute

    The script runs once per bar, oldest to newest. Each bar also runs 9 loops (5 for, 4 while). 5 persist variables keep state (objects, counters) across bars.

  4. 4
    Stay 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.

  5. 5
    Render

    The results are handed to the chart: series on WebGPU, drawings on the Canvas 2D QuaScript layer.

  6. 6
    Tune

    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

WebGPUSeries renderer

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.

In this script
  • • 2 plotted series
  • • 4 signal mark types

Chosen by render = webgpu in the header.

WebGLNot used

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.

CanvasUsed

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.

In this script
  • • 1 dashboard tables (QuaScript layer)
  • • 1 zones (QuaScript layer)

Alerts

3 alert rules declared with alert.rule

Zone bounce

Price probed a Fibonacci confluence zone and closed back above it

Zone rejection

Price probed a Fibonacci confluence zone and closed back below it

Through strong zone

Price closed through a confluence zone of strength three or more

Settings

6 settings, grouped as in the chart's settings dialog

Swings
SettingTypeDefaultRange / optionsId
Swing bars leftInteger82 – 50swing_bars_left
Swing bars rightInteger41 – 30swing_bars_right
Zones
SettingTypeDefaultRange / optionsId
Cluster tolerance (ATR)Number0.350.05 – 2, step 0.05cluster_tolerance_atr
Minimum strengthNumber21.5 – 6, step 0.5minimum_strength
Zones drawnInteger61 – 16zones_drawn
Signals
SettingTypeDefaultRange / optionsId
Bars between repeatsInteger121 – 500bars_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

Technical analysis (ta.*)
ta.atrta.bars_sinceta.pivot_highta.pivot_low
Lists (list.*)
list.clearlist.createlist.getlist.lastlist.poplist.pushlist.setlist.shiftlist.sizelist.sort_by
Math (math.*)
math.coalescemath.is_namath.maxmath.min
Imported modules
viz/premium

Discussion

Sign in to join the discussion. Your posts and replies show up on your profile.