Showing posts with label Fibonacci Trading. Show all posts
Showing posts with label Fibonacci Trading. Show all posts

Saturday, September 26, 2009

Fibonacci Retracement:Golden Ratio.

This function calculates the Fibonacci retracement 61.8% level, also referred to as 'the golden ratio'. It uses simple vector-based functions to do this. The function accepts one parameter which is the lookback period to use to define the highest and lowest close prices.
Fibonacci retracement is a very popular tool used by many traders. It is based on the key numbers identified by mathematician Leonardo Fibonacci to calculate the Fibonacci ratios. These ratios levels are then used to identify critical points that could cause an asset's price to reverse.

First of all we need to determine the difference between the highest and lowest close prices for the defined lookback period. We store this data into a variable whose name is (dif). The second step is to try to determine which of the highest or lowest close price occurred first; this is done using the (BarsSince) formula. Depending on the last result, we calculate the 61.8% level. In case the highest close price happened before the lowest close price, the variable 'dif' (calculated previously) is multiplied by 0.618. In the other case, the same variable 'dif' is multiplied by (1 - 0.618). We finally add the lowest close price value to the 61.8% level value and plot the resulting time-series.

We can create a bar chart that displays the difference between the current price and the 61.8% Fibonacci level by subtracting this level to the close price.

In order to create a time-series that plots other Fibonacci ratio levels like the 23.6% ratio or the 38.2% ratio, you just need to change the "level" variable. For the 23.6% level, just replace the value (0.618) by (0.236). You can also easily tweak the code and offer the possibility to define the Fibonacci ratio level by adding another parameter to this function.

Thursday, September 24, 2009

Fibnacci Extension Levels.

In this article we are going to throw ligh ot the Fibnacci Extension Levels. Three most used Fibonacci extension levels are 0.618, 1.000 and 1.618. Also 1.382 extension can be applied as well.

















In the above picture we are in the uptrend. Lowest swing — point A — is 120.75;
highest swing — point B — 121.44.

To calculate retracement levels and enter Long at some point C we do next:

Calculations for Uptrend and Buy order:

B — A = ?
121.44 — 120.75 = 0.69

0.382 (38.2%) retracement = 121.44 — 0.69 x 0.382 = 121.18
0.500 (50.0%) retracement = 121.44 — 0.69 x 0.500 = 121.09
0.618 (61.8%) retracement = 121.44 — 0.69 x 0.618 = 121.01

Fibonacci retracement levels formula for an uptrend:

C = B — (B — A) x N%

Now we need to calculate extension levels:

0.618 (61.8% ) extension = 121.44 + 0.69 x 0.618 = 121.87
1.000 (100.0%) extension = 121.44 + 0.69 x 1.000 = 122.13
1.382 (138.2%) extension = 121.44 + 0.69 x 1.382 = 122.39
1.618 (161.8%) extension = 121.44 + 0.69 x 1.618 = 122.56

Fibonacci extension levels formula for an uptrend:

D = B + (B — A) x N%


Our next example is downtrend:
















Highest swing — point A — is 158.20; lowest swing — point B — is 156.44.

Calculations for downtrend and Sell order:

A — B = ?
158.20 — 156.44 = 1.76

Because of the downtrend we need to add to the lowest point B to find retracement.

0.382 (38.2%) retracement = 156.44 + 1.76 x 0.382 = 157.53
0.500 (50.0%) retracement = 156.44 + 1.76 x 0.500 = 157.32
0.618 (61.8%) retracement = 156.44 + 1.76 x 0.618 = 157.11

Fibonacci retracement levels formula for downtrend:

C = B + (A — B) x N%

Now let's find Fibonacci extension levels (downtrend):

0.618 (61.8%) extension = 156.44 — 1.76 x 0.618 = 155.35
1.000 (100%) extension = 156.44 — 1.76 x 1.000 = 154.68
1.382 (138.2%) extension = 156.44 — 1.76 x 1.382 = 154.01
1.618 (161.8%) extension = 156.44 — 1.76 x 1.618 = 153.59

