Dynamic Fibonacci Retracement
Jan 17, 2023

The Dynamic Fibonacci Retracement indicator provides an automated way to plot Fibonacci levels that adjust in real-time based on price action and historical pivots. By tracking the most significant highs and lows within a user-defined period, the tool helps traders identify potential support and resistance zones without needing to manually redraw levels after every price move.
Usage
The Dynamic Fibonacci Retracement tool is used to identify key retracement levels during both bullish and bearish market phases. Unlike standard Fibonacci tools, it automatically detects trend reversals and updates its boundaries as price reaches new extremes.
- Trend Identification: The tool displays a dashed trendline and color-coded levels (green for bullish, red for bearish) to signify the current directional bias based on recent pivot points.
- Auto-Adjustment: If price breaks the current high or low established within the lookback range, the levels will expand or shift to reflect the new range.
- Level Customization: Users can toggle specific Fibonacci ratios (0.236, 0.382, 0.5, 0.618, 0.786) to focus on the retracement depths most relevant to their strategy.
Details
The script functions by identifying pivot highs and lows within a specified "Lookback Range." It monitors these pivots to determine the range for the 0% and 100% Fibonacci levels.
- Directional Logic: A bullish state is triggered when a new pivot low is formed or a previous high is breached. Conversely, a bearish state is triggered when a new pivot high is formed or a previous low is breached.
- Expansion: The tool uses a "getOuter" logic to ensure that even if a pivot is fixed, if the current price exceeds that pivot's value, the Fibonacci anchor point expands with the price to provide an accurate real-time retracement calculation.
Settings
General Settings
- Lookback Range: Determines the number of bars used to detect pivot highs and lows.
- Extend: Sets whether the Fibonacci lines extend to the right, left, both directions, or not at all.
- Width: Adjusts the thickness of the Fibonacci lines.
- Labels: Toggles the visibility of the ratio labels.
- Offset Right: Adjusts the horizontal position of the labels relative to the current bar.
- Prices: When enabled, the tool displays the specific price value alongside the Fibonacci ratio.
- Bull/Bear Color: Customizes the colors used for bullish and bearish trends.
Levels
- Use Trendline: Toggles the visibility of the dashed line connecting the 0% and 100% anchors.
- Fibonacci Ratios (0.236 - 0.786): Individual toggles and numerical inputs to enable, disable, or modify specific retracement levels.
FAQ
How do I access the Dynamic Fibonacci Retracement?
You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.
Can I use this for alert notifications?
Yes, the indicator includes built-in alert functionality that triggers when the trend direction changes between bullish and bearish.
Why do the levels move automatically?
The indicator is designed to be "dynamic," meaning it recalculates the range whenever the current price makes a new high or low relative to the selected lookback period, ensuring your Fibonacci levels are always up to date.
Trading & investing are risky and many will lose money in connection with trading and investing activities. All content on this site is not intended to, and should not be, construed as financial advice. Decisions to buy, sell, hold or trade in securities, commodities and other investments involve risk and are best made based on the advice of qualified financial professionals. Past performance does not guarantee future results.
Hypothetical or Simulated performance results have certain limitations. Unlike an actual performance record, simulated results do not represent actual trading. Also, since the trades have not been executed, the results may have under-or-over compensated for the impact, if any, of certain market factors, including, but not limited to, lack of liquidity. Simulated trading programs in general are designed with the benefit of hindsight, and are based on historical information. No representation is being made that any account will or is likely to achieve profit or losses similar to those shown.
Testimonials appearing on this website may not be representative of other clients or customers and is not a guarantee of future performance or success.
As a provider of technical analysis tools and strategies, we do not have access to the personal trading accounts or brokerage statements of our customers. As a result, we have no reason to believe our customers perform better or worse than traders as a whole based on any content, tool, or platform feature we provide.
Charts used on this site are by TradingView in which the majority of our technical indicators are built on. TradingView® is a registered trademark of TradingView, Inc. www.TradingView.com TradingView® has no affiliation with the owner, developer, or provider of the Services described herein.
Market data is provided by CBOE, CME Group, BarChart, Massive, CoinAPI. Select U.S. equities data is provided through Massive. CBOE BZX real-time U.S. equities data is licensed from CBOE and provided through BarChart. Real-time futures data is licensed from CME Group and provided through BarChart. Select cryptocurrency data, including major coins, is provided through CoinAPI. All data is provided “as is” and should be verified independently for trading purposes.
This does not represent our full Disclaimer. Please read our full disclaimer.
© 2026 LuxAlgo Global, LLC.

