# Trading A-Z #1: Support & Resistance Levels.

### Article #1 on Technical Analysis Detailing Support & Resistance Levels.

The first thing we are taught in Technical Analysis is how to find support and resistance levels. And while this task may seem easy, it is one of the most difficult endeavors. It remains crucial nonetheless to know where we stand with regards to demand and supply. This article presents the concept of support and resistance levels and introduces a few techniques that are used to find them.

I have just published a new book after the success of my previous one “*New Technical Indicators in Python*”. It features a more complete description and addition of structured trading strategies with a **GitHub **page dedicated to the continuously updated code. If you feel that this interests you, feel free to visit the below link, or if you prefer to buy the PDF version, you could contact me on **LinkedIn**.

**The Book of Trading Strategies***Amazon.com: The Book of Trading Strategies: 9798532885707: Kaabar, Sofien: Books*www.amazon.com

### Introduction to Support & Resistance Levels

At its purest form, a support level is an area supposed to keep prices from going down further. Naturally, when the market price approaches a support area, the right decision is to have a bullish bias.

A resistance level is an area supposed to keep prices from going up further. Naturally, when the market price approaches a resistance area, the right decision is to have a bearish bias. The above chart shows the support line in green and the resistance line in blue drawn subjectively based on empirical observation.

It is known that finding support and resistance levels can be done in many ways:

**Charting**: This technique is mostly subjective and uses the past reactions as pin points for the future. We can draw ascending or descending trend lines as well as horizontal support and resistance levels. The flaw of this technique is that it can be very subjective and can differ from one trader to another.**Fibonacci**: This technique is less subjective and uses the Fibonacci sequence (discussed in previous articles) as retracements to find reactionary levels.**Moving Averages:**This technique is objective and uses moving averages as dynamic support and resistance levels to follow market reactions. The flaw of this technique is that there is a huge number of periods and types of moving averages to choose from where the reliability differs.**Pivot Points:**This technique is objective and uses an old method of calculating the future implied support and resistance lines. It has stood the test of time and continues to be an efficient and quick way of analyzing the market.**Bollinger Bands:**This technique is objective and finds confidence levels using statistical methods. It is relatively simple and backed by the normal distribution curve. Unfortunately, the market does not follow the normal distribution but it is not far from it. Bollinger Bands have stood the test of time and will be discussed in further detail.

### Objective Method #1 Bollinger Bands

One of the pillars of descriptive statistics or any basic analysis method is the concept of averages. Averages give us a glance of the next expected value given a historical trend. They can also be a representative number of a larger dataset that helps us understand the data quickly. Another pillar is the concept of volatility. Volatility is the average deviation of the values from their mean. Let us create the simple hypothetical table with different random variables.

Let us suppose that the above is a timely ordered time series. If we had to naively guess the next value that comes after 10, then one of the best guesses can be the average the data. Therefore, if we sum up the values {5, 10, 15, 5, 10} and divide them by their quantity (i.e. 5), we get 9. This is the average of the above dataset. In python, we can generate the list or array and then calculate the average easily:

```
# Importing the required library
import numpy as np
# Creating the array
array = [5, 10, 15, 5, 10]
array = np.array(array)
# Calculating the mean
array.mean()
```

Now that we have calculated the mean value, we can see that no value in the dataset really equals 9. How do we know that the dataset is generally not close to the dataset? This is measured by what we call the Standard Deviation (Volatility).

The Standard Deviation simply measures the average distance away from the mean by looping through the individual values and comparing their distance to the mean.

```
# Calculating the mean
array.std()
```

The above code snippet calculates the Standard Deviation of the dataset which is around 3.74. This means that on average, the individual values are 3.74 units away from 9 (the mean). Now, let us move on to the normal distribution shown in the below curve.

The above curve shows the number of values within a number of standard deviations. For example, the area shaded in red represents around 1.33x of standard deviations away from the mean of zero. We know that if data is normally distributed then:

