This is the code for my Typical Fib Average. It is basically used as support/resistance.
The upward /downward slope of the average lines helps determine the overall direction of price.
When price crosses the Fibonacci average, it can be a sign of a change in trend.
It is a combination of 8 averages (lengths are adjustable) that are each multiplied by a Fibonacci number, added up, and then divided by the sum of those Fibonacci numbers.
It's used the same way you'd use a moving average. At it's default settings, it pairs well with charts of the index etfs like SPY, QQQ, and DIA.
I've updated the original post to show what the average looks like on a daily chart of the SPY at it's default settings. You can mess around with the average types and lengths to get different averages, but it's important to understand that AverageLength1 is weighted the most (x34) and AverageLength8 is weighted the least (x1).
Below is a screenshot of the Typical Fib Average at it's default settings on a daily chart of the SPY:
The upward /downward slope of the average lines helps determine the overall direction of price.
When price crosses the Fibonacci average, it can be a sign of a change in trend.
It is a combination of 8 averages (lengths are adjustable) that are each multiplied by a Fibonacci number, added up, and then divided by the sum of those Fibonacci numbers.
It's used the same way you'd use a moving average. At it's default settings, it pairs well with charts of the index etfs like SPY, QQQ, and DIA.
I've updated the original post to show what the average looks like on a daily chart of the SPY at it's default settings. You can mess around with the average types and lengths to get different averages, but it's important to understand that AverageLength1 is weighted the most (x34) and AverageLength8 is weighted the least (x1).
Code:
input AverageTypes = AverageType.EXPONENTIAL;
input AveragePrices = close;
input AverageLength1 = 144;
input AverageLength2 = 126;
input AverageLength3 = 108;
input AverageLength4 = 90;
input AverageLength5 = 72;
input AverageLength6 = 54;
input AverageLength7 = 27;
input AverageLength8 = 18;
def avg1 = MovingAverage(AverageTypes, AveragePrices, AverageLength1) * 34;
def avg2 = MovingAverage(AverageTypes, AveragePrices, AverageLength2) * 21;
def avg3 = MovingAverage(AverageTypes, AveragePrices, AverageLength3) * 13;
def avg4 = MovingAverage(AverageTypes, AveragePrices, AverageLength4) * 8;
def avg5 = MovingAverage(AverageTypes, AveragePrices, AverageLength5) * 5;
def avg6 = MovingAverage(AverageTypes, AveragePrices, AverageLength6) * 3;
def avg7 = MovingAverage(AverageTypes, AveragePrices, AverageLength7) * 2;
def avg8 = MovingAverage(AverageTypes, AveragePrices, AverageLength8);
def typfibavg = (avg1 + avg2 + avg3 + avg4 + avg5 + avg6 + avg7 + avg8) / 87;
plot TypicalFibAverage = typfibavg;
Below is a screenshot of the Typical Fib Average at it's default settings on a daily chart of the SPY:
Last edited by a moderator: