Fibonacci bands indicator: formula, settings, and code
Fibonacci bands are moving price envelopes spaced with Fibonacci ratios. There is no single standard formula. Common versions place 1.618, 2.618, and 4.236 multiples of ATR or another volatility measure above and below a moving average.
Direct answer
A reproducible starting formula is EMA(50) plus or minus ATR(14) multiplied by 1.618, 2.618, and 4.236. Treat it as a test baseline. Fibonacci Bollinger Bands are a separate variant that uses standard deviation or a VWMA basis.
Parameters that define the indicator
Basis
EMA, SMA, or VWMA must be stated
Volatility
ATR or standard deviation
Ratios
Common examples: 1.618, 2.618, 4.236
Signal rule
Touch, close, rejection, or re-entry
One ATR-based Fibonacci bands baseline
This version uses EMA(50) as the center and ATR(14) as the distance unit. It is one documented formula, not a universal definition.
| Band | Formula | What it measures |
|---|---|---|
| Center | EMA(50) | The moving basis for the envelope |
| Inner upper | EMA(50) + ATR(14) x 1.618 | A nearer upside range |
| Inner lower | EMA(50) - ATR(14) x 1.618 | A nearer downside range |
| Middle bands | EMA(50) +/- ATR(14) x 2.618 | A wider volatility range |
| Outer bands | EMA(50) +/- ATR(14) x 4.236 | An extreme range reference |
How to test Fibonacci bands without hindsight
- 1
Choose one formula
Write down the basis, volatility measure, ratios, and price source. Do not compare results from two different Fibonacci band definitions as if they were one indicator.
- 2
Fix the timeframe and session
A 14-bar ATR on SPY daily and a 14-bar ATR on BTC five-minute charts measure different behavior. Record the session and market.
- 3
Define the event
A touch, close outside, and close back inside are separate events. Pick one before reviewing outcomes.
- 4
Add a trend or regime rule
Decide whether the strategy trades breakouts, mean reversion, or both. Mixing these interpretations after the signal makes the test hard to audit.
- 5
Measure costs and failures
Include actual commissions and measured slippage. Record signals that continue through the outer band instead of showing only clean reversals.
Checks I use when comparing band formulas
When I compare Fibonacci bands on SPY, I hold the chart, timeframe, and entry rule constant. Only the band formula changes.
I label ATR-based and standard-deviation bands separately in saved results. Their distances are not directly interchangeable.
I inspect closes as well as intrabar touches. A wick outside a band and a bar close outside it describe different events.
Fibonacci bands and Fibonacci Bollinger Bands are not identical
Search results use the name Fibonacci bands for several channel formulas. Some versions use a moving average plus ATR multiplied by Fibonacci ratios. Fibonacci Bollinger Bands often start from a Bollinger-style standard deviation model and add more ratios.
The name alone is not enough to reproduce the indicator. A useful page must state the basis, lookback, volatility calculation, ratios, and signal condition.
A band touch is not a complete trading rule
Price can touch an outer band and keep moving. A mean-reversion rule needs a confirmation event, such as a close back inside the band. A breakout rule may require the opposite: a close outside with a rising basis.
Write the invalidation and exit at the same time as the entry. Otherwise the chart supplies many possible stories after the move is over.
- Use bar-close events when the backtest cannot reproduce intrabar order flow.
- Keep the basis slope rule explicit if it controls direction.
- Test the same formula on SPY, QQQ, and BTC separately before pooling results.
How Pineify fits the workflow
Pineify generates editable Pine Script, so the basis, ATR length, ratios, and alerts remain visible. The output is a starting point for testing, not a claim that the bands predict price.
If the intended indicator is Fibonacci Bollinger Bands, use the existing FBB guide. If the goal is a dynamic high-low overlay, the Fibonacci Zone page matches that method better.
Worked band calculation
Assume EMA(50) is 500 and ATR(14) is 6 on an illustrative SPY bar.
Upper band = basis + ATR x ratio; lower band = basis - ATR x ratio
Basis = 500 ATR = 6 1.618 upper = 500 + (6 x 1.618) = 509.708 1.618 lower = 500 - (6 x 1.618) = 490.292 2.618 upper = 515.708 2.618 lower = 484.292
The prices are invented to show the arithmetic. They are not current SPY levels.
Generate a Fibonacci bands indicator you can inspect
Keep every formula choice as an input so the script can be reviewed and compared with another version.
Create a Pine Script v6 overlay with an EMA basis and ATR distance. Add inputs for basis length, ATR length, source, and ratios 1.618, 2.618, and 4.236. Plot symmetric upper and lower bands, shade only the spaces between adjacent bands, and add separate alerts for close outside and close back inside. Do not generate buy or sell signals unless the selected confirmation rule is true.Compare the Fibonacci Zone
Continue the analysis
Tools for the next check
Fibonacci Bollinger Bands
Generate Fibonacci Bollinger Bands in Pine Script with configurable basis, deviation multipliers, and alerts.
Fibonacci Zone Indicator
Generate a Pine Script Fibonacci zone indicator with configurable swing detection, levels, labels, and alerts.
Fibonacci Retracement Settings
Set up Fibonacci ratios, anchors, labels, chart scale, and alerts in TradingView with an auditable baseline template.
Fibonacci Retracement Visualizer
Calculate and visualize Fibonacci retracement and extension levels on an interactive chart from uploaded price data or manual high and low inputs.
Fibonacci Day Trading Strategy
Test a SPY five-minute Fibonacci pullback rule with fixed anchors, invalidation, costs, and TradingView automation.
Sources and method notes
This page is an information tool, not investment advice. Fibonacci bands describe calculated price ranges. They do not predict reversals, breakouts, or returns.