**About 68% of the data falls within 1 standard deviation of the mean.****About 95% of the data falls within 2 standard deviations of the mean.****About 99% of the data falls within 3 standard deviations of the mean.**

Presumably, this can be used to approximate the way to use financial returns data, but studies show that financial data is not normally distributed but at the moment we can assume it is so that we can use such indicators. The flaw of the method does not hinder much its usefulness.

Now, with the information below, we are ready to start creating the Bollinger Bands indicator:

**Financial time series data can have a moving average that calculates a rolling mean window. For example a 20-period moving average calculates each time a 20-period mean that refreshes each time a new bar is formed.****On this rolling mean window, we can calculate the Standard Deviation of the same lookback period on the moving average.**

What are the Bollinger Bands? When prices move, we can calculate a moving average (mean) around them so that we better understand their position regarding their mean. By doing this, we can also calculate where do they stand statistically.

Some say that the concept of volatility is the most important one in the financial markets industry. Trading the volatility bands is using some statistical properties to aid you in the decision making process, hence, you know you are in good hands.

The idea of the Bollinger Bands is to form two barriers calculated from a constant multiplied by the rolling Standard Deviation. They are in essence barriers that give out a probability that the market price should be contained within them. The lower Bollinger Band can be considered as a dynamic support while the upper Bollinger Band can be considered as a dynamic resistance. Hence, the Bollinger bands are simple a combination of a moving average that follows prices and a moving standard deviation(s) band that moves alongside the price and the moving average.

To calculate the two Bands, we use the following relatively simple formulas:

With the constant being the number of standard deviations that we choose to envelop prices with. By default, the indicator calculates a 20-period simple moving average and two standard deviations away from the price, then plots them together to get a better understanding of any statistical extremes. This means that on any time, we can calculate the mean and standard deviations of the last 20 observations we have and then multiply the standard deviation by the constant. Finally, we can add and subtract it from the mean to find the upper and lower band.

Clearly, the below chart seems easy to understand. Every time the price reaches one of the bands, a contrarian position is most suited and this is evidenced by the reactions we tend to see when prices hit these extremes. So, whenever the EURUSD reaches the upper band, we can say that statistically, it should consolidate and when it reaches the lower band, we can say that statistically, it should bounce.

Therefore, the levels of the Bollinger Bands give us dynamic support and resistance levels. A tip for analyzing the markets using this way: Try to include Bollinger Bands from higher time frames to maximize your chances for a reaction around the level.

### Objective Method #2 Moving Averages

Moving averages help us confirm and ride the trend. They are the most known technical indicator and this is because of their simplicity and their proven track record of adding value to the analyses. We can use them to find support and resistance levels, stops and targets, and to understand the underlying trend. This versatility makes them an indispensable tool in our trading arsenal.

As the name suggests, this is your plain simple mean that is used everywhere in statistics and basically any other part in our lives. It is simply the total values of the observations divided by the number of observations. Mathematically speaking, it can be written down as:

Moving averages are a great way of finding objective support and resistance levels and this makes it easier for us to determine where we can buy the dips to follow a move upwards and where we can sell the strengths to follow a move downwards in case short-selling is allowed. The trading rules are:

**A long (Buy) signal is generated whenever the market price approaches its moving average from the above. This is because we are anticipating a bullish reaction within the bullish trend.****A short (Sell) signal is generated whenever the market price approaches its moving average from the below. This is because we are anticipating a bearish reaction within the bearish trend.**

Combining moving average levels with Bollinger Bands may enhance our convictions and confirm the support and resistance levels we are looking at. For example, the 200-period moving average on the EURUSD is showing a support level at 1.1200 while the lower Bollinger Band is around 1.1210. This tells us that there is likely a support area at 1.1210/1.1200 from where we may see a reaction if the market reaches it.

If you are also interested by more technical indicators and using Python to create strategies, then my best-selling book on Technical Indicators may interest you:

