The following information is a direct copy of the frontend documentation that is a part of the Fib_Time-Price-GannT application/indicator for for the Omega/Tradestation TS2000i or TSPlatform applications.
This application provides the user with the ultimate in tools for looking at Fibonacci projections in both time and price. As is true of all our applications, the source code is open and organized such that you can add to or delete from that code whatever best fits your needs.
Thanks for examining this application,
Clyde Lee, Chairman/CEO SYTECH Corporation
Return to Site Home Page
Purchase Fib_Time-Price-GannT indicator
{Fib_Time-Price-GannT}
{
The Fibonacci ratios (0.618 and 1.618) and related ratios derived from
these numbers by squaring, taking square root, or reciprocal of derived
numbers when used as multipliers of the price difference between the
high and low points in the prior leg of market action provide guidance as
to logical points for prices to change direction in the leg that is
currently developing.
Time lines based on the number of bars in any determined leg can be drawn
but are only drawn at the "classical" fib ratios.
This indicator provides a means of drawing one or all sets of the
projected Fibonacci price and/or time projection lines.
The Fib_Time-Price-GT indicator can automatically pick turning points and
will apply the requested Fib application and/or trend and/or Gann Trend
of a specified angle and channel width at each such point or only the
last determined leg on the chart.
If it is desired to indicate to the program where the user wants the
top and bottom of price swings to be assigned, set the NumBars parameter
to zero (0), and do the following:
Use the text tool to label swing tops (high price in swing) and bottoms
(lowest price in swing) with the letters "T" for top of swing or "B" for
bottom of swing. (Note: A maximum of 100 tops and/or bottoms can be used).
Once the T and B indications are in place, refresh the indicator
(clicking "Status" twice causes the indicator to recalculate).
Be sure to put the T label(s) above the bar's high for a swing top/high,
and the B label(s) below the swing bottom/low.
The code to allow the use of alphabetic characters for setting the turning
points is a major modification of code from a non-copyrighted program by:
Gregory Wood.
Note that you can use the pointer tool to move the points anytime. Then to
view the new pivot/turningpoint results, refresh the indicator.
Additionally the routine calculates the price difference at each end of
every leg that is determined and averages the up and down leg data
separately. This is available for creation of a "gestimate" of where
in time and price the next turn should be.
Also, if specified, for any leg at a specified angle, a Gann trend line
is drawn.
Gann Square
37 36 35 34 33 32 31
38 17 16 15 14 13 30
39 18 5 4 3 12 29
40 19 6 [1] 2 11 28
41 20 7 8 [9] 10 27
42 21 22 23 24[25]26
43 44 45 46 47 48[49]
If we take a portion of the familiar Gann Square and look at the
315 or 45 degree line (depending on whether we measure angles
clockwise or counterclockwise) we find the series of numbers
enumerated below. To see how these numbers fit the square of
nine see the above small portion of a square with brackets around
the key 45/315 degree numbers.
45/315 degree line numbers:
1 9 25 49 81 121 169 225 289 361 441 529 625 729 841 961
the above numbers are the square of the following series:
1 3 5 7 9 11 13 15 17 19 21 23 25 27 29 31
If a turn around the Gann Square of 9 is considered to be a 360
degree trip then using this relationship:
1. Given some value of price termed Price1,
2. To arrive at Price2 which is 360 degrees
away from Price1, calculate:
Price2 = Square(SquareRoot(Price1)+2)
Example: Above square root of 81 is 9 and
Above square root of 121 is 11 which
is 9 plus 2 and when squared is equal
to 121 so 121 is 360 degrees from 81;
Therefore: Price2 = 360 degree price of Price1.
That being true then the squareroot difference for angles of
180=1 and 90=0.5 , and any angle
desired can be calculated from this relationship ! ! ! !
The GANNTREND application is based on a concept that the number
of TIME units for a 360 degree movement of price is equal to
the SQUAREROOT of price at the inflection/turning point from
which we wish to project the forthcoming time price relationships
and that the 360 degree rotation of price is based on the above
noted relationship of adding/subtracting a value to/from the
squareroot of the price value at an inflection/turning point.
Gann realized that this concept was not universally proper for
all price ranges and suggested a method of "shifting the decimal"
to bring any range of prices into a range which provided a
reasonable time interval based on the square root of the
"shifted" price data. If data were in the range of 1,000 then
we might shift the data by 2 decimal points and look at the
data as though it were in the 100 range rather than 1,000. Such
a method is provided. Additionally, a method of shifting data
values by use of the logarithm (natural) raised to some power
is provided which provides almost automatic scaling over a
rather large range of prices.
This concept has been offered first by Gann (so far as I can
tell), then by Dunnigan and most recently by Don Hall.
The applicable "legs" which run between Pivot/TurningPoints can be
established manually or via use of the Swing_Lee_II function.
}
Return to Site Home Page
Inputs:
NumBars(34), {Number of bars to use in automatically computing pivot/}
{turningpointns by use of the Swing_Lee_II function. }
{ }
{Set to zero to do manual selection of turning points. }
{To specify a pivot/TP at the TOP of a swing, use the }
{TEXT Drawing Tool and place the letter t or T just }
{above the bar on which the top of the swing occurs. For}
{the lower extremity of a swing then using the TEXT tool}
{place the letter b or B just below the lowest or }
{bottom bar for that leg. }
{ }
{Again, must be set to 0 (zero) for manual (i.e. T/B }
{specification }
{ }
{NOTE: }
{This application uses the Swing_Lee_II pivot finding }
{method which allows a different detection length to be }
{specified for the left and right side of the pivot. A }
{decimal fraction value (if given) is multiplied by 100 }
{and the resulting value used for the length of right }
{had detection. This value MUST be LESS than the }
{integer portion of the specification which is the }
{length for the left hand side. If no decimal fraction }
{is specified then the supplied value is used for both }
{the left and right hand lengths away from the pivot. }
{Set this value negative if only the price projections }
ForcePvt(true), {On last bar of computation, force a pivot if a pivot }
{has not been detected very recently. }
FibBars(75.20), {Use to setup fib display and label information }
{calculation. }
{Form for this entry is yy.cw where: }
{ 1. yy= set fib line lengths to be yy past last bar }
{ 2. c= set line color 0-9 (see below) for UP project. }
{ 3. w= set line width 0-6 (0=thinnest 6=max width }
{COLORS: }
{Black=1, Blue=2, Cyan=3, Green=4,Magenta=5, }
{Red=6, Yellow=7, White=8, DarkBlue=9 }
{ }
{NOTE: Make this value negative if you want fib lines }
{plotted at the end of EACH leg of A-L-L swings. }
{Make this value positive if you want lines only }
{plotted for the last leg on chart. }
FullSet(False), {If false then plot a limited set of fib lines which }
{consists of multiples of: 0, .382, .618, 1.00, 1.382, }
{1.618,...., 3.0 . If this is set true then the next }
{ratios are added: .175, .25, .50, .786, 1.175, 1.25...}
AnnotFib(true), {Set false for no annotation on fib lines }
TimeOnly(false), {Set true for only time fib lines }
PricOnly(false), {Set true for only price fib lines }
ChanWide(1.25), {Multiplier of 21 bar StdDev to set width of projected }
{price channel. }
{NOTE: Set this value to ZERO for no channel lines. }
GannAngU(0.00), {Use this Gann angle also to calculated a price }
{projection line. Plot 360 degrees in time. }
{Negative, do a 720 degree plot. For UP angles }
GannAngD(0.00), {Use this Gann angle also to calculated a price }
{projection line. }
{Negative, do not plot the "normal" average TREND. }
ChanOnly(false), {Set true to only see price projection channels and NO }
{Fib price and/or time lines. False = price,time,&chan }
MultDeci(0); {A factor which is used to calculate a multiplier and }
{divisor to cause the price seen on the chart to fall }
{in the proper range for squaring of time and price. }
{Default value is 1 -- set to zero and no application }
{If a positive value then the assigned value is the }
{power to which the natural logarithm of the pivot price}
{is raised to establish a scaling factor calculated as: }
{ 1/power(log(price),MultDeci) }
{Although this scaling helps "normalize" over a wide }
{range of prices, this value will tend to require some }
{increase in value as a function of increased price. }
{If a NEGATIVE value then this basically is a DECIMAL }
{SHIFTING as noted by Gann. A -1 shifts the decimal }
{point one digit left or a division by 10. A -2 then is}
{the equivalent of dividing price by 100. }
The following "pictures" illustrate each of the
above parameters in such
a fashion that such parameters have more meaning.
NumBars(34), {Number of bars to use in automatically computing pivot/}
{turningpointns by use of the Swing_Lee_II function. }
{ }
{Set to zero to do manual selection of turning points. }
{To specify a pivot/TP at the TOP of a swing, use the }
{TEXT Drawing Tool and place the letter t or T just }
{above the bar on which the top of the swing occurs. For}
{the lower extremity of a swing then using the TEXT tool}
{place the letter b or B just below the lowest or }
{bottom bar for that leg. }
{ }
{Again, must be set to 0 (zero) for manual (i.e. T/B }
{specification }
{ }
{NOTE: }
{This application uses the Swing_Lee_II pivot finding }
{method which allows a different detection length to be }
{specified for the left and right side of the pivot. A }
{decimal fraction value (if given) is multiplied by 100 }
{and the resulting value used for the length of right }
{had detection. This value MUST be LESS than the }
{integer portion of the specification which is the }
{length for the left hand side. If no decimal fraction }
{is specified then the supplied value is used for both }
{the left and right hand lengths away from the pivot. }
{Set this value negative if only the price projections }
ForcePvt(true), {On last bar of computation, force a pivot if a pivot }
{has not been detected very recently. }
FibBars(75.20), {Use to setup fib display and label information } {calculation. } {Form for this entry is yy.cw where: } { 1. yy= set fib line lengths to be yy past last bar } { 2. c= set line color 0-9 (see below) for UP project. } { 3. w= set line width 0-6 (0=thinnest 6=max width } {COLORS: } {Black=1, Blue=2, Cyan=3, Green=4,Magenta=5, } {Red=6, Yellow=7, White=8, DarkBlue=9 } { } {NOTE: Make this value negative if you want fib lines } {plotted at the end of EACH leg of A-L-L swings. } {Make this value positive if you want lines only } {plotted for the last leg on chart. }
FullSet(False), {If false then plot a limited set of fib lines which } {consists of multiples of: 0, .382, .618, 1.00, 1.382, } {1.618,...., 3.0 . If this is set true then the next } {ratios are added: .175, .25, .50, .786, 1.175, 1.25...}
AnnotFib(true), {Set false for no annotation on fib lines }
TimeOnly(false), {Set true for only time fib lines }
PricOnly(false), {Set true for only price fib lines }
ChanWide(1.25), {Multiplier of 21 bar StdDev to set width of projected }
{price channel. }
{NOTE: Set this value to ZERO for no channel lines. }
GannAngU(0.00), {Use this Gann angle also to calculated a price } {projection line. Plot 360 degrees in time. } {Negative, do a 720 degree plot. For UP angles }
GannAngD(0.00), {Use this Gann angle also to calculated a price }
{projection line. }
{Negative, do not plot the "normal" average TREND. }
ChanOnly(false), {Set true to only see price projection channels and NO }
{Fib price and/or time lines. False = price,time,&chan }
MultDeci(9999); {A factor which is used to calculate a multiplier and } {divisor to cause the price seen on the chart to fall } {in the proper range for squaring of time and price. } {Default value is 1 -- set to zero and no application } {If a positive value then the assigned value is the } {power to which the natural logarithm of the pivot price} {is raised to establish a scaling factor calculated as: } { 1/power(log(price),MultDeci) } {Although this scaling helps "normalize" over a wide } {range of prices, this value will tend to require some } {increase in value as a function of increased price. } {If a NEGATIVE value then this basically is a DECIMAL } {SHIFTING as noted by Gann. A -1 shifts the decimal } {point one digit left or a division by 10. A -2 then is} {the equivalent of dividing price by 100. }
IF YOU CHANGE THE ABOVE MULTIDECI VALUE YOU ARE CRAZY ! ! !