OPEN-SOURCE SCRIPT
更新済 Adaptive Gann & Fibonacci Confluence

Adaptive Gann & Fibonacci Confluence
Overview
This indicator automatically detects the dominant swing on your chart — the highest high and lowest low over a lookback you set — and projects three classic geometric tools from that single shared anchor: a Gann fan, a Fibonacci fan, and Fibonacci retracement levels. Because all three are built on the same swing, their levels can be compared directly on one chart.
Why these tools are combined
A Gann fan and Fibonacci retracements measure two different things. A Gann fan measures trend slope — the geometric balance between price and time, where the 1×1 angle represents one unit of price per unit of time. Fibonacci retracements measure pullback depth — proportional price levels inside a move (23.6 / 38.2 / 50 / 61.8 / 78.6%). Used separately, each tool is anchored differently and the two rarely line up. By forcing both to share one auto-detected swing origin and direction, the script exposes price areas where a Gann angle and a Fibonacci level coincide. A level confirmed by both slope geometry and retracement proportion is the intended point of interest — more meaningful than a level from either method alone.
How the components work together
The script finds the swing once, then anchors the Gann fan, the Fibonacci fan, and the retracement grid to the same origin and trend direction. The Gann rays and the Fibonacci levels therefore sit on a common reference, so you can spot where a fan ray crosses a retracement level at roughly the same price — that overlap is the "confluence." Shaded zones mark the retracement bands, and a compact table summarizes the live read: directional bias, nearest support and resistance among the levels, current retracement depth, and a plain-language note on where price sits in the swing.
What makes it original
Rather than drawing Gann angles at fixed chart degrees (which break when you change instrument or zoom), the 1×1 angle here is scaled to the swing's actual price-per-bar, so the angles stay consistent across symbols and timeframes. That swing-scaled Gann geometry is then rendered together with Fibonacci fan and retracement structure on a single, automatically updating anchor — with confluence surfaced visually and condensed into a live snapshot table. The drawing engine rebuilds only when the underlying swing changes, keeping it light.
How to use it
Set Swing lookback to the structure you trade: smaller values track recent swings, larger values capture higher-timeframe structure.
The gold line is the 1×1 (trend-balance) angle; how price reacts to it gauges trend strength.
Treat confluence (a fan ray meeting a retracement level) as an area of interest to study, not an automatic signal.
1×1 unit = 0 auto-scales to the swing; set it above 0 to fix a manual ticks-per-bar Gann unit.
Toggle the Gann fan, Fibonacci fan, retracement, zone shading, glow, and table independently in settings.
Disclaimer
For educational and informational purposes only. This script plots geometric levels and a mechanical summary of price position. It is not financial advice, not a recommendation to buy or sell, and offers no guarantee of future performance. Always do your own research and manage your risk.
Overview
This indicator automatically detects the dominant swing on your chart — the highest high and lowest low over a lookback you set — and projects three classic geometric tools from that single shared anchor: a Gann fan, a Fibonacci fan, and Fibonacci retracement levels. Because all three are built on the same swing, their levels can be compared directly on one chart.
Why these tools are combined
A Gann fan and Fibonacci retracements measure two different things. A Gann fan measures trend slope — the geometric balance between price and time, where the 1×1 angle represents one unit of price per unit of time. Fibonacci retracements measure pullback depth — proportional price levels inside a move (23.6 / 38.2 / 50 / 61.8 / 78.6%). Used separately, each tool is anchored differently and the two rarely line up. By forcing both to share one auto-detected swing origin and direction, the script exposes price areas where a Gann angle and a Fibonacci level coincide. A level confirmed by both slope geometry and retracement proportion is the intended point of interest — more meaningful than a level from either method alone.
How the components work together
The script finds the swing once, then anchors the Gann fan, the Fibonacci fan, and the retracement grid to the same origin and trend direction. The Gann rays and the Fibonacci levels therefore sit on a common reference, so you can spot where a fan ray crosses a retracement level at roughly the same price — that overlap is the "confluence." Shaded zones mark the retracement bands, and a compact table summarizes the live read: directional bias, nearest support and resistance among the levels, current retracement depth, and a plain-language note on where price sits in the swing.
What makes it original
Rather than drawing Gann angles at fixed chart degrees (which break when you change instrument or zoom), the 1×1 angle here is scaled to the swing's actual price-per-bar, so the angles stay consistent across symbols and timeframes. That swing-scaled Gann geometry is then rendered together with Fibonacci fan and retracement structure on a single, automatically updating anchor — with confluence surfaced visually and condensed into a live snapshot table. The drawing engine rebuilds only when the underlying swing changes, keeping it light.
How to use it
Set Swing lookback to the structure you trade: smaller values track recent swings, larger values capture higher-timeframe structure.
The gold line is the 1×1 (trend-balance) angle; how price reacts to it gauges trend strength.
Treat confluence (a fan ray meeting a retracement level) as an area of interest to study, not an automatic signal.
1×1 unit = 0 auto-scales to the swing; set it above 0 to fix a manual ticks-per-bar Gann unit.
Toggle the Gann fan, Fibonacci fan, retracement, zone shading, glow, and table independently in settings.
Disclaimer
For educational and informational purposes only. This script plots geometric levels and a mechanical summary of price position. It is not financial advice, not a recommendation to buy or sell, and offers no guarantee of future performance. Always do your own research and manage your risk.
リリースノート
Minor updatesリリースノート
minor updateオープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
免責事項
これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
免責事項
これらの情報および投稿は、TradingViewが提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。