Auto Fibonacci levels
Sep 22, 2018

The Auto Fibonacci levels indicator automatically identifies and plots Fibonacci retracement and extension levels based on a user-defined lookback period, helping traders visualize potential support and resistance zones dynamically.
Usage
The Usage section describes how the script can be used to identify key market levels without manual drawing.
- Trend Identification: The tool automatically determines whether to draw from low-to-high or high-to-low based on which extreme (highest high or lowest low) occurred most recently within the specified length.
- Support & Resistance: Traders can use the plotted levels (0.236, 0.382, 0.5, 0.618, 0.786, 1, and 1.618) as areas for potential entries, stop-loss placements, or take-profit targets.
- Breakout Monitoring: Built-in alerts trigger when the price crosses the 0.5 median Fibonacci level, signaling a potential shift in momentum.
Details
The script functions by scanning the most recent bars defined by the "Fibo Length" setting. It identifies the absolute highest and lowest points within that window. By comparing the relative distance (index) of these two points, the script determines the current local trend:
- If the highest high is more recent than the lowest low, the tool treats the move as an uptrend and calculates levels upward from the low.
- If the lowest low is more recent, it calculates levels downward from the high. The script uses standard Fibonacci ratios: 0.236, 0.382, 0.5, 0.618, 0.786, 1.0, and an extension at 1.618.
Settings
- Fibo Length: Determines the lookback period (number of bars) used to find the highest high and lowest low for the Fibonacci calculations.
FAQ
How do I access Auto Fibonacci levels?
You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.
Can I change the lookback period?
Yes, you can adjust the "Fibo Length" in the settings menu to capture shorter-term or longer-term market swings.
Does the indicator repaint?
The indicator uses show_last=1 for its plots, meaning it updates the visual levels based on the most recent data within the specified length. The levels will shift as new highs or lows are formed within the lookback window.
Free indicator
Get free access to this indicator on the platforms below.
Unlock the entire LuxAlgo Library
Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.