**New Technical Indicators in Python***Amazon.com: New Technical Indicators in Python: 9798711128861: Kaabar, Mr Sofien: Books*www.amazon.com

### Objective Method #3 Pivot Points

Price action trading is based purely on price rather than its derivatives such as technical indicators. It enjoys a huge advantage in that it is not lagging. Price is what is happening right now and is either leading or coinciding but never lagging. Price action is all about detecting patterns and finding support and resistance levels. One way to do this is through simple mathematical calculations referred to as Pivot Points.

Pivot points are calculations used to find implied support and resistance levels. They are very simple and very easy to use. Some intraday traders calculate them every day and project levels that last for the duration of the trading day. Other traders calculate the levels on a monthly and on a yearly basis. For example, on the first day of January, a trader might calculate the projected support and resistance levels using last year’s values. The formulas and types of Pivot Points will be discussed below.

What is a Pivot Point and how is it used? Basically, it can be used as a magnet where the market should revert back to it in case it deviates away. Another method is to use it as the profit level where after initiating a reversal position, we can target the Pivot Point as an exit after having opened a contrarian position off the resistance or the support level.

The plot above shows the USDCAD hourly values where the calculation period is the previous day. We take the high, low, and close of the previous day, apply the above formulas and get the support and resistance levels for today (assuming we start very early in the morning). The zone in light grey above shows the trading zone where we already have the defined support at 1.2030 and the defined resistance at 1.2100.

Basically, when the market closed the previous day, we had the following HLC data:

**High = 1.20950****Low = 1.20275****Close = 1.20650**

Following the above formulas, our Pivot Point should be **1.2062** and the first support should be **1.2030**. The first resistance is **1.2100**. As the trading zone commences, we monitor the levels and try to trade them whenever the market approaches them.

### Subjective Method #1 Charting Analysis

Among the most common subjective methods of finding support and resistance levels is the charting analysis. It is based on the visual interpretation of the trader. Our eyes coupled with our minds are one of the best pattern recognizers albeit the limitations when faced with machine learning models. Charting analysis can be divided into two main parts:

**Graphical support & resistance levels (Mostly horizontal levels).**

**Trend lines (Mostly tilted lines within established trends). They can be parallel channels.**

Below is an example of a graphical support. The rule is to find at least three points so that they form a strong support. However, in my experience (Contrary to the popular belief), this only brings us one step closer to the level getting broken. At some point, the level will fail, and if we wait 3 or 4 reactions above it, the next one is likely the failure and break.

And here is a graphical resistance showing three reactions.

Trend lines can be channels as shown in the below chart. Notice how the market is evolving within two parallel lines.

Being able to say that this method is good or bad is extremely difficult because traders use them differently and not in a consistent way, therefore, objective evaluation is very unlikely. However, it is possible to code an algorithm that follows a specific set of modifiable rules to find such levels and then evaluate it.

### Subjective Method #2 Fibonacci Retracements

Leonardo Bonacci also known as Leonardo Fibonacci (which is a nickname to say son of Bonacci), has created one of the most fascinating series in our universe using simple addition techniques while observing rabbit populations. Now, to be fair, there is some evidence that suggest Indian mathematicians knew this sequence beforehand, we will stick to the widely accepted fact that Fibonacci came up with the sequence (Although, knowing the bright scientific and mathematical history of Indian researchers, I would not be surprised to know that they were the ones who discovered it first).

Fibonacci numbers are simply obtained using the following simple formula for n > 2:

This gives us the following sequence that goes to infinity:

1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, ….

The beauty of this sequence is that it is related to nature. For example, it appears the flowering of the artichoke, some flower petals such as Daisies, honeybees, etc.. Does it even occur in the galaxy spirals?

There is even a very interesting observation based on facts that suggests that the dimensions of the Earth and Moon are in Phi relationship, forming a Triangle based on 1.618, by Gary Meisner. **But what is Phi, and what is this 1.618?**

