Advanced Fibonacci Golden Zone [HexaTrades]Advanced Fibonacci Golden Zone automatically finds the market's significant swing legs and projects the Fibonacci Golden Zone, the 0.5 – 0.618 retracement pocket of the latest leg. That band is where trend-continuation entries are classically hunted. No manual fib drawing: the script detects the swing, anchors the retracement correctly for both directions, draws the zone the moment the swing confirms, manages the setup's whole lifecycle, and drives a duplicate-free alert stream.
⭐️How it works
True late-zone detection:
When a swing confirms, the script scans every bar from the actual pivot through the confirmation bar (wicks or closes, per Zone Touch Source). If the price has already reached the zone's near edge anywhere in that window, the zone is late and is skipped; no zone is ever painted behind a reaction that already happened. Strict rule: exactly touching the edge counts as late.
Superseded setups :
A skipped candidate retires the previously active setup immediately: status “Superseded”, zone frozen/faded, and total silence no false “Invalidated” alert (that one is reserved for setups price actually broke).
Invalidation frozen ATR buffer:
A setup dies when a bar closes beyond the protective swing by more than the Invalidation Buffer (× ATR). The buffer is measured once, at setup creation, and the invalidation price stays fixed for the setup's lifetime; later ATR changes can't move it. Dead zones gray out instantly and can never alert again; a broken leg is “poisoned” so its later extensions can't spawn a fresh setup.
Zone anchoring retracements vs projections
Bullish (up-leg): Retracement anchored at 0.0 at the high, 1.0 at the low → the 0.5–0.618 band sits below price as potential support.
Bearish (down-leg) : Mirror-anchored → the 0.5–0.618 band sits above the price as potential resistance.
Retracements (0–1.0) and continuation projections (1.272× / 1.618× of the impulse, beyond the extreme) are computed by separate functions and labelled separately projections are targets, not retracement ratios.
True late-zone detection :
When a swing confirms, the script scans every bar from the actual pivot through the confirmation bar (wicks or closes, per Zone Touch Source). If the price has already reached the zone's near edge anywhere in that window, the zone is late and is skipped; no zone is ever painted behind a reaction that already happened. Strict rule: exactly touching the edge counts as late.
Superseded setups:
A skipped candidate retires the previously active setup immediately: status “Superseded”, zone frozen/faded, and total silence no false “Invalidated” alert (that one is reserved for setups price actually broke).
Invalidation frozen ATR buffer:
A setup dies when a bar closes beyond the protective swing by more than the Invalidation Buffer (× ATR). The buffer is measured once, at setup creation, and the invalidation price stays fixed for the setup's lifetime; later ATR changes can't move it. Dead zones gray out instantly and can never alert again; a broken leg is “poisoned” so its later extensions can't spawn a fresh setup.
⭐️ Features
- Automatic Golden Zone (default 0.5 – 0.618, both ratios configurable)
- Optional fib levels: retracements 0 · 0.236 · 0.382 · 0.5 · 0.618 · 0.786 · 1.0 + separately labelled 1.272× / 1.618× projections
- ZigZag + HH / HL / LH / LL structure labels with live structure bias
- Historical zones stay frozen & softened; optional “One zone per leg” replaces same-leg drafts in place (off by default)
- Zone lifecycle: Waiting → Inside Zone → Rejected / Broke Out → Invalidated / Superseded dead zones gray out and go permanently silent
⭐️How to use it
- Wait for a fresh zone in the direction of the structure (HH+HL → longs, LH+LL → shorts).
- Let price come into the zone covered by the “Price Enters Golden Zone” .
- Look for the rejection: a candle that gets into the zone and closes back out in the trend direction.
- Targets & invalidation: Target 1 = the 0.0 level (the impulse extreme), Target 2 = the 1.272× projection, Target 3 = the 1.618× projection; status “Invalidated” (close beyond the protective swing + buffer) is the classical exit.
⭐️Alert
1 · Golden Zone Invalidated: close beyond the protective swing + frozen ATR buffer — kills the setup
2 · 1.618× Projection Reached: continuation target hit (also completes 1.272× if reached directly)
3 · 1.272× Projection Reached: continuation target hit
4 · Bullish / Bearish Rejection: candle gets into the zone, closes back out in trend direction (completes the entry latch too)
5 · Zone Breakout: price closes straight through the zone
6 · Price Enters Golden Zone: first touch of the zone
No zone-interaction alert can fire on the candle that creates a setup; signals are eligible from the following confirmed candle.
Bar-close confirmation is enforced in code (barstate.isconfirmed is part of every alert condition); alerts cannot trigger intrabar regardless of the frequency you pick. Still select “Once Per Bar Close”.
Advanced Fibonacci Golden Zone combines confirmed market structure, automatic Fibonacci mapping and complete setup management in one tool. It helps traders identify fresh retracement opportunities without manually drawing Fibonacci levels while keeping invalidation, projections and alerts consistent. Use it alongside trend context, price action and proper risk management—not as a standalone entry signal.
We would love to hear your suggestions. If you have ideas for new features, indicators, analytics, or improvements, please share your feedback. Your input helps guide future updates and improve the indicator for all traders.
Wedge pattern detector indicator is for educational and analytical purposes only. It is not financial advice. Trading involves risk. Always use proper risk management and combine this indicator with your own analysis before taking any trade.
Wskaźnik

