Home    |    Trading Alchemy Manual    |    Alchemy Functions Index

AlchemyFibRetrace (Function)

AlchemyFibRetrace is a multiple-output function that provides the swing high, swing low and its corresponding Fibonacci retracements of a pre-determined swing.

AlchemyFibRetrace ( StartYear, StartMonth, StartDte, StartTme, EndYear, EndMonth, EndDte, EndTme, R1, R2, R3, R4, R5, R6, R7, oSwingStart, oStartBar, oSwingEnd, oEndBar, oRetr1, oRetr2, oRetr3, oRetr4, oRetr5, oRetr6, oRetr7 );

Parameters

 

StartYear

Specifies the year of the swing start bar.  Enter the last 2 digits only.

StartMonth

Specifies the month of the swing start bar.

StartDte

Specifies the date of the swing start bar.

StartTme Specifies the time of the swing start bar.  On daily, weekly and monthly charts, this input is ignored and can be skipped.
EndYear Specifies the year of the swing end bar.  Enter the last 2 digits only.
EndMonth Specifies the month of the swing end bar.
EndDte Specifies the date of the swing end bar.
EndTme Specifies the time of the swing end bar.  On daily, weekly and monthly charts, this input is ignored and can be skipped.
R1 Specifies the 1st retracement percentage, whereas 100% is expressed as 100.
R2 Specifies the 2nd retracement percentage, whereas 100% is expressed as 100.
R3 Specifies the 3rd retracement percentage, whereas 100% is expressed as 100.
R4 Specifies the 4th retracement percentage, whereas 100% is expressed as 100.
R5 Specifies the 5th retracement percentage, whereas 100% is expressed as 100.
R6 Specifies the 6th retracement percentage, whereas 100% is expressed as 100.
R7 Specifies the 7th retracement percentage, whereas 100% is expressed as 100.
oSwingStart A numeric reference that receives the price of the swing start.
oStartBar A numeric reference that receives the bar number the swing start bar.
oSwingEnd A numeric reference that receives the price of the swing end.
oEndBar A numeric reference that receives the bar number the swing end bar.
oRetr1 A numeric reference that receives the price of the 1st Fibonacci retracement.
oRetr2 A numeric reference that receives the price of the 2nd Fibonacci retracement.
oRetr3 A numeric reference that receives the price of the 3rd Fibonacci retracement.
oRetr4 A numeric reference that receives the price of the 4th Fibonacci retracement.
oRetr5 A numeric reference that receives the price of the 5th Fibonacci retracement.
oRetr6 A numeric reference that receives the price of the 6th Fibonacci retracement.
oRetr7 A numeric reference that receives the price of the 7th Fibonacci retracement.

 

Returns

AlchemyFibRetrace returns a 1 if the swing is up and it returns a -1 if the swing is down.  The value for the price of the swing start is passed by reference back to the variable oSwingStart.  The value for the bar number of the swing start bar is passed by reference back to the variable oStartBar.  The value for the price of the swing end is passed by reference back to the variable oSwingEnd.  The value for the bar number of the swing end bar is passed by reference back to the variable oEndBar.  The value for the price of the 1st fibonacci retracement is passed by reference back to the variable oRetr1.  The value for the price of the 2nd fibonacci retracement is passed by reference back to the variable oRetr2.  The value for the price of the 3rd fibonacci retracement is passed by reference back to the variable oRetr3.  The value for the price of the 4th fibonacci retracement is passed by reference back to the variable oRetr4.  The value for the price of the 5th fibonacci retracement is passed by reference back to the variable oRetr5.  The value for the price of the 6th fibonacci retracement is passed by reference back to the variable oRetr6.  The value for the price of the 7th fibonacci retracement is passed by reference back to the variable oRetr7.

Usage

Leonardo Fibonacci was a mathematician born in 12th century Italy. He is credited with discovering a mathematical principal in which a series of numbers, two of which are added together, will add up to the next number of the series. For example: 1, 1, 2, 3, 5, 8, 13, 21, 34, 55 etc.

This is a series of numbers in which every number has a relationship with the number following it, the number preceding it, as well as every other number in the series. By dividing any larger number by the following larger number you will get approximately 61.8%. So each number is approximately 61.8% of the number following it.

There are many other mathematical relationships possible, but the primary percentages that concern us in technical trading are 23.6%, 38.2%, 50% and 61.8%. These Fibonacci numbers have been rounded for simplicity sake to 25%, 38%, 50%, and 62% for purposes of determining Fibonacci retracements.

In studies of past markets it has been determined that after price makes a significant move and begins to retrace or correct, it tends to move to the levels of 25%, 38%, 50% or 62% of the previous significant move. When price moves to one of the levels and stops, you have a high probability the correction is over and the primary move will resume. Note that the direction of the primary move can be in either direction, up or down. The direction of the primary move is not a factor. In a primary down move, the direction of the correction would be up. In a primary up move, the direction of the correction would be down. The key to using and applying Fibonacci retracement levels is identifying the primary move and calculating the proper retracement levels.

 

Home    |    Trading Alchemy Manual    |    Alchemy Functions Index