If we take any two successive numbers in the sequence, their ratio (Xn / Xn-1) gets closer to 1.618 which is what we call the golden ratio:

3 / 2 = **1**.5

13 / 8 = **1.6**66

55 / 34 = **1.61**764

233 / 144 = **1.6180**5

…

317,811 / 196,418 = **1.6180**3

Going to infinity, the ratios get closer to **1.618**, also known as Phi (ϕ). The beauty of this number is that its reciprocal is **0.618**. This is the most important ratio in Fibonacci trading.

The sequence and the ratio (as well as its variations) are heavily used in trading. The below is a quick summary of how they are used:

**The sequence: Choosing lookback periods of technical indicators such as 8-period moving averages or 21-period RSI.****The ratios: Retracing back a certain Fibonacci ratio such as 61.8% or 38.2%.**

For retracements, we tend to look at the following ratios as support or resistance levels:

**38.2%:**This level is found as the square of 61.8%.**50.0%:**This is not really a Fibonacci level, but we generally see it around them. It is simply half the distance of the initial reaction.**61.8%:**This is the most important level. We tend to expect reactions when the market reacts back to this level. Generally, we have a better conviction on this level than on other levels.**78.6%:**This is the first square root of 61.8%. It acts as a support and resistance level in triangles.**88.6%:**This is the second square root of 61.8%. It is a slightly more powerful support and resistance level than the previous level 78.6%. Some reactions tend to be powerful close to this level.**161.8%:**This is the golden ratio where the retracement of a move is below it (if the initial reaction is bullish) and above it (if the initial reaction is bearish). We have the same conviction of a reaction as the 61.8% retracement.**224.0%:**This is a ratio presented by Scott Carney in his books. It is simply the summation of the golden ratio and its reciprocal. It is used as a powerful reactionary level, especially with harmonic patterns.

The above illustration shows how retracements are drawn. For example, from the low of $100 to the high of $200, we would expect to find strong support at $138.20 which is the 61.8% retracement of the whole initial move.

Although, extreme accuracy does not exist in finance and trading, we should however try to approach it with any means we have and that in turn requires us to use candlesticks in order to retrace the upswing from its real bottom (i.e. the low of the first candle in the upswing) until the highest point of the suspected end of the wave (upswing).

Fibonacci projections are similar to retracements only they are projected using three points rather than just two. Generally, we tend to look at the following ratios as projected support or resistance levels:

**61.8%:**This is the second most important level. We tend to expect reactions when the market reacts back to this level.**100%:**This is what is called an ABCD pattern. It is the most important projection and will be explained in details below. Basically, it is a zig zag movement with the first and third leg being equal in length.**161.8%:**This is the golden ratio where we expect at least a reaction on the projections.**224.0%:**This is a ratio presented by Scott Carney in his books. It is simply the summation of the golden ratio and its reciprocal. It is used as a powerful reactionary level, especially with harmonic patterns.

The above illustration shows how projections are drawn. For example, from the low of A to the high of B and projecting the distance as of the low of C, we would expect to find a resistance at the D point which is AB = CD leg.

So, which one is the best? We cannot really say because it depends on you and on your risk preferences. My recommendation would be to use a mix of your favorite ones because using all of them would be tedious and may give out large zones. Personally, I always use Pivot Points and moving averages but this does not undermine the rest of the techniques.

### Conclusion

Price action analysis can be done in many ways and must be combined by other timing and technical tools so that it provides better reactionary signals.

Remember to always do your back-tests. You should always believe that other people are **wrong**. My indicators and style of trading may work for me but maybe not for you.

I am a firm believer of not spoon-feeding. I have learnt by doing and not by copying. You should get the idea, the function, the intuition, the conditions of the strategy, and then elaborate (an even better) one yourself so that you back-test and improve it before deciding to take it live or to eliminate it. My choice of not providing Back-testing results should lead the reader to explore more herself the strategy and work on it more.