Download MetaTrader 5

Indicators: AutoDayFibs

To add comments, please log in or register


The indicator automatically draws Fibonacci lines by yesterday's or today's range

Fig.1 The AutoDayFibs indicator

Fig.1 The AutoDayFibs indicator

Author: Nikolay Kositsin

Sergey Golubev
Sergey Golubev  


Indicators: Fibonacci retracement

newdigital, 2013.11.21 12:06

Fibonacci Retracements (based on stockcharts article)


Fibonacci Retracements are ratios used to identify potential reversal levels. These ratios are found in the Fibonacci sequence. The most popular Fibonacci Retracements are 61.8% and 38.2%. Note that 38.2% is often rounded to 38% and 61.8 is rounded to 62%. After an advance, chartists apply Fibonacci ratios to define retracement levels and forecast the extent of a correction or pullback. Fibonacci Retracements can also be applied after a decline to forecast the length of a counter trend bounce. These retracements can be combined with other indicators and price patterns to create an overall strategy.

The Sequence and Ratios

This article is not designed to delve too deep into the mathematical properties behind the Fibonacci sequence and Golden Ratio. There are plenty of other sources for this detail. A few basics, however, will provide the necessary background for the most popular numbers. Leonardo Pisano Bogollo (1170-1250), an Italian mathematician from Pisa, is credited with introducing the Fibonacci sequence to the West. It is as follows:

0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610……

The sequence extends to infinity and contains many unique mathematical properties.

  • After 0 and 1, each number is the sum of the two prior numbers (1+2=3, 2+3=5, 5+8=13 8+13=21 etc…).
  • A number divided by the previous number approximates 1.618 (21/13=1.6153, 34/21=1.6190, 55/34=1.6176, 89/55=1.6181). The approximation nears 1.6180 as the numbers increase.
  • A number divided by the next highest number approximates .6180 (13/21=.6190, 21/34=.6176, 34/55=.6181, 55/89=.6179 etc….). The approximation nears .6180 as the numbers increase. This is the basis for the 61.8% retracement.
  • A number divided by another two places higher approximates .3820 (13/34=.382, 21/55=.3818, 34/89=.3820, 55/=144=3819 etc….). The approximation nears .3820 as the numbers increase. This is the basis for the 38.2% retracement. Also, note that 1 - .618 = .382
  • A number divided by another three places higher approximates .2360 (13/55=.2363, 21/89=.2359, 34/144=.2361, 55/233=.2361 etc….). The approximation nears .2360 as the numbers increase. This is the basis for the 23.6% retracement.

1.618 refers to the Golden Ratio or Golden Mean, also called Phi. The inverse of 1.618 is .618. These ratios can be found throughout nature, architecture, art and biology. In his book, Elliott Wave Principle, Robert Prechter quotes William Hoffer from the December 1975 issue of Smithsonian Magazine:

….the proportion of .618034 to 1 is the mathematical basis for the shape of playing cards and the Parthenon, sunflowers and snail shells, Greek vases and the spiral galaxies of outer space. The Greeks based much of their art and architecture upon this proportion. They called it the golden mean.

Alert Zones

Retracement levels alert traders or investors of a potential trend reversal, resistance area or support area. Retracements are based on the prior move. A bounce is expected to retrace a portion of the prior decline, while a correction is expected to retrace a portion of the prior advance. Once a pullback starts, chartists can identify specific Fibonacci retracement levels for monitoring. As the correction approaches these retracements, chartists should become more alert for a potential bullish reversal. Chart 1 shows Home Depot retracing around 50% of its prior advance.

The inverse applies to a bounce or corrective advance after a decline. Once a bounce begins, chartists can identify specific Fibonacci retracement levels for monitoring. As the correction approaches these retracements, chartists should become more alert for a potential bearish reversal. Chart 2 shows 3M (MMM) retracing around 50% of its prior decline.

Keep in mind that these retracement levels are not hard reversal points. Instead, they serve as alert zones for a potential reversal. It is at this point that traders should employ other aspects of technical analysis to identify or confirm a reversal. These may include candlesticks, price patterns, momentum oscillators or moving averages.

Common Retracements

The Fibonacci Retracements Tool at StockCharts shows four common retracements: 23.6%, 38.2%, 50% and 61.8%. From the Fibonacci section above, it is clear that 23.6%, 38.2% and 61.8% stem from ratios found within the Fibonacci sequence. The 50% retracement is not based on a Fibonacci number. Instead, this number stems from Dow Theory's assertion that the Averages often retrace half their prior move.

Based on depth, we can consider a 23.6% retracement to be relatively shallow. Such retracements would be appropriate for flags or short pullbacks. Retracements in the 38.2%-50% range would be considered moderate. Even though deeper, the 61.8% retracement can be referred to as the golden retracement. It is, after all, based on the Golden Ratio.

Shallow retracements occur, but catching these requires a closer watch and quicker trigger finger. The examples below use daily charts covering 3-9 months. Focus will be on moderate retracements (38.2-50%) and golden retracements (61.8%). In addition, these examples will show how to combine retracements with other indicators to confirm a reversal.

