All indicators

Fibonacci Retracement MTF/LOG

Jan 12, 2025

Static chart image
Support and ResistanceFibonacci

The Fibonacci Retracement MTF/LOG indicator automatically identifies and plots Fibonacci levels derived from higher timeframes on both linear and logarithmic scales to establish dynamic support and resistance zones.

Usage

This indicator can be used to visualize key Fibonacci retracement levels from a user-defined higher timeframe (HTF) without switching charts.

  • Higher Timeframe Analysis: By setting a "TimeFrame," you can view daily, weekly, or monthly Fibonacci levels on an intraday chart.
  • Historical Reference: Use the "Reference" setting to look back at previous periods (e.g., viewing yesterday's Fibonacci levels while trading today).
  • Scale Alignment: Switch between "Linear" and "Logarithmic" calculations to match your chart's scale, ensuring the levels align correctly with price action.
  • Trend Identification: The tool automatically identifies the high and low of the selected period and determines the trend direction based on which point occurred first.

Details

The script functions by identifying the extreme price points (highest high and lowest low) within the specified timeframe. Once these points are found, it checks their chronological order to determine if the "retracement" should be calculated from an uptrend or a downtrend.

The calculation supports two mathematical approaches:

  1. Linear: Standard arithmetic calculation for Fibonacci levels.
  2. Logarithmic: Calculates levels based on percentage-based price moves, which is often preferred for long-term charts or assets with high volatility.

Settings

Main Configuration

  • TimeFrame: Specifies the higher timeframe used for the calculation (e.g., 1D, 1W).
  • Reference: Determines which period to reference. A value of 0 is the current period, 1 is the previous period, and so on.
  • Scale: Choose between Linear or Logarithmic calculation methods.
  • Avoid Repaint: When enabled, levels are drawn permanently from the bar they occur, preventing historical recalculations.

Display

  • Trend: Toggles the visibility of the internal trend line connecting the high and low points.
  • Extend Line: Extends the Fibonacci levels horizontally across the right side of the chart.
  • Line Width/Style: Customizes the visual appearance of the retracement lines.
  • Label Position: Adjusts the horizontal offset for the price and ratio labels.

Configuration

  • Level Visibility/Values: Individual checkboxes and inputs to enable specific Fibonacci ratios (0.236, 0.382, 0.5, 0.618, 0.786, etc.) and customize their colors.

FAQ

How do I access Fibonacci Retracement MTF/LOG?

You can get access on the LuxAlgo Library for charting platforms like TradingView, MetaTrader (MT4/MT5), and NinjaTrader for free.

Why are the levels not appearing correctly on my chart?

Ensure that the "Scale" setting in the indicator matches your chart's scale (Linear vs. Log). Additionally, the starting bar of the selected timeframe must be visible on the chart for the indicator to determine the trend direction.

Can I set alerts for these levels?

Yes, the script includes alert conditions for price crossing over or under any of the enabled Fibonacci levels.

Free indicator

Get free access to this indicator on the platforms below.

TradingView
NinjaTrader
MetaTrader 4/5

Unlock the entire LuxAlgo Library

Every indicator, every strategy, full charts, and complete access to Quant — our AI agent.