Swing Fibonacci [BigBeluga]Swing Fibonacci is a high-precision geometric framework that merges traditional swing structure with parametric spiral projections. Unlike standard Fibonacci retracements that use static horizontal lines, this tool projects expanding harmonic spirals from major structural turning points to map out the "natural geometry" of the market.
By calculating the mathematical relationship between price volatility and time, the indicator identifies expansion shells where price is naturally inclined to react, stall, or reverse.
🔵 CONCEPTS
Macro Swing Detection: The engine utilizes a high-threshold lookback window (50–100 bars) to filter out market noise. It only identifies the most significant structural pivots, ensuring the spirals are anchored to "institutional" levels rather than minor retail fluctuations.
Anchor Points & Structural Mapping: At every confirmed trend reversal, the script anchors a ⦾ symbol. It then draws a solid "Swing Leg" connecting the current anchor to the previous one, providing a clear visual map of the market's structural transitions.
Parametric Fibonacci Spirals: The spirals are generated using a high-resolution 300-step parametric calculation. This ensures the curve remains perfectly smooth and mathematically accurate regardless of how many bars are on the screen.
Adaptive Price Normalization: To prevent the "squashed" look common in geometric tools, the spiral dynamically rescales itself based on the price range of the last 500 bars. This ensures the geometry stays proportional to current market volatility.
🔵 FEATURES
Institutional Data Dashboard: Located in the top-right corner, the dashboard provides real-time stats including the exact Anchor Price , the current Trend Status (BULLISH ▲ or BEARISH ▼), and the Swing % move from the low/high.
Real-Time Swing Tracking: A dynamic dashed line follows the current price, connecting it back to the active anchor point. This allows you to visualize the current "swing in progress" before it is finalized.
Parametric Control Suite:
• Radius: Adjusts the vertical "stretch" and overall size.
• Spiral Qty: Controls the number of rotations (up to 10) to project further into the future.
Color Flow Visualization: The spirals utilize a professional gradient transition from the bearish color (inner) to the bullish color (outer), visually representing the expansion of price energy.
🔵 HOW TO USE
Identify Reaction Zones: Price often treats the edges of the spiral curves as dynamic support and resistance. Look for "confluence" where a spiral curve intersects with a horizontal level or a previous swing point.
Forecasting Expansion:
• Bullish Spiral: Projects outward from a swing low, highlighting potential take-profit zones or areas where the trend might exhaust.
• Bearish Spiral: Projects from a swing high, identifying "expansion floors" for short positions.
Trend Confirmation: Use the Trend Squares at the bottom of the chart for a quick pulse on the current directional bias without cluttering the main price action.
Harmonic Timing: The spiral's horizontal reach provides a "time" component. If price reaches a specific spiral arc at a specific time, it often marks a high-probability turning point in the cycle.
🔵 CONCLUSION
Swing Fibonacci transforms abstract price action into a tangible geometric forecast. By anchoring dynamic, price-normalized spirals to the market’s strongest turning points, it provides a unique lens through which to view volatility, extension, and mean reversion.
Ideal for harmonic traders, swing analysts, and anyone looking for a deeper mathematical edge in their structural analysis. Wskaźnik

