OPEN-SOURCE SCRIPT
Updated Fibonacci Impulse Layers [josseliani]

Fibonacci Impulse Layers shows the Fibonacci Golden Zones of three active market-structure layers directly on the chart:
→ Bias — the broader structure, calculated on 4H by default.
→ Macro — the larger impulse on the current chart timeframe, using Pivot Depth 12 by default.
→ Local — the smaller and more reactive impulse, using Pivot Depth 3 by default.
Bias shows the broader direction and helps identify whether the market is moving with that trend or correcting against it. Macro shows the intermediate impulse in relation to Bias. Local shows the nearest active structure in relation to Macro.
Local correction → Macro Golden Zone
Macro correction → Bias Golden Zone
Golden Zone reaction → Potential return toward the relevant structural High or Low
The indicator does not calculate Fibonacci extension targets. Its purpose is to identify active 50–61.8 Golden Zones and show where price is located within the Bias, Macro, and Local impulse structure.
📊 THREE STRUCTURAL LAYERS
1️⃣ Bias
Bias provides the broader market context.
It is calculated on a separately selected timeframe. The default is 4H, but the user can select 1H, 1D, 1W, or another timeframe equal to or higher than the current chart timeframe.
Bias helps identify:
→ the direction of the broader active impulse;
→ whether Macro is moving with Bias or correcting against it;
→ the location of the broader 50–61.8 Golden Zone;
→ the structural High or Low belonging to the active Bias impulse.
2️⃣ Macro
Macro is calculated on the current chart timeframe using a larger pivot depth.
Its default Pivot Depth is 12, so it reacts more slowly than Local and represents a broader impulse.
When Macro moves against Bias, the table identifies it as a counter-Bias move. In that situation, the Bias Golden Zone may become the broader structural destination.
3️⃣ Local
Local is also calculated on the current chart timeframe, but with a smaller Pivot Depth of 3 by default.
It follows the nearest active impulse and displays the closest Golden Zone.
When Local moves against Macro, that movement may represent a Local correction toward the Macro Golden Zone rather than a reversal of the broader structure.
🧩 HOW THE STRUCTURE IS CALCULATED
Each layer identifies confirmed pivot Highs and Lows and maintains its own active bullish or bearish impulse.
Two Structure Break modes are available:
→ Wick — the structure changes when the High or Low breaks the active structural level.
→ Close — the structure changes only after a candle closes beyond that level.
Lower Pivot Depth → smaller and more reactive structure
Higher Pivot Depth → broader and slower structure
Each active layer contains:
• Impulse direction
• Structural High and Low
• Fibonacci retracement levels
• 50–61.8 Golden Zone
• Return reference toward the active structural extreme
📐 READING THE GOLDEN ZONES
The primary retracement area is 50–61.8.
For a bullish impulse:
Impulse Low → Impulse High → Pullback from above into 50–61.8 → Potential return toward the High
For a bearish impulse:
Impulse High → Impulse Low → Pullback from below into 50–61.8 → Potential return toward the Low
The direction of entry matters.
A bullish Golden Zone becomes active when price enters it from above. A bearish Golden Zone becomes active when price enters it from below.
If price has crossed through the complete area and later returns from the wrong side, that return is not treated as a new valid retracement.
Each Golden Zone can generate only one valid retracement event per active impulse. Leaving and returning to the same zone does not create another event. A new event becomes available only after the corresponding structure updates its High, Low, or direction.
Macro and Bias can display the 23.6, 38.2, 50, 61.8, 78.6, and optional 88.6 levels.
Local uses a cleaner display focused on 38.2 and the 50–61.8 Golden Zone.
🔍 ALIGNMENT AND MARKET STATE
The indicator does not assume that every Local change has already reversed the Macro or Bias structure.
Alignment reports which layers currently point in the same direction:
• FULL BULLISH ALIGNMENT
• FULL BEARISH ALIGNMENT
• BIAS + MACRO ALIGNED / LOCAL OPPOSITE
• MACRO + LOCAL ALIGNED / BIAS OPPOSITE
• BIAS + LOCAL ALIGNED / MACRO OPPOSITE
Market State explains what that combination represents:
• Bullish or bearish continuation
• Local pullback within the broader trend
• Counter-Bias Macro move
• Local reaction against the active Macro structure
Alignment shows which layers agree. Market State explains what the current combination represents.
Full three-layer alignment is not required to use the indicator. The table also describes corrective and counter-trend structures.
📋 DECISION TABLE
The Decision Table combines the three layers into one market map.
→ Bias, Macro, and Local show their current direction and Golden Zone prices.
→ Alignment shows which structural layers agree.
→ Market State distinguishes continuation, correction, and counter-structure movement.
→ Status shows whether price is currently inside a valid Local, Macro, Bias, or combined Golden Zone.
→ Local Plan shows the Local Golden Zone and the relevant Local High or Low. When Local opposes Macro, the Macro Golden Zone may appear as the next structural area.
→ Macro Plan shows the Macro Golden Zone and the relevant Macro High or Low. When Macro opposes Bias, the Bias Golden Zone may appear as the broader structural area.
→ Bias Plan shows the Bias Golden Zone and its active structural High or Low.
The plans describe the currently calculated structural route. They are not automatic entries, stop-loss levels, or guaranteed targets.
⚙️ SETTINGS
Local Pivot Depth
Controls the smaller structure on the current chart timeframe.
Lower value → faster Local reactions
Higher value → broader Local impulses
Default: 3.
Macro Pivot Depth
Controls the larger structure on the current chart timeframe.
Increase it when Macro changes too frequently. Decrease it when Macro reacts too slowly.
Default: 12.
Bias Timeframe
Selects the timeframe used for the broader Bias structure.
It must be equal to or higher than the current chart timeframe.
Default: 4H.
Bias Pivot Depth
Controls pivot sensitivity inside the selected Bias timeframe.
Use Confirmed Bias
Enabled by default.
✓ Enabled — uses the last fully completed Bias timeframe candle.
✕ Disabled — uses the developing Bias candle and can change before that candle closes.
The active mode appears in the table as CONFIRMED or LIVE.
Structure Break
Wick provides faster structural updates.
Close requires a candle close beyond the structural level and provides stricter confirmation.
Fibonacci display
Macro and Bias Fibonacci levels can be enabled or disabled individually. The optional 88.6 level is disabled by default.
The user can also control:
• Impulse diagonals
• Structural High and Low lines
• 50–61.8 fills
• Local pivot dots
• Level extension length
• Labels
• Colors and transparency
• Table position and text size
🔔 ALERTS
The script includes five alert conditions:
• Full Bullish Alignment
• Full Bearish Alignment
• Valid Local Retracement
• Valid Macro Retracement
• Valid Bias Retracement
Retracement alerts trigger only on the first valid entry into the relevant 50–61.8 area from the correct correction side during the current impulse.
The chart and table can react while the current candle is forming. Alerts are confirmed at the chart candle close and trigger when a new qualifying condition begins.
⚠️ IMPORTANT NOTES
Pivot structures require bars on both sides of a swing before the pivot can be confirmed. A new pivot therefore appears only after the selected Pivot Depth has completed.
The active structure can update when new structural Highs, Lows, or breaks develop.
The live table may change during the current candle as price enters or leaves a Golden Zone. Historical calculations and alert events are represented using completed chart candles.
Confirmed Bias uses completed higher-timeframe information. Live Bias is more responsive but can change while the selected Bias candle remains open.
The indicator keeps only the active Local, Macro, and Bias structures. Previous Fibonacci grids are removed to keep the chart readable.
Fibonacci Impulse Layers is a market-structure analysis tool. It does not execute trades, calculate Fibonacci extensions, or guarantee that price will react at a displayed level.
→ Bias — the broader structure, calculated on 4H by default.
→ Macro — the larger impulse on the current chart timeframe, using Pivot Depth 12 by default.
→ Local — the smaller and more reactive impulse, using Pivot Depth 3 by default.
Bias shows the broader direction and helps identify whether the market is moving with that trend or correcting against it. Macro shows the intermediate impulse in relation to Bias. Local shows the nearest active structure in relation to Macro.
Local correction → Macro Golden Zone
Macro correction → Bias Golden Zone
Golden Zone reaction → Potential return toward the relevant structural High or Low
The indicator does not calculate Fibonacci extension targets. Its purpose is to identify active 50–61.8 Golden Zones and show where price is located within the Bias, Macro, and Local impulse structure.
📊 THREE STRUCTURAL LAYERS
1️⃣ Bias
Bias provides the broader market context.
It is calculated on a separately selected timeframe. The default is 4H, but the user can select 1H, 1D, 1W, or another timeframe equal to or higher than the current chart timeframe.
Bias helps identify:
→ the direction of the broader active impulse;
→ whether Macro is moving with Bias or correcting against it;
→ the location of the broader 50–61.8 Golden Zone;
→ the structural High or Low belonging to the active Bias impulse.
2️⃣ Macro
Macro is calculated on the current chart timeframe using a larger pivot depth.
Its default Pivot Depth is 12, so it reacts more slowly than Local and represents a broader impulse.
When Macro moves against Bias, the table identifies it as a counter-Bias move. In that situation, the Bias Golden Zone may become the broader structural destination.
3️⃣ Local
Local is also calculated on the current chart timeframe, but with a smaller Pivot Depth of 3 by default.
It follows the nearest active impulse and displays the closest Golden Zone.
When Local moves against Macro, that movement may represent a Local correction toward the Macro Golden Zone rather than a reversal of the broader structure.
🧩 HOW THE STRUCTURE IS CALCULATED
Each layer identifies confirmed pivot Highs and Lows and maintains its own active bullish or bearish impulse.
Two Structure Break modes are available:
→ Wick — the structure changes when the High or Low breaks the active structural level.
→ Close — the structure changes only after a candle closes beyond that level.
Lower Pivot Depth → smaller and more reactive structure
Higher Pivot Depth → broader and slower structure
Each active layer contains:
• Impulse direction
• Structural High and Low
• Fibonacci retracement levels
• 50–61.8 Golden Zone
• Return reference toward the active structural extreme
📐 READING THE GOLDEN ZONES
The primary retracement area is 50–61.8.
For a bullish impulse:
Impulse Low → Impulse High → Pullback from above into 50–61.8 → Potential return toward the High
For a bearish impulse:
Impulse High → Impulse Low → Pullback from below into 50–61.8 → Potential return toward the Low
The direction of entry matters.
A bullish Golden Zone becomes active when price enters it from above. A bearish Golden Zone becomes active when price enters it from below.
If price has crossed through the complete area and later returns from the wrong side, that return is not treated as a new valid retracement.
Each Golden Zone can generate only one valid retracement event per active impulse. Leaving and returning to the same zone does not create another event. A new event becomes available only after the corresponding structure updates its High, Low, or direction.
Macro and Bias can display the 23.6, 38.2, 50, 61.8, 78.6, and optional 88.6 levels.
Local uses a cleaner display focused on 38.2 and the 50–61.8 Golden Zone.
🔍 ALIGNMENT AND MARKET STATE
The indicator does not assume that every Local change has already reversed the Macro or Bias structure.
Alignment reports which layers currently point in the same direction:
• FULL BULLISH ALIGNMENT
• FULL BEARISH ALIGNMENT
• BIAS + MACRO ALIGNED / LOCAL OPPOSITE
• MACRO + LOCAL ALIGNED / BIAS OPPOSITE
• BIAS + LOCAL ALIGNED / MACRO OPPOSITE
Market State explains what that combination represents:
• Bullish or bearish continuation
• Local pullback within the broader trend
• Counter-Bias Macro move
• Local reaction against the active Macro structure
Alignment shows which layers agree. Market State explains what the current combination represents.
Full three-layer alignment is not required to use the indicator. The table also describes corrective and counter-trend structures.
📋 DECISION TABLE
The Decision Table combines the three layers into one market map.
→ Bias, Macro, and Local show their current direction and Golden Zone prices.
→ Alignment shows which structural layers agree.
→ Market State distinguishes continuation, correction, and counter-structure movement.
→ Status shows whether price is currently inside a valid Local, Macro, Bias, or combined Golden Zone.
→ Local Plan shows the Local Golden Zone and the relevant Local High or Low. When Local opposes Macro, the Macro Golden Zone may appear as the next structural area.
→ Macro Plan shows the Macro Golden Zone and the relevant Macro High or Low. When Macro opposes Bias, the Bias Golden Zone may appear as the broader structural area.
→ Bias Plan shows the Bias Golden Zone and its active structural High or Low.
The plans describe the currently calculated structural route. They are not automatic entries, stop-loss levels, or guaranteed targets.
⚙️ SETTINGS
Local Pivot Depth
Controls the smaller structure on the current chart timeframe.
Lower value → faster Local reactions
Higher value → broader Local impulses
Default: 3.
Macro Pivot Depth
Controls the larger structure on the current chart timeframe.
Increase it when Macro changes too frequently. Decrease it when Macro reacts too slowly.
Default: 12.
Bias Timeframe
Selects the timeframe used for the broader Bias structure.
It must be equal to or higher than the current chart timeframe.
Default: 4H.
Bias Pivot Depth
Controls pivot sensitivity inside the selected Bias timeframe.
Use Confirmed Bias
Enabled by default.
✓ Enabled — uses the last fully completed Bias timeframe candle.
✕ Disabled — uses the developing Bias candle and can change before that candle closes.
The active mode appears in the table as CONFIRMED or LIVE.
Structure Break
Wick provides faster structural updates.
Close requires a candle close beyond the structural level and provides stricter confirmation.
Fibonacci display
Macro and Bias Fibonacci levels can be enabled or disabled individually. The optional 88.6 level is disabled by default.
The user can also control:
• Impulse diagonals
• Structural High and Low lines
• 50–61.8 fills
• Local pivot dots
• Level extension length
• Labels
• Colors and transparency
• Table position and text size
🔔 ALERTS
The script includes five alert conditions:
• Full Bullish Alignment
• Full Bearish Alignment
• Valid Local Retracement
• Valid Macro Retracement
• Valid Bias Retracement
Retracement alerts trigger only on the first valid entry into the relevant 50–61.8 area from the correct correction side during the current impulse.
The chart and table can react while the current candle is forming. Alerts are confirmed at the chart candle close and trigger when a new qualifying condition begins.
⚠️ IMPORTANT NOTES
Pivot structures require bars on both sides of a swing before the pivot can be confirmed. A new pivot therefore appears only after the selected Pivot Depth has completed.
The active structure can update when new structural Highs, Lows, or breaks develop.
The live table may change during the current candle as price enters or leaves a Golden Zone. Historical calculations and alert events are represented using completed chart candles.
Confirmed Bias uses completed higher-timeframe information. Live Bias is more responsive but can change while the selected Bias candle remains open.
The indicator keeps only the active Local, Macro, and Bias structures. Previous Fibonacci grids are removed to keep the chart readable.
Fibonacci Impulse Layers is a market-structure analysis tool. It does not execute trades, calculate Fibonacci extensions, or guarantee that price will react at a displayed level.
Release Notes
Improved Golden Zone status tracking: IN ZONE is shown during the initial interaction, then LAST TOUCH remains visible until the impulse reaches its High/Low target or is invalidated. Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Indicators, updates & setups:
Free Telegram: t.me/magicdiagonals
RSI Retest Scalper: whop.com/magic-diagonals/rsi-retest-scalper-pro/
Instagram🐶: instagram.com/magicdiagonals/
Free Telegram: t.me/magicdiagonals
RSI Retest Scalper: whop.com/magic-diagonals/rsi-retest-scalper-pro/
Instagram🐶: instagram.com/magicdiagonals/
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Indicators, updates & setups:
Free Telegram: t.me/magicdiagonals
RSI Retest Scalper: whop.com/magic-diagonals/rsi-retest-scalper-pro/
Instagram🐶: instagram.com/magicdiagonals/
Free Telegram: t.me/magicdiagonals
RSI Retest Scalper: whop.com/magic-diagonals/rsi-retest-scalper-pro/
Instagram🐶: instagram.com/magicdiagonals/
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.