Logarithmic and Linear Fibonacci LevelsIntroduction
Fibonacci levels are a technical analysis tool used by some traders to identify potential support and resistance levels. The principle for determining these levels is to take the distance between selected reference high and low points (swing high and swing low in general) as 1 unit and mark the ratios derived from the Fibonacci sequence, such as 0.236, 0.382, 0.618, etc., over this 1 unit. In the conventional method of level determination, the 1 unit is divided into equal distances within itself, and Fibonacci levels are determined based on these equal distances. These types of levels are called Linear Levels . A relatively less common method involves dividing the 1 unit into progressively smaller, more accurately described as proportionally equal, distances and determining Fibonacci levels based on these distances. These types are called Logarithmic Levels . The purpose of this indicator is to provide ease of use in determining both Linear and Logarithmic levels.
Where can it be Used?
Logarithmic Levels can be used in any instrument where volatility is high for any reason. Specifically in crypto, Logarithmic Levels work very well for BINANCE:BTCUSDT (to observe this, please study the wick from January 23, 2024). As another example, Logarithmic Levels can be used to identify potential accumulation and distribution schemes in altcoins with relatively high volume and market capitalization (refer to the chart provided above BINANCE:FETUSDT ). Additionally, when analyzing traditional markets, Logarithmic Levels can be beneficial for stocks with highly inflated or deflated prices (e.g., NASDAQ:TSLA , NASDAQ:NVDA ), in stock markets of countries battling high inflation (e.g., BIST:XU100 ), or in currency pairs of countries experiencing a recession (e.g., FX_IDC:JPYUSD ).
How can it be Used?
It is designed similarly to the Fibonacci Tool provided by Trading View to ensure users feel familiar with it. When you start the indicator, select the reference levels (Level 1 and Level 0), then click on the indicator settings to choose specific levels and customize them according to your preferences.
What Makes it Unique?
Indeed, in the Fibonacci Tool provided by Trading View, we can see both linear and logarithmic levels. However, to view logarithmic levels, it is necessary to switch the relevant instrument's Super Chart to a logarithmic scale. This causes the levels we want to remain 'linear' to also be displayed in their logarithmic form, potentially leading to errors in other indicators we use, incorrect functioning of trend lines drawn in linear scaling, and so on. Additionally, when the Super Chart is scaled logarithmically, it prevents the ability to set alerts for prices and trend lines. This indicator was created to avoid these problems without needing to change the chart's scaling method and to allow the simultaneous viewing of both Linear and Logarithmic levels.
Fibonacciretracements
Re-Anchoring Fibo LevelsThe " Re-Anchoring Fibo Levels " offers a dynamic and systematic approach on how to use Fibonacci retracements. The resistance levels are based on the all-time high and the subsequent lowest low. The support levels are based on the lowest low after the all-time high and the following highest high. This method provides traders with automatically updated support and resistance levels based on current significant pivot points.
How It Works
Resistance Levels: The levels are calculated based on the current all-time high and the following lowest low. This range is multiplied with the defined Fibonacci ratios and the levels are plotted.
Support Levels: The support levels are calculated based on the lowest low and highest high after and below the current all-time high. The range between those to pivot points is multiplied with the defined Fibonacci ratios and the levels are plotted.
How To Use
By comparing current prices to dynamically adjusted Fibonacci levels, traders can gain insights into the strength and potential direction of market trends and are also presented with potentially significant levels that can function either as resistance or support.
Auto Fibonacci and Gann Fan/Retracements ComboIntroduction
This is a combination of Fibonacci and Gann fan/retracements.
The script can automatically draw as many:
Fibonacci Retracements
Fibonacci Fan
Gann Retracements
Gann Fan
as the user requires on the chart. Each level set or fan consists of 7 lines based on the most important ratios of Fibonacci/Gann.
Basics
What are Fibonacci retracements?
Fibonacci retracement levels are horizontal lines that indicate where support and resistance are likely to occur. They stem from Fibonacci’s sequence. Each level is associated with a percentage which is how much of a prior move the price has retraced. The Fibonacci retracement levels are 23.6%, 38.2%, 61.8%, and 78.6%. While not officially a Fibonacci ratio, 50% is also used. The indicator is useful because it can be drawn between any two significant price points, such as a high and a low. The indicator will then create the levels between those two points.
What are Gann retracements?
A developer of technical analysis and trading was W.D. Gann. Gann theory expects a normal retracement of 50 percent. This means that under normal selling pressure, the stock price will decline half the amount of its most recent rise, and vice versa. It also suggests that retracements occur at the halfway point of a move, such as 25 percent (half of 50 percent), 12.5 percent (half of 25 percent), and so on.
What is Fibonacci fan?
Fibonacci fan is a set of sequential trend lines drawn from a trough or peak through a set of points dictated by Fibonacci retracements. The first step to create it is to draw a trend line covering the local lowest and highest prices of a security. To reach retracement levels, the trader divides the difference in price at the low and high end by ratios determined by the Fibonacci series. The lines formed by connecting the starting point for the base trend line and each retracement level create the Fibonacci fan.
What is Gann fan?
A Gann fan consists of a series of lines called Gann angles. These angles are superimposed over a price chart to show potential support and resistance levels. The resulting image is supposed to help technical analysts predict price changes. Gann believed the 45-degree angle to be most important, but the Gann fan also draws angles at degrees like 75, 63.75, 26.25 and 15. The Gann fan originates at a low or high point. The resulting lines show areas of potential future support and resistance. The 45-degree line is known as the 1:1 line because the price will rise or fall at a 45-degree angle when the price moves up/down one unit for each unit of time. All other lines in the Gann fan are drawn above and below the 1:1 line. The other angles are associated with 2:1, 3:1, 4:1, 8:1 and 1:8, 1:4, 1:3, and 1:2 time-to-price moves.
Challenges
The most of the time I dedicated to writing this script has been spent on handling these problems:
1. Finding Local Highest/Lowest Prices
In order to draw Fibonacci and Gann fan/retracements, it's necessary to find local highest and lowest price points (Extrema) on the chart. As this could be so challenging, most traders and coders draw the lines covering the low and high prices over a given period of time or a limited number of bars back instead. I already wrote an indicator using this approach ( Auto Fibonacci Combo ).
In this new script I tried to find the exact highest and lowest prices based on this idea that: if a high point is formed lower than previous high which was after a lowest point, then that previous one was the local highest point, and vice versa if a low point is formed higher than previous low which was after a highest point, then that previous one was the local lowest point. So logically an extremum price on the chart won't be found until the next high/low point is formed.
2. Finding Proper Chart Scale for Gann Fan
Based on the theory, Gann angles are sensitive to the chart price scale and in order to have the right angles, the chart must be made with the proper scale. J.A. Hyerczyk in his book "Pattern, Price & Time - Using Gann Theory in Technical Analysis" suggests that the easiest way to determine the scale of a market is by taking the difference between top-to-top and bottom-to-bottom and dividing it by the time it took the market to move from top to top and bottom to bottom.
Thus on a properly constructed chart, the basic equation for calculating Gann angles is: Price * Time.
3. Drawing Fans and Relocating Fan Labels at Each New Bar in Pine (A Programming-Related Subject)
To do this, I used linear equations and line slopes. Of course it was so complicated and exhausting, but finally I overcame that thanks to my genius cousin.
Settings and Usage
By default, the script shows detected extremum points plus 1 Fibonacci fan, 1 Gann fan, 1 set of Fibonacci retracements and no Gann retracements on the chart. All of these could be changed in the indicator settings beside the color and transparency of each line.
Feel free to use this and send me your thoughts!