52 Week High Low Fibonacci
May 3, 2023

The 52 Week High Low Fibonacci indicator calculates and plots the 52-week price range alongside customizable Fibonacci retracement levels to identify potential support, resistance, and reversal zones.
Usage
The Usage section focuses on identifying long-term price structures through the lens of yearly highs and lows. Traders can use this tool to:
- Identify Trend Direction: The script determines the prevailing trend based on whether the 52-week high or the 52-week low was reached more recently. If the high is more recent, the tool suggests a bearish context; if the low is more recent, it suggests a bullish context.
- Spot Key Reversal Zones: By plotting Fibonacci levels (such as 23.6%, 38.2%, 61.8%, etc.) within the yearly range, the script highlights areas where price may find liquidity or stall.
- Visualize Price Range: A connecting line between the 52-week high and low provides a clear visual representation of the asset's volatility and range over the past 252 trading days.
Details
The script executes its logic by scanning the last 252 trading bars (the approximate number of trading days in a year). It identifies the absolute highest and lowest points within this window. Based on the position of these peaks and troughs, the script anchors a Fibonacci grid.
- Trend Orientation: The Fibonacci levels are automatically inverted depending on whether the trend is identified as up or down, ensuring the retracement levels remain relevant to the current market structure.
- Drawing Logic: To maintain a clean chart, the levels and labels are drawn on the most recent bar using Pine Script's drawing objects, specifically optimized for the Daily (D) timeframe.
Settings
The settings are organized to allow full customization of the Fibonacci grid:
- Fib Levels (0-10): Eleven independent inputs to define specific percentage offsets for the Fibonacci retracement levels.
- Level Colors: Individual color pickers for each Fibonacci level to help distinguish between primary (e.g., 61.8%) and secondary levels.
FAQ
How do I use the 52 Week High Low Fibonacci on my chart?
You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.
Why do the levels not appear on intraday timeframes?
The script is specifically designed for the daily timeframe to ensure the 252-bar calculation accurately reflects a standard 52-week trading year.
Can I change the default Fibonacci percentages?
Yes, all 11 levels are fully customizable in the script settings, allowing you to use standard retracements, extensions, or custom institutional levels.
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.