Volume Delta with Fibonacci Projection [UAlgo]Volume Delta Profile with Fibonacci Projection is a structure driven profiling tool that combines swing discovery, lower timeframe volume allocation, delta analysis, Fibonacci mapping, and forward target projection inside a single chart overlay. Its purpose is not only to show where price has moved, but also to show how participation was distributed inside that move and where the next projected objective levels may sit.
The script begins by identifying a dominant recent swing inside a user defined lookback window. Once that swing is found, it becomes the structural anchor for everything else in the indicator. The swing defines the full high to low range, the Fibonacci ladder, the profile segmentation, the delta bands, and the forward projection path. This creates a unified framework where all visual components are tied to the same market structure instead of being calculated independently.
A key part of the script is its lower timeframe profiling engine. It requests intrabar data from a lower timeframe and uses that data to distribute volume into price rows and Fibonacci bands inside the active swing. This allows the indicator to estimate where buying activity and selling activity were concentrated with far more detail than a simple bar based approximation. If lower timeframe data is unavailable for a given bar, the script falls back to the chart bar itself so the profile can still be built.
The profile section shows how total activity was distributed across the swing range, while the delta section shows which Fibonacci bands leaned more bullish or bearish in terms of estimated participation. A Point of Control line can also be drawn to highlight the most active profile row. In addition, the script projects a continuation path from a chosen Fibonacci level toward target extensions such as 100 percent, 127.2 percent, and 161.8 percent of the swing.
The result is a tool that can be used for structure analysis, premium and discount mapping, participation study, and projection planning. It is especially useful for traders who want to combine profile logic and Fibonacci logic inside the same structural framework rather than treating them as separate tools.
🔹 Features
🔸 Structure Based Swing Detection
The script automatically finds a recent dominant swing inside the selected lookback period and requires a minimum separation between the major high and low. This gives the indicator a clean structural base before any profile or projection is drawn.
🔸 Auto Lower Timeframe Intrabar Analysis
The indicator can automatically choose a lower timeframe for intrabar volume analysis based on the current chart timeframe. A custom intrabar timeframe can also be used if desired.
🔸 Volume Profile Across the Swing Range
The full swing range is divided into profile rows, and lower timeframe volume is distributed into those rows according to price overlap. This builds a true participation map across the swing rather than a simple one point volume assignment.
🔸 Delta by Fibonacci Band
In addition to row based profiling, the script also groups volume into six Fibonacci bands between the swing extremes. Each band receives estimated buy and sell volume, and the script calculates directional delta for each band.
🔸 Fib POC Highlighting
A Point of Control line can be displayed at the profile row with the highest total accumulated volume, giving the user a quick view of the strongest participation level inside the swing.
🔸 Flexible Row Sizing
Profile row size can be determined automatically from ATR and tick size, or it can be defined manually through ticks per row. This makes the profile adaptable to very different instruments.
🔸 Forward Projection Path
The script draws a projection path starting from a selected retracement level and extends it toward major target levels such as 100 percent, 127.2 percent, and 161.8 percent of the swing range.
🔸 Optional Target Boxes
Target zones can be shown as compact boxes around the projected objective levels, helping the user visualize likely reaction areas rather than only exact lines.
🔸 Bull and Bear Participation Coloring
The profile and delta display use directional coloring to separate estimated buying volume from estimated selling volume. This makes the participation structure much easier to read visually.
🔸 Complete Structural Integration
The swing line, Fibonacci levels, volume profile, delta profile, Point of Control, and projection targets all come from the same underlying swing. This keeps the whole tool internally consistent.
🔹 Calculations
1) Defining the Swing Object
type Swing
int startIndex
int endIndex
float startPrice
float endPrice
float lowPrice
float highPrice
float swingRange
bool bullish
int recentOffset
int olderOffset
This object stores the full structural context of the move being analyzed.
It contains:
where the swing starts,
where it ends,
the starting price,
the ending price,
the full low and high of the move,
the total range,
the direction,
and the bar offsets used for the profiling loop.
This is important because the script does not calculate the profile on an arbitrary fixed range. It first defines a real market swing and then builds all later logic from that anchor.
2) Choosing the Lower Timeframe Automatically
autoLowerTf() =>
if timeframe.isseconds
"1S"
else if timeframe.isminutes and timeframe.multiplier == 1
"1S"
else if timeframe.isintraday
"1"
else if timeframe.isdaily
"5"
else
"60"
This function selects a lower timeframe automatically according to the current chart timeframe.
Very fast charts use one second data.
Intraday charts use one minute data.
Daily charts use five minute data.
Higher charts default to sixty minute data.
The goal is to obtain more granular intrabar structure without forcing the user to choose a lower timeframe manually every time.
3) Computing Automatic Row Size
autoTicksPerRow(int atrLen) =>
int t = int(math.round((0.2 * ta.atr(atrLen)) / syminfo.mintick))
math.max(1, t)
When row size mode is set to Auto, the script derives the profile row size from ATR and tick size.
It takes twenty percent of ATR, converts that value into ticks, then enforces a minimum of one tick.
This creates a profile row height that adapts to the instrument’s current volatility instead of staying fixed across very different market conditions.
4) Finding the Major Swing
makeSwing(int lookback, int minBars) =>
int hiOff = -ta.highestbars(high, lookback)
int loOff = -ta.lowestbars(low, lookback)
int minSep = math.min(minBars, math.max(1, lookback - 1))
bool bullish = loOff > hiOff
int startIndex = bullish ? bar_index - loOff : bar_index - hiOff
int endIndex = bullish ? bar_index - hiOff : bar_index - loOff
float startPx = bullish ? lo : hi
float endPx = bullish ? hi : lo
This function discovers the dominant swing inside the selected lookback.
First, it locates the highest bar and lowest bar inside the lookback window. Then it determines which came first in time. If the low occurred earlier and the high occurred later, the swing is bullish. If the high occurred earlier and the low occurred later, the swing is bearish.
The function also forces a minimum separation between the swing endpoints. If the raw highest and lowest points are too close together, it searches farther out to build a more meaningful move.
So the swing used by the indicator is not just the highest high and lowest low. It is a structurally filtered move with time separation and direction.
5) Fibonacci Price Calculation
method fibPrice(Swing s, float ratio) =>
s.bullish ? s.highPrice - s.swingRange * ratio : s.lowPrice + s.swingRange * ratio
This method converts a Fibonacci ratio into an actual price inside the current swing.
For bullish swings, ratios are measured downward from the swing high.
For bearish swings, ratios are measured upward from the swing low.
So the Fibonacci ladder always respects swing direction and preserves the standard premium and discount interpretation.
6) Defining the Six Internal Fibonacci Bands
method bandRatioAt(Swing s, int slot) =>
float r = 0.0
if s.bullish
switch slot
0 => r := 1.000
1 => r := 0.786
2 => r := 0.618
3 => r := 0.500
4 => r := 0.382
5 => r := 0.236
6 => r := 0.000
else
switch slot
0 => r := 0.000
1 => r := 0.236
2 => r := 0.382
3 => r := 0.500
4 => r := 0.618
5 => r := 0.786
6 => r := 1.000
r
These ratio slots define the six profiling bands used in the delta section.
The bands span the space between:
1.000 and 0.786
0.786 and 0.618
0.618 and 0.500
0.500 and 0.382
0.382 and 0.236
0.236 and 0.000
The order is reversed automatically for bearish swings so the structure remains directionally consistent.
So the delta section is not arbitrary. It measures directional participation inside familiar Fibonacci zones.
7) Mapping Prices Into Profile Rows
locateRowIndex(float lowPrice, float highPrice, float step, int rows, float price) =>
float clampedPrice = math.max(lowPrice, math.min(highPrice, price))
int idx = int(math.floor((clampedPrice - lowPrice) / step))
math.max(0, math.min(rows - 1, idx))
This helper function converts any price into its corresponding profile row.
The price is first clamped inside the swing boundaries. Then the script measures how far above the swing low the price sits and divides that by the row step size.
This gives the row index where the price belongs. That mapping is necessary for distributing intrabar volume into the correct profile level.
8) Mapping Prices Into Fibonacci Bands
locateBandIndex(Swing s, float price) =>
float clampedPrice = math.max(s.lowPrice, math.min(s.highPrice, price))
int idx = 5
for b = 0 to 5
float p1 = s.bandPriceAt(b)
float p2 = s.bandPriceAt(b + 1)
float bandLow = math.min(p1, p2)
float bandHigh = math.max(p1, p2)
bool inside = b == 5 ? (clampedPrice >= bandLow and clampedPrice <= bandHigh) : (clampedPrice >= bandLow and clampedPrice < bandHigh)
if inside
idx := b
break
idx
This function assigns a price to one of the six Fibonacci bands.
It walks through the band boundaries one by one, checks where the price sits, and returns the matching band index.
That index is later used when a bar or an intrabar has zero height or when band overlap needs to be accumulated. So this function is the bridge between raw prices and the delta profile zones.
9) Lower Timeframe Data Request
string ltf = useCustomLtf ? customLtf : autoLowerTf()
= request.security_lower_tf(syminfo.tickerid, ltf, )
This is the intrabar engine.
The script first decides whether to use the automatic lower timeframe or the custom user defined one. Then it requests arrays of lower timeframe open, high, low, close, and volume values for each chart bar.
This means every bar inside the swing can be broken down into smaller internal bars, allowing a more detailed volume allocation than a single chart timeframe candle would allow.
10) Determining Effective Profile Row Size
int ticksPerRow = rowSizeMode == "Auto" ? autoTicksNow : manualTicksPerRow
float minRowStep = math.max(syminfo.mintick, ticksPerRow * syminfo.mintick)
float rowStep = math.max(minRowStep, swing.swingRange / rowsInput)
int rowsEff = math.max(1, int(math.ceil(swing.swingRange / rowStep)))
rowStep := swing.swingRange / rowsEff
This block finalizes the profile geometry.
It first determines the tick size per row, either from the automatic ATR based logic or from the manual input. Then it ensures the row step is not smaller than that minimum. After that, it calculates how many rows are actually needed to cover the full swing range.
Finally, it recalculates the row height so the entire swing fits perfectly into the effective row count.
So the profile is always both instrument aware and range aligned.
11) Estimating Intrabar Direction
int dir = prevDir
if ic > io
dir := 1
else if ic < io
dir := -1
else
if not na(prevClose)
if ic > prevClose
dir := 1
else if ic < prevClose
dir := -1
else
dir := prevDir
else
dir := prevDir
This block decides whether a lower timeframe bar should be treated as bullish or bearish for volume allocation.
If close is above open, the bar is treated as buying.
If close is below open, the bar is treated as selling.
If the bar is neutral, the script falls back to its relation versus the previous close. If that is also neutral, it inherits the previous direction.
This gives the script a practical directional model for classifying intrabar volume into buy side or sell side participation.
12) Distributing Intrabar Volume Into Profile Rows
for r = 0 to rowsEff - 1
float rowLow = swing.lowPrice + rowStep * r
float rowHigh = rowLow + rowStep
float overlap = math.min(ih, rowHigh) - math.max(il, rowLow)
if overlap > 0
float frac = overlap / iRange
rowBuy.addAt(r, buyV * frac)
rowSell.addAt(r, sellV * frac)
This is one of the most important calculations in the script.
For every lower timeframe bar, the script checks how much of that bar overlaps each profile row. If overlap exists, volume is distributed proportionally according to the fraction of the bar’s range that passed through that row.
So if an intrabar spends more range inside a certain row, more of its volume is assigned there.
This is much more realistic than placing the full volume into a single price row because it respects the bar’s actual vertical path through price.
13) Distributing Intrabar Volume Into Fibonacci Bands
for b = 0 to 5
float p1 = swing.bandPriceAt(b)
float p2 = swing.bandPriceAt(b + 1)
float bandLow = math.min(p1, p2)
float bandHigh = math.max(p1, p2)
float bandOverlap = math.min(ih, bandHigh) - math.max(il, bandLow)
if bandOverlap > 0
float bFrac = bandOverlap / iRange
bandBuy.addAt(b, buyV * bFrac)
bandSell.addAt(b, sellV * bFrac)
The same overlap logic is then applied to the six Fibonacci bands.
Each intrabar contributes buy volume and sell volume into the band or bands it overlaps. The contribution is proportional to the amount of overlap relative to the bar’s own range.
So the delta section is not built from row totals. It is built directly from participation inside each Fibonacci segment of the swing.
14) Fallback Logic When Lower Timeframe Arrays Are Empty
else
float bo = open
float bh = high
float bl = low
float bc = close
float bv = math.max(volume , 0)
int dir = barDirFromOffset(off)
If the lower timeframe request returns no intrabar data for a specific chart bar, the script falls back to the bar itself.
It reads the normal chart timeframe OHLCV values, determines a direction using the helper method, and then distributes that bar’s volume into rows and bands using the same overlap logic.
This is important because it makes the indicator robust. The profile can still be constructed even when granular intrabar data is unavailable.
15) Point of Control Calculation
float pocVol = 0.0
float pocPrice = na
for r = 0 to rowsEff - 1
float totalRow = rowBuy.get(r) + rowSell.get(r)
if totalRow > pocVol
pocVol := totalRow
pocPrice := swing.lowPrice + rowStep * (r + 0.5)
This block finds the Point of Control.
The script scans every profile row, calculates total row volume as buy plus sell, and keeps track of the highest one. The midpoint of that strongest row becomes the Point of Control price.
So the POC is the single most active price area inside the swing based on the constructed row profile.
16) Building the Horizontal Volume Profile
int totalWidthBars = math.max(1, int(math.round(profileWidthBars * (total / maxRowTotal))))
sellWidthBars := int(math.round(totalWidthBars * (sellVol / total)))
buyWidthBars := totalWidthBars - sellWidthBars
if sellWidthBars > 0
pushBox(boxPool, profileStartX, rowHigh, profileStartX + sellWidthBars, rowLow, color.new(bearColor, 72), color.new(bearColor, 100))
if buyWidthBars > 0
int buyLeftX = profileStartX + sellWidthBars
int buyRightX = buyLeftX + buyWidthBars
pushBox(boxPool, buyLeftX, rowHigh, buyRightX, rowLow, color.new(bullColor, 72), color.new(bullColor, 100))
This is the profile drawing engine.
Each row’s total participation is scaled relative to the strongest row. That determines how wide the full profile bar should be.
Then the script splits that width between sell volume and buy volume according to their relative shares. The selling segment is drawn first, followed by the buying segment.
So each row shows both:
how much total volume was traded there,
and how that volume split between bearish and bullish participation.
17) Delta Calculation by Fibonacci Band
float deltaV = buyV - sellV
float deltaPct = totalV > 0 ? (deltaV / totalV) * 100.0 : 0.0
color dColor = math.abs(deltaV) <= 0.0000001 ? fibColor : deltaV > 0 ? bullColor : bearColor
This block calculates directional delta inside each Fibonacci band.
Delta is simply buy volume minus sell volume.
Delta percent then normalizes that difference by total volume inside the band.
If the result is positive, the band leaned bullish.
If the result is negative, the band leaned bearish.
If the result is near zero, the band was balanced.
So the delta section tells the user not just how much activity occurred in a band, but which side dominated it.
18) Scaling the Delta Bars
maxBandAbs := math.max(maxBandAbs, math.abs(buyV - sellV))
int dWidthBars = maxBandAbs > 0 and math.abs(deltaV) > 0 ? math.max(1, int(math.round(deltaWidthBars * (math.abs(deltaV) / maxBandAbs)))) : 1
pushBox(boxPool, deltaStartX, bandHigh, deltaStartX + dWidthBars, bandLow, color.new(dColor, 76), color.new(dColor, 100))
The script first finds the maximum absolute delta among all bands. Then it uses that value as the scaling reference for the delta boxes.
A band with the strongest absolute delta receives the widest box. Smaller delta bands receive proportionally narrower boxes.
So the delta profile communicates both direction and relative strength across the Fibonacci segments of the swing.
19) Drawing the Core Fibonacci Ladder
for i = 0 to fibRatios.size() - 1
float ratio = fibRatios.get(i)
float price = swing.fibPrice(ratio)
bool keyLevel = math.abs(ratio - projBaseRatio) < 0.0001 or ratio == 0.0 or ratio == 1.0
color lc = keyLevel ? color.new(fibColor, 10) : color.new(fibColor, 68)
pushLine(linePool, swing.startIndex, price, fibEndX, price, lc, keyLevel ? line.style_dashed : line.style_dotted, 1)
This loop draws the Fibonacci levels across the swing.
Every ratio from zero to one is converted into price using the earlier swing based Fibonacci method. The selected projection base level plus the zero and one boundaries are emphasized, while the other internal levels are drawn more softly.
So the user gets a full retracement map tied directly to the chosen swing.
20) Building the Projection Path and Targets
float cPrice = swing.fibPrice(projBaseRatio)
float target1 = swing.bullish ? cPrice + swing.swingRange * 1.000 : cPrice - swing.swingRange * 1.000
float target2 = swing.bullish ? cPrice + swing.swingRange * 1.272 : cPrice - swing.swingRange * 1.272
float target3 = swing.bullish ? cPrice + swing.swingRange * 1.618 : cPrice - swing.swingRange * 1.618
pushLine(linePool, swing.endIndex, swing.endPrice, cX, cPrice, color.new(projColor, 30), line.style_dashed, 2)
pushLine(linePool, cX, cPrice, t1X, target1, color.new(projColor, 0), line.style_solid, 2)
pushLine(linePool, t1X, target1, t2X, target2, color.new(projColor, 18), line.style_solid, 2)
pushLine(linePool, t2X, target2, t3X, target3, color.new(projColor, 35), line.style_solid, 2)
This is the forward projection engine.
The chosen Fibonacci retracement level becomes point C. From that point, the script projects three forward targets based on the swing range:
100 percent,
127.2 percent,
and 161.8 percent.
For bullish swings, the targets are projected upward.
For bearish swings, the targets are projected downward.
The script then connects the swing end to point C and extends the projection path forward through each target.
So the projection section transforms the structural swing into a directional roadmap.
21) Drawing Target Boxes
float zoneHalf = math.max(swing.swingRange * 0.015, syminfo.mintick * 8)
if showTargets
pushBox(boxPool, t1X - 1, target1 + zoneHalf, t1X + 2, target1 - zoneHalf, color.new(projColor, 87), color.new(projColor, 55))
pushBox(boxPool, t2X - 1, target2 + zoneHalf, t2X + 2, target2 - zoneHalf, color.new(projColor, 89), color.new(projColor, 60))
pushBox(boxPool, t3X - 1, target3 + zoneHalf, t3X + 2, target3 - zoneHalf, color.new(projColor, 91), color.new(projColor, 68))
Instead of marking the targets as exact single prices only, the script can draw small target boxes around them.
The vertical thickness of each box is based on a fraction of the swing range, with a minimum tick based width. This helps present the targets as realistic reaction zones rather than razor thin levels.
So the projection module provides both precise target labels and visual target areas. Wskaźnik

