TradingView
alexgrover
Jun 17, 2019 2:55 PM

Polar Equations Applied To Technical Analysis - Spirals 

EUR/USDOANDA

Description

Introduction

A trading chart is a two dimensional coordinate system, therefore it is possible to use different curves/figures in order to provide predictive insights, at the end this is what most technical analyst rely on (support resistances, squares/circles...etc), so geometry play a key role on technical analysis and the number of methods is only limited by traders imagination. Spirals is one of the tools available to traders and i want to understand them a bit better while also sharing information i gathered.

The Polar Coordinates

The polar coordinates can specify the position of a point in space by using coordinates r and theta. r is defined as the hypothenuse while theta is the symbol for the angle, it might be useful to get a reminder of coordinates and get a more graphical explanation of what i said.

In a cartesian coordinate system we can specify the position of a point in space by its position relative to x and y like shown below, this position is defined by how far away the point is from the origin (x) and how up it is (y).



The polar coordinate system as i mentioned before use other informations to specify the position of a point in space, it use the hypothenuse r and the angle theta. r tell you how far the point is from the origin while theta will tell you about the direction and how far up the point is.



While specifying the position of a point in the cartesian coordinate system just involve taking the value of x and y where the point is situated, the polar coordinate system will need a bit more calculus to specify the position of a point, first gather the cartesian coordinates x and y of the point then calculate theta and r :

r = sqrt(x*x + y*y)
theta = atan(y/x)

Converting from polar to cartesian consist into :
x = r*cos(theta)
y = r*sin(theta)


Polar equations enable you to represent circular functions in the polar coordinate, spirals are a case of curves that can be made with polar equations and that are used in technical analysis.

Polar Equations And The Golden Spiral

Spirals have polar equations in order to be show'n in the polar coordinate, the simplest spirale (Archimedean) have this form :

r = a + b*theta

The equation look like a first order polynomial while a and b are parameters related to the properties of the spirale. a basically tell you where the spirale will start while b control the position of the roots, roots are simply the point where the function cross the x axis, for example :

r = 0 + 1/pi*theta

Is a spirale which start at 0 and have roots : 0,-1,2-3,4....

Now lets talk about the golden spirale also called Fibonacci spirale, the logic behind Fibonacci methods are that the Fibonacci numbers are common in human environnements, and because human operations affect the market Fibonacci numbers could highlight humans patterns from price, of course this way of thinking is quite theoretical and since those methods use past data, returns will converge toward losses on an efficient market, however we can still try to look at the golden spirale and draw possible ideas/conclusions.

The golden spirale unlike the Archimedean use a growth factor, therefore the roots won't be equally spaced, the polar equation of a counterclockwise golden spirale is :

r = a*b^(theta*(pi/2))

a = is the origin of the spiral, if a = 1 then the spiral will start at x = 1
b is the growth factor, higher values will create more spaced roots.

Methods And Ideas For The Golden Spiral

Before drawing spirals on the chart make sure to lock the scale, in order to do so right click on the scale at the right and click on "Lock Price To Bar Ratio".

When using spirals we can be tempted to draw a lot of them, in fact you can see a lot of other analysis with a myriad of spirals on the chart, but try to keep it simple. There are a lot of ways to use spirals, like the majority of fibonacci methods our analysis can start by detecting a local maxima/minima (swing high/low) and its next local minima/maxima (swing low/high), you can also use the global maxima/minima. A method using this approach by using only local minima's is show'n here :


Another way that can actually provide an interesting method to spot on reversals is by using the spiral with two near tops/bottoms, this setup can be found near W or M patterns.



Counterclockwise spiral when using tops for the setup, forecast the next support.



Clockwise spiral when using bottoms for the setup, forecast the next resistance.

You can spot longer terms support resistance if you use a clockwise spiral for forecasting a support and counterclockwise for forecasting a resistance.





Conclusions

I have show'n what are spirals and how they can be used to predict next local maxima/minima. Now i'am not a fan of figures and geometry applied to technical analysis so i'am not really good in that field but its always fun to try new things. You can see from this article that any figure can be made from an equation and that you can exploit the coordinate space in a lot of different ways. So i hope you liked the article and if i made an error somewhere please let me know.

Thanks for reading !
Comments
idrisbengali
Fascinating Alex … does the chart need to be scaled ? and if so... how does one calculate the scale? came across this site a few days ago jasondavies.com/primos/
alexgrover
@idrisbengali, Thanks for your feedback, by scaling i mean locking the scale, basically if you draw a spiral on the chart and zoom in you will see that the spiral no longer appear where it was located, this is why you need to lock the price to bar ratio.
idrisbengali
@alexgrover, I agree the scale needs to be locked... I do not know how to arrive at this price to bar ratio... I mean each has its own vibration... I'm not on talking terms with Gann else I would have asked him :) just joking
makshank
@idrisbengali, @alexgrover, Great Learning ...I really liked your article and Fib Spirals concept seems to be quite interesting... However, what is the best practice to know the perfect price to bar ratio for a particular scrip?... I mean there must be some starting point specific to the scrip as it will differ for each of them while plotting the spirals on the chart. Could you please share your views and details?

and also what is the purpose of a signal window? How to use it?
alexgrover
@makshank, The fact that making spirals require to lock price/bar ratio makes them unusable, i wasn't aware of that during the time i made the article. In short the implementation of the spiral drawing tool in tradingview is quite poor and would require massive improvements :(
theheirophant
Wow mate this is really cool. You have opened a new dimension in my mind :D
alexgrover
@theheirophant, I'am really glad you liked the article, let me know if you want me to talk about other methods applied to technical analysis.
theheirophant
@alexgrover, is there a way we could perhaps use zigzag to automate via scripting?
alexgrover
@theheirophant, pinescript does not support polar equations and there is no way to control any parameter from the spiral curve by another indicator, however it might not be impossible to do a spiral without theta, i will think about it.
JoshuaMcGowan
Dude. Again, next level with fib spirals. On my list of topics to understand better in detail for sure...
More