Fibonacci extension levels formula for downtrend:

D = B — (A — B) x N%

Wednesday, September 23, 2009

Understanding The Term Fibonacci Retracement.

Fibonacci retracements are percentage values which can be used to predict the length of corrections in a trending market. Most popular retracement levels used for the forex trading are 38.2%, 50%, and 61.8%. In a strong trend you can expect the currency prices to retrace a minimum of 38.2 percent; in a weaker trend corrections may go as far as 61.8 percent. The 50 % is the most widely monitored retracement level and is a common area to buy in the up trends or sell in the down trends. If a correction exceeds one of the retracement levels - look for it to go to the next (e.g. to 50% after the 38.2% level or to 61.8% after the 50% level). Whenever the prices retrace more than 61.8% of the previous move (on a closing basis) you can expect them to return all the way back to the beginning of the trend.

Tuesday, September 22, 2009

Fibonacci Trading Introduction.














Fibonacci theory as we know it today originated from a 13th century Italian mathematician by the name of Leonardo of Pisa, otherwise known as Leonardo Fibonacci. His work that eventually led to such mainstream technical analysis standards as Fibonacci retracements originated from a sequence of numbers that led to the discovery of the Golden Ratio, approximately 1.618. This ratio can be found in many areas of nature, science, music, and, very importantly, the financial markets. This includes the forex market.

The so called Fibonacci number sequence first appeared as the solution to a problem in the Liber Abaci, which was a book written by the mathematician in 1202 and introduced the Arabic numerals presently used to Europe when it was limited to Roman numerals.

The actual problem that was solved with this famous numerical series dealt with the propagation of rabbits, of all things.

The question to be solved was essentially, starting with only one pair of rabbits, how many pair could be generated if each mature pair "delivers" a new pair each month, which itself becomes productive in the second month.

The solution starts with a 0 and 1, and each new number is the sum of the previous two numbers
(0 + 1 = 1; 1 + 0 = 1; 1 + 1 = 2; 1 + 2 = 3;
3 + 2 = 5; etc). Or as a more acceptable expression
in the world of mathematics:

Fn+1 = Fn + Fn-1.

This leads to the following infinite series: 0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, etc.

Fibonacci found that this series of numbers and their ratios to each other surprisingly are prevalent throughout nature and can be found even in human nature.

The ratio of any number to the next larger number in this series (e.g., 55 to 89), approaches 0.618, or 61.8 %, and this as well as its inverse (0.382 or 38.2 %) become important Fibonacci retracement numbers which will be further discussed in the next article.

Likewise, the ratio of the next larger number to any number in the series (e.g., 89 to 55) approaches 1.618, and this very significant number is known as the "golden ratio", "golden mean", and "divine proportion", among other names.

This number was highly significant to both Greek and Egyptian cultures and had important implications in areas of art and science. It was also utilised in the construction of many buildings in those cultures, including the pyramids and the parthenon.

This ratio can even be found in the Holy Bible. Two such examples are the ratios in the proportions of the Ark of the Covenant (Exodus 25:10) and the construction of Noah's Ark (Genesis 6:15).

This ratio (1.618), also known as "phi", is found all around the world today.

For instance, in the human body, the proportion of the distance from the head to the finger tips vs the total body height has this ratio. Likewise, the distance from the navel to the elbows vs. the distance from the head to the finger tips.

Even the program for all life on this planet, the DNA molecule, is based on this same ratio. It measures
34 Angstroms (a very small unit of measurement) long by 21 Angstroms wide for each full cycle in the double helix spiral. As can be seen in the series shown above, 34 and 21 are successive Fibonacci numbers with their ratio approaching phi.

One final, galactic example is in recent (2003)studies based on data taken from NASA's Wilkinson Microwave Anisotropy Probe (WMAP) on cosmic radiation background that suggest that the universe is finite and shaped like a dodecahedron. This geometric shape is based on pentagons, which are based on phi.

Many more examples could be given which demonstrate how the world and our lives are impacted by the applications of Fibonacci numbers but I think you get the point in the few examples that were given here.