Gann-Fibonacci Swing Toolkit [BigBeluga]🔵 OVERVIEW
Gann–Fibonacci Swing Toolkit is an advanced swing-based projection tool that combines classic Gann geometry with Fibonacci ratios.
The indicator automatically detects market swings, anchors them to the most recent structure, and dynamically plots either Gann Fans or Gann Boxes to visualize price–time relationships, trend angles, retracement zones, and expansion targets.
This toolkit is designed to help traders understand not only where price may react, but also how fast it should move relative to time.
🔵 HISTORICAL BACKGROUND
The foundation of this toolkit comes from two of the most influential schools of market geometry:
W.D. Gann (early 1900s) introduced the idea that markets move according to geometric and mathematical laws, where price and time must stay in balance . His work emphasized angles (such as 1×1, 1×2, 1×3) that define how much price should advance or decline per unit of time.
Fibonacci ratios , derived from the Fibonacci sequence and popularized in trading decades later, describe natural proportional relationships observed across markets, especially during corrections and expansions.
Modern technical analysis merges these ideas by applying Fibonacci ratios to Gann’s price–time framework, creating tools that measure both distance (price) and duration (time) .
The Gann–Fibonacci Swing Toolkit follows this combined philosophy by grounding all projections in real swing structure rather than static or manually drawn anchors.
🔵 CORE CONCEPT
Swing-Based Anchoring — All calculations start from confirmed swing highs and lows detected via a rolling highest/lowest lookback.
Directional Context — The tool automatically determines bullish or bearish structure and adapts all projections accordingly.
Price–Time Geometry — Gann logic is applied by projecting price movement relative to elapsed bars, not just price distance.
🔵 KEY FEATURES
SWING DETECTION LOGIC
A swing high is confirmed when price forms a local maximum and then fails to extend higher.
A swing low is confirmed when price forms a local minimum and then fails to extend lower.
The most recent completed swing becomes the anchor point for all Gann and Fibonacci calculations.
Optional ZigZag lines visually connect completed swings for structural clarity.
GANN FAN MODE
When Fibonacci Type = Fan , the indicator plots dynamic Gann fan angles from the swing anchor.
Fan Ratios — Each fan line represents a 1/x (1/1, 1/2, 1/3, etc.), defining how much price should move per unit of time.
Trend-Aware Projection
- Bullish fans project upward from swing lows.
- Bearish fans project downward from swing highs.
Fan Fill Zones — Optional shaded regions between fan levels highlight price compression and expansion areas.
GANN BOX (FIBONACCI BOX) MODE
When Fibonacci Type = Box , the indicator builds a Gann Box using Fibonacci retracement and time ratios.
Horizontal Levels — Fibonacci price retracement levels (0.236, 0.382, 0.5, 0.618, 0.786) are projected from the swing range.
Vertical Levels — Fibonacci time divisions are applied across the swing duration to estimate timing of reactions.
Inverse Mode — Flips retracement logic to project inverted expansions instead of standard pullbacks.
OTE Zone — Optional Optimal Trade Entry zone highlights the premium/discount retracement area.
Dual-Axis Structure — Combines price and time into a single geometric framework instead of treating them separately.
MAIN FRAME LOGIC
A dynamic frame is drawn between the swing anchor and current bar, scaled by trend slope.
The frame visually represents the dominant trend channel derived from swing geometry.
VISUAL ELEMENTS
Swing anchor labels mark the exact price and bar index used for calculations.
Color-coded bullish and bearish swings improve structural readability.
Labels on fan and box levels display their exact Fibonacci ratios.
🔵 HOW TO USE
Use Gann Fans to trade dynamic trend support and resistance that evolves with time.
Use Gann Boxes to identify high-probability retracement zones and timing windows.
Combine fan angles with horizontal box levels for confluence-based entries.
Disable ZigZag if you want a cleaner chart focused only on projections.
🔵 CONCLUSION
Gann–Fibonacci Swing Toolkit is a geometry-driven market structure tool that goes beyond static Fibonacci levels.
By uniting Gann’s price–time balance with Fibonacci proportionality and anchoring everything to real swing structure, the indicator provides a deeper framework for understanding trend behavior, corrective depth, and future reaction zones — all derived directly from price action itself. Wskaźnik