Moderate Retracements

Chart 3 shows Target (TGT) with a correction that retraced 38% of the prior advance. This decline also formed a falling wedge, which is typical for corrective moves. The combination raised the reversal alert. Chaikin Money Flow turned positive as the stock surged in late June, but this first reversal attempt failed. Yes, there will be failures. The second reversal in mid July was successful. Notice that TGT gapped up, broke the wedge trend line and Chaikin Money Flow turned positive (green line).

Chart 4 shows Petsmart (PETM) with a moderate 38% retracement and other signals coming together. After declining in September-October, the stock bounced back to around 28 in November. In addition to the 38% retracement, notice that broken support turned into resistance in this area. The combination served as an alert for a potential reversal. William %R was trading above -20% and overbought as well. Subsequent signals affirmed the reversal. First, Williams %R moved back below -20%. Second, PETM formed a rising flag and broke flag support with a sharp decline the second week of December.

Golden Retracements

Chart 4 shows Pfizer (PFE) bottoming near the 62% retracement level. Prior to this successful bounce, there was a failed bounce near the 50% retracement. The successful reversal occurred with a hammer on high volume and follow through with a breakout a few days later.

Chart 5 shows JP Morgan (JPM) topping near the 62% retracement level. The surge to the 62% retracement was quite strong, but resistance suddenly appeared with a reversal confirmation coming from MACD (5,35,5). The red candlestick and gap down affirmed resistance near the 62% retracement. There was a two day bounce back above 44.5, but this bounce quickly failed as MACD moved below its signal line (red dotted line).


Fibonacci retracements are often used to identify the end of a correction or a counter-trend bounce. Corrections and counter-trend bounces often retrace a portion of the prior move. While short 23.6% retracements do occur, the 38.2-61.8% covers the more possibilities (with 50% in the middle). This zone may seem big, but it is just a reversal alert zone. Other technical signals are needed to confirm a reversal. Reversals can be confirmed with candlesticks, momentum indicators, volume or chart patterns. In fact, the more confirming factors the more robust the signal.

Sergey Golubev
Sergey Golubev  

Trading a USDJPY Pullback Using Fibonacci (based on article)

- USDJPY has been on an uptrend and, after a brief pullback, may continue to rally higher
- Typically, a profit-taking decline ends at one of four major Fibonacci support zones
- Multiple lots can be used to spread out the risk at different Fib levels

Fueled by an ultra-easy Bank of Japan monetary policy and a combination of stronger U.S. economic data and rising interest rates, USDJPY has trended up strongly. The surge in USDJPY in November from the 98.00 area to the 104.00 handle was as textbook uptrend with shallow pullbacks disappointing bargain hunters who were looking for a bigger correction.

However, Forex traders may get their chance as USDJPY has run into resistance just short of the 105.00 handle at 104.62 and with the Christmas holidays just around the corner, a profit taking present-buying decline may be in order as traders cash in. But where do Forex traders enter?

Trading Setup

The yen pair have been challenging because in order to draw a Fibonacci retracement, an established low is connected to an established high. If price fails to move lower and makes a new high, then the lines have to be redrawn. Using the October 8th low at 96.55 as our starting point for the Fibonacci tool and connecting it to the December 20th high at 104.62, we can establish five levels of potential Fibonacci support:

Fibonacci LevelPrice
23.6% 102.54
38.2% 101.25
50% 100.21
61.8% 99.17
78.6% 97.69

The Trading Plan

Once USDJPY rebounds from the 23.6 Fib level at 102.54 and starts moving up, enter long with a protective stop-loss placed about 4-pips below the next level of Fibonacci support under the entry around 101.23. A limit can be set at 1.0516 which is slightly above the recent high made on December 20th at 104.62. We are looking to risk 131 pips to make 262 pips in profit. In the event that USDJPY does not pullback but resumes the move higher, we would need to redraw our Fibs after the high is established and the profit-taking decline is confirmed.

Just a reminder that though Fibonacci can show great precision and forecasting price targets and rebound zones, traders have to remain flexible in their view of the charts and price action. USDJPY could correct lower to the 38%, 50% or the 78.6% retracements before turning around and heading higher. So if you are stopped out initially, don’t be discouraged as it could take more than one attempt to catch a ride on this trend. This is the reason that it is recommended that traders risk no more than 2% of their account on any one trade. By only deploying a small amount of your capital on any one trade, your account lives to trade another day! Some traders may take their 2% position and divided into three parts. In this way they can place a third at the 23.6% level, and another third at the 38.2% Fibo, and the final third at the 61.8% level. A stop on all the positions would be placed just below the 78.6% “Fibo of last resort”. Using this method spreads out the risk over smaller positions. Whether you choose an “the all in” approach or an incremental method, Fibonacci gives you the road map to rejoin the trend.

Sergey Golubev
Sergey Golubev  

Forum on trading, automated trading systems and testing trading strategies

Indicators: ZZ_Ensign_Fibo