Fibonacci Sequence Grid [BigBeluga]🔵 OVERVIEW
A geometric price mapping tool that projects Fibonacci sequence levels and grid structures from recent price swings to help traders visualize natural expansion and reversion zones.
This indicator overlays Fibonacci-based structures directly on the chart, utilizing both grid projections and horizontal levels based on the classic Fibonacci integer sequence (0, 1, 1, 2, 3, 5, 8, ...). It identifies recent swing highs or lows and builds precision-aligned levels based on the trend direction.
🔵 CONCEPTS
Uses the Fibonacci integer sequence (not ratios) to define distances from the most recent swing point.
Identifies a trend based on EMA cross of fast and slow periods.
Projects two types of Fibonacci tools:
A grid projection from the swing point, displaying multiple sloped levels based on the sequence.
A set of horizontal Fibonacci levels for clean structural references.
Levels can be plotted from either swing low or high depending on the current trend direction.
Adjustable “Size” inputs control spacing between levels for better price alignment.
Lookback period defines how far the script searches for recent swing extremes.
🔵 FEATURES
Fibonacci Grid Projection:
Draws two mirrored Fibonacci grids—one expanding away from the swing high/low, the other converging toward price.
Swing-Based Trend Detection:
Uses a fast/slow EMA crossover to determine trend direction and reference swing points for projections.
Fibonacci Sequence Levels:
Displays horizontal levels based on the Fibonacci number sequence (0, 1, 2, 3, 5, 8, 13, 21...) for natural price targets.
Dynamic Labels and Coloring:
Each level is labeled with its sequence value and colored based on trend direction (e.g., red = downtrend, green = uptrend).
Both grids and levels can be toggled on/off independently.
Sizing controls allow tighter or looser clustering of levels depending on chart scale.
🔵 HOW TO USE
Enable Fibonacci Grid to visualize price expansion zones during impulsive trends.
Use Fibonacci Levels as horizontal support/resistance or target zones.
A label below price means the current trend is up and levels are projected from swing low.
A label above price means trend is down and levels are projected from swing high.
Adjust “Size” input to fit grid/level projection to your preferred chart scale or instrument volatility.
Use in confluence with price action, trend indicators, or volume tools for layered trading decisions.
🔵 CONCLUSION
Fibonacci Sequence Grid reimagines Fibonacci analysis using whole-number spacing from natural math progressions. Whether used for projecting grid-based expansions or horizontal support/resistance zones, it provides a powerful and intuitive structure to trade within. Perfect for traders who rely on symmetry, market geometry, and mathematically consistent levels. Wskaźnik

Fibonacci Projection with Volume & Delta Profile (Zeiierman)█ Overview
Fibonacci Projection with Volume & Delta Profile (Zeiierman) blends classic Fibonacci swing analysis with modern volume-flow reading to create a unified, projection-based market framework. The indicator automatically detects the latest swing high and swing low, builds a complete Fibonacci structure, and then projects future extension targets with clear visual pathways.
What makes this tool unique is the integration of two volume-based systems directly into the Fibonacci structure. A Fib-aligned Volume Profile shows how bullish and bearish volume accumulated inside the swing range, while a separate Delta Profile reveals the imbalance of buy–sell pressure inside each Fibonacci interval. Together, these elements transform the standard Fibonacci tool into a multi-dimensional structural and volume-flow map.
█ How It Works
The indicator first detects the most recent swing high and swing low using the Period setting. That swing defines the Fibonacci range, from which the script draws retracement levels (0.236–0.786) and builds a forward projection path using the chosen Projection Level and a 1.272 extension.
Along this path, it draws projection lines, target boxes, and percentage labels that show how far each projected leg extends relative to the previous one.
Inside the same swing range, the script builds a Fib-based Volume Profile by splitting price into rows and assigning each bar’s volume as bullish (close > open) or bearish (close ≤ open). On top of that, it calculates a Volume Delta Profile between each pair of fib levels, showing whether buyers or sellers dominated that band and how strong that imbalance was.
█ How to Use
This tool helps traders quickly understand market structure and where the price may be heading next. The projection engine shows the most likely future targets, highlights strong or weak legs in the move, and updates automatically whenever a new swing forms. This ensures you always see the most relevant and up-to-date projection path.
The Fib Volume Profile shows where volume supported the move and where it did not. Thick bullish buckets reveal zones where buyers stepped in aggressively, often becoming retestable support. Thick bearish buckets highlight zones of resistance or rejection, particularly useful if projected levels align with prior liquidity.
The Delta Profile adds a second dimension to volume reading by showing where buy–sell pressure was truly imbalanced. A projected Fibonacci target that aligns with a strong bullish delta, for example, may suggest continuation. A projection into a band dominated by bearish delta may warn of reversal or hesitation.
█ Settings
Period – bars used to determine swing high/low
Projection Level – chosen Fib ratio for projection path
-----------------
Disclaimer
The content provided in my scripts, indicators, ideas, algorithms, and systems is for educational and informational purposes only. It does not constitute financial advice, investment recommendations, or a solicitation to buy or sell any financial instruments. I will not accept liability for any loss or damage, including without limitation any loss of profit, which may arise directly or indirectly from the use of or reliance on such information.
All investments involve risk, and the past performance of a security, industry, sector, market, financial product, trading strategy, backtest, or individual's trading does not guarantee future results or returns. Investors are fully responsible for any investment decisions they make. Such decisions should be based solely on an evaluation of their financial circumstances, investment objectives, risk tolerance, and liquidity needs.
Wskaźnik

Automatic FibonacciFibonacci retracements are popular among technical traders. In technical analysis, a Fibonacci retracement is created by taking two extreme points (usually a peak and a trough) on a stock chart and dividing the vertical distance by the key Fibonacci ratios of 23.6%, 38.2%, 50%, 61.8%, and 100%. Basic fibo levels are often known to be 14.6%, 23.6%, 38.2%, 50%, 61.8%, 76.4%, 88.6% and 100%.
This indicator will draw the fibonacci levels automatically. Once these levels are identified, horizontal lines are drawn and used to identify possible support and resistance levels including zones. The fibo levels on this indicator gives you the option to use basic fibo or new paradigm fibo levels. New paradigm fibo levels may be new to most traders, however, the application of new paradigm fibo does allow one to trade with least risk due to the precision of the price action surrounding the fibo levels and zones.
One of the most efficient and great ways to apply this auto fibo indicator and the new paradigm fibo is by only leaving the fibo levels that do have hits and un-selecting the fibo levels that do not have any. You can further remove any other levels so you can trade the zones that these fibo levels create.
In addition, you can also switch the timeframe of the fibo from 1D to different number of days to 1W. Wskaźnik