newdigital, 2014.06.13 07:43

The Rabbit Hole of Fibonacci (adapted from this article)
  • We look at the history and background of the mathematical concept known as ‘The Fibonacci Sequence’
  • We show you how traders can apply these mathematical studies to their trading.
In this article, we’re going to look at a more subjective form of Support and Resistance analysis: We’re going to investigate Fibonacci. In our next three pieces, we’ll take all of these support and resistance mechanisms and we’ll show you how traders can actually put them to use.


This is one of the more in-depth support and resistance methods out there, and there are a lot of different ways that traders look to integrate Fibonacci in their trading.

Taking a step back, Fibonacci is named after the 12th century mathematician, Leonardo of Pisa. In 1202 AD, Leonardo published a composition with the name of Liber Abaci that consisted of a numerical sequence that eventually became named after him. Leonardo of Pisa didn’t discover the sequence; he merely used it as an example in his composition.

The sequence is thought to have been originally used by Indian mathematicians as early as the 6th century; and in Liber Abaci, this numerical sequence was introduced the western world. The sequence introduced by Leonardo of Pisa was a system that found the next value in the sequence by adding the two previous numbers. The sequence shared in Liber Abaci was as follows:

Today these values are called ‘Fibonacci numbers’ and are used by many traders as input values for indicators along with a slew of other purposes.

But input values on trading indicators aren’t the only place that we’ll see this system at work. The Fibonacci sequence has excited mathematicians and scientists for thousands of years because of its numerous applications in the world around us. One of the initial applications that Leonardo of Pisa investigated in his original manuscript was the population growth of rabbits. He found that as an isolated population of rabbits grew, the population would grow according the Fibonacci sequence. Starting with one pair of rabbits, the population would then grow to two; which would become three, and then five, eight, thirteen, etc. The sequence is also prominent in population growth within honeybees, the number of petals on a flower, and the formation of pine cones just to name a few.

Many believe the Fibonacci sequence to be the language of nature itself. If you want to see more on this topic, Fibonacci was prominently featured as part of the movie Pi; the fictional movie released in 1998 that follows a mathematician’s quest in predicting the future based on mathematics. But even outside of fictional movies, the numerous manners with which the sequence appears in the world around us is fascinating and definitely worthy of a google-search.

But that’s not the only exciting aspect of the Fibonacci sequence. More fascinating is what we can see if we look just a little bit below the surface. If you take the ratio of any two successive numbers, such as 144 and 233 and divide the second number (233) by the first (144), you’ll eventually move towards a very special number of 1.618 (61.8%). In this specific example, the exact value would be ‘1.6180555…’ The deeper we get in the sequence, the closer this ratio moves towards 1.618 until eventually the ratio stands at exactly 1.618. This number is the prize behind Fibonacci, and it has fascinated mathematicians and scientists for thousands of years.

The number of 1.618 is called ‘The Golden Ratio,’ and can be found in numerous applications within nature ranging from the spirals of a sea shell to leaf arrangements of a houseplant.

Trading with Fibonacci (and the Golden Ratio)

Traders will often employ Fibonacci when looking to trade retracements in a trend, centering support and resistance levels around intervals defined by the Golden Ratio of 1.618.

The center of Fibonacci analysis is at the .618 interval of the trend, taken directly from the golden ratio. But we can take this a step further by dividing a number in the sequence by the number located two figures to further. If we take 34 and divide that number by 89; or if we take 133 and divide that by 377, we consistently receive values of ~.382 (38.2%). This is the next value that traders will plot via Fibonacci analysis.

We can then do the same thing with by dividing any number in the sequence with the digit located two places further. So, for example, if we divide 34 by 144; or if we divide 55 by 233, we consistently receive values of ~.236 (23.6%). Traders have taken this a step further to examine the mid-line of the move (.50, or 50%), and .786 (78.6% - or the reciprocal of .236). The finished result is what we have below using the weekly GBPUSD chart:

As you can see in the above chart, these price levels on a chart can exhibit phenomenal examples of support and/or resistance coming in the market place. And luckily for us, using Fibonacci as a trader is significantly easier than proving any ‘magical’ components behind it as mathematicians have attempted to do for the past couple thousand years.

To use Fibonacci, a trader needs to merely identify a most recent ‘major move.’ This is where subjectivity comes in to play. This major move can be on the 5-minute chart, the hourly chart, or the weekly chart (as we had done with GBPUSD above). But like we saw with Pivot Points, longer-terms and more data generally brings more value to the analysis simply because more traders may be seeing it. If we draw a Fibonacci retracement on a 5-minute chart; it might be seen by a few other traders whereas a retracement taken from the weekly chart will likely generate more interest from traders simply because it encapsulates significantly more data.

Traders can use the Fibonacci tool available in most trading platforms to define the move, and then levels at the proper intervals of .236, .382, .500, .618, and .786 can be drawn in. So, when prices move down to the .236 line, we can say that 23.6% of that trend has been retraced. Or if prices move down the .618 level, 61.8% of the trend has been re-traced.

To add comments, please log in or register