# De-Constructing Indicators



## wayneL (19 March 2008)

I was going through some files that I had done a long time ago and stumbled across these that I never posted anywhere.

Anyway, it seems that predictive powers are assigned to indicators by those fairly new to the field of technical analysis. I think the best way to understand indicators, is to pull them to bits and see what makes them tick. Then you can see exactly what it's showing you (or not showing you).

I guarantee you'll look at indicators completely differently, or perhaps not at all after going through this exercise.

See below:


----------



## wayneL (19 March 2008)

The first one I want to look at is the MACD. MACD stands for Moving Average Convergence Divergence. I’ll comment on this a bit later, but first lets build it from scratch to get a handle on what it’s actually doing.

The MACD itself measures the distance between a 12 period exponential moving average and a 26 period exponential moving average, expressed as 12 EMA - 26 EMA. That’s it! That’s all it does.




In the chart above, I have the EMAs plotted on the price action and the MACD plotted in the lower pane. On the MACD, the 26 EMA is essentially represented as the orange zero line and the 12 EMA as the red oscillator. Notice as indicated, that as the moving averages cross over on the price chart, is also where the oscillator crosses the zero line. Where the EMAs are moving apart is where the oscillator is moving away from the zero line (i.e. the EMAs are diverging). Where the EMAs are moving closer together, is where the oscillator is moving closer to the zero line (i.e. the EMAs are converging). This is where it gets it’s name, Moving Average Convergence Divergence.

Basically, divergence implies increasing momentum, whereas convergence implies decreasing momentum. There is enough written around the web on interpretation of the indicator so no need to repeat that here. (Most of it nonsense)

The indicator usually also comes with a couple of extra components:




A 9 period exponential moving average of the MACD oscillator is also plotted (the green line above) as a “signal” line; once again enough written around the web about that.

Sometimes, what is called a “MACD-Histogram” is also plotted along with the MACD and shows up as the yellow vertical bars above. The measures the distance between the MACD and the signal line. Once again, as indicated, note when the MACD crosses its signal line is when the MACD-Histogram crosses the zero line.

The MACD parameters can be varied by traders to customize trading signals according to their own parameters.


----------



## wayneL (19 March 2008)

Next one, Stochastics:

The stochastic indicator is another indicator assigned predictive powers by many nooooobs. Let’s go ahead and pull this one apart and see what it actually measures.

Firstly, let’s look at the fast stochastic. The first step is to find the highest high value (HHV) and the lowest low value (LLV)of the last x days. For out example we are using the last 14 days. This is plotted as the green dashed lines on the chart below.

The fast stochastic simply measures where the closing price (represented on the chart as the red line) is in relation to those two values and expresses this as a percentage. For example if the closing price is exactly mid-way between the high and low, the stochastic will give a reading of 50.

This is plotted plotted in the lower pane below.




So what the fast stochastic oscillator does is to simple measure where the price is in relation to the last x days highs and lows. That’s it!

The slow stochastic simply smooths the three values by x number of periods by applying a simple moving average. (usually 3 periods) i.e. It smooths the HHV, the LLV and the closing price and then measures where the smoothed price is in relation the the smoothed HHV and LLV values and expresses these as a percentage. In the chart below, I have applied a smoothing of 8 periods, just to accentuate this for the example. (Compare the the two images)




In addition, A trigger line is applied to the oscillator which is an x period moving average (usually 3 periods) of the oscillator. Horizontal lines at 20% and 80% are further added as arbitrary markers for “oversold” and “overbought” areas. (which I hope you will see as nonsense) This gives us the completed indicator which I have plotted below with the values of 14,3,3.




As can be seen, the slow stochastic gives tradeable signals according to the conventional interpretation, however by knowing exactly what it measures, hopefully better trading decisions are made by referring to the price action as the ultimate arbiter, if this indicator is used.


----------



## Sean K (19 March 2008)

Wish I could see the charts. 

Is it just Peru?


----------



## wayneL (19 March 2008)

Hmmmm Maybe my server is blocking them thinking somebody is robbing bandwidth. I'll upload the images to tinypic... give me a few minutes.


----------



## wayneL (19 March 2008)

OK should be visible now.


----------



## wayneL (19 March 2008)

RSI:

The Relative Strength Index (RSI) is a  purely  mathematicalconstruct… well, all indicators are, but the RSI has no useful visual tags in it’s construction that we can plot on a chart to see what it is measuring. For that reason, I consider it a bit more abstract in relation to pure price action. So basically, no charts showing the intermediate steps in construction.

The RSI starts off with 2 separate parts. For the example we will use a 14 period RSI.

Part 1/ For each of the last 14 days: If the day was up we assign the value it was up by. (e.g. If todays close is up 14 cents, we assign the value of 0.14) If the day is a down day we assign the value of zero. Find the Wilders Moving Average (similar to a simple moving average) of these values. We’ll assign this value the variable “rup”.

Part 2/ For each of the last 14 days: If the day was down we assign the value it was up by. (e.g. If todays close is down 45 cents, we assign the value of 0.45) If the day is an up day we assign the value of zero. Find the Wilders Moving Average of these values. We’ll assign this value the variable “rdn”.

Next we apply this equation to calculate the Relative Strength Index:

RSI = 100 * (rup / (rup + rdn))

What the indicator does is compare the strength of movement and number of up days, against the strength of movement and number of down days and indexes them to show a value of between 0 and 100. Horizontal lines are usually drawn at 30 and 70 to arbitrarily assign zones of overbought and oversold.

As If you didn’t know, it looks like this:


----------



## wayneL (19 March 2008)

OK last one from me, the CCI:

The Commodity Channel Index Is a bit more complicated in it’s construction than most other well known indicators. It is related to the MACD in that it measures the momentum of the stock, but is much more reactive due to the shorter time frames it considers. It has gained some popularity in recent years, particularly with intraday futures traders, due to the efforts of Ken Wood of Woodies CCI Club.

OK, building the indicator from scratch; let’s say we are constructing a 20 day CCI. The first thing is the find the daily pivot point (i.e. (High + Low + Close)/3 ). Next we find the 20 day simple moving average of the daily pivot point. I’ll plot these on a chart as we go along.




The next step is to create a simple oscillator from these two values.

i.e. Pivot Point - 20 day MA of pivot point.

This simple measures the distance between the 2 values. Notice the correlation between the Values on the price chart and the oscillator.

In the osillator, the 20 day MA becomes the zero line. Notice when the PP on the price chart crosses the 20MA is when the oscillator crosses the zero line.




The next step is to find the 20 day “Mean Deviation” of the stock price. This is a measure of volatility very similar to “Standard deviation”.

We divide the oscillator value by the mean deviation to “correct” the oscillator to be relevant to current volatility.

I have plotted both the mean deviation and the new oscillator on the chart.

Now we have the the precise shape of the CCI, just one more step and we’re done.




The last step is to index the CCI.

Lambert, (the creator of the CCI) wanted the values to be between 100 and -100 70% of the time, so he divided the oscillator value by 0.015 to achieve this aim.

We can plot the 100 & -100 lines on the oscillator for reference.

Now we have the finished CCI




One can also make more of the CCI for sh!ts and giggles.

*Plot 200 and -200 for extreme readings.

*Include a histogram to make it more visually interesting and useful(?)




As with the other “Know Your Indicator” articles, I’ll leave the interpretation of these indicators for elsewhere.


----------



## Sean K (19 March 2008)

Which indicators did you use when you were a noob Wayne? Combination? Used as a guide, or confirmation? Or, just always went off price action?


----------



## wayneL (19 March 2008)

kennas said:


> Which indicators did you use when you were a noob Wayne? Combination? Used as a guide, or confirmation? Or, just always went off price action?



I always used a modified MACD 8,13,3... with further reference to trendlines, patterns etc.

I still have an oscillator running on the bottom of my chart, the colours are pretty, and... it is the occasional psychological crutch for a trading decision. But that's rare, I rarely look at it because I know what it's going to look like anyway.


----------



## Sean K (19 March 2008)

wayneL said:


> the colours are pretty, and...



I always favour the colours for my trading decisions too.  LOL


----------



## Timmy (19 March 2008)

This is a great topic Wayne, should become required reading for new entrants.  While you say that much of what is written about these indicators on the web is nonsense unfortunately I find the same applies to what is written about them in books .... which is even worse 'cause you've paid for the book!


----------



## Santob (19 March 2008)

Thanks for this thread Wayne.


----------



## deve (19 March 2008)

Thanks so much for these great posts Wayne. Much appreciated.

Cheers
Steve


----------



## buckylegs (19 March 2008)

Thanks Wayne.  Any chance of de-constructing more in the future?

Cheers
Scotty


----------



## kingie_d (19 March 2008)

Great thread!


----------



## Chorlton (19 March 2008)

wayneL said:


> I was going through some files that I had done a long time ago and stumbled across these that I never posted anywhere.
> 
> Anyway, it seems that predictive powers are assigned to indicators by those fairly new to the field of technical analysis. I think the best way to understand indicators, is to pull them to bits and see what makes them tick. Then you can see exactly what it's showing you (or not showing you).
> 
> ...




Hello WayneL,

Firstly, Great Thread!!

Even though I believe that one only needs Price & Volume to trade TA, I do believe that indicators do have their use. For example, rather than having to physical code something, sometimes it is easier to simply reference an indicator if the result that it gives is the same as what you are trying to code. In otherwords they should be used for convenience only!!

However, the problem with most newbies, is that they focus directly on indicators and try to design some form of profitable strategy based on a combination of them or even worse try to find the "Holy Grail / One fits all" indicator which will lead them to riches, without really inderstanding what is happening on a chart.

Hopefully this thread with allow these people to question their approach....

For me personally, I started off trading (like probably many others) with a price chart and 6 (yes 6!!!) indicators on my screen. There were so many indicators that the actual price chart was squashed up at the top of the screen and to be honest not very legible!!! But it didn't matter because with so many colours and moving squiggly lines I had to know what I was doing!!!  Right???? ....  Err....  actually no!!!

Interestingly, as I became more experienced, the number of indicators dropped. At the point when I became the most profitable, my screen only consisted of a price chart and volume.

IMO the phrase "KISS" is very underrated 

All the best,

Chorlton


----------



## CFD (19 March 2008)

Price and volume yes, but if you take the view that you are only going to trade with the trend, then you need to be consistent in the way you identify the trend.


----------



## Chorlton (19 March 2008)

CFD said:


> Price and volume yes, but if you take the view that you are only going to trade with the trend, then you need to be consistent in the way you identify the trend.




I agree, and in those circumstances, I would personally use an indicator (ie MA) for convenience.


----------



## tech/a (20 March 2008)

CFD said:


> Price and volume yes, but if you take the view that you are only going to trade with the trend, then you need to be consistent in the way you identify the trend.




Timeframe/Pattern/Place/Range/Volume/[Divergence]/Anticipation


----------



## Chorlton (20 March 2008)

tech/a said:


> Timeframe/Pattern/*Place/Range*/Volume/*[Divergence]/Anticipation*




Tech/A,

Can you expand on those elements in BOLD? ... Maybe with an example?


Thanks....


----------



## chops_a_must (20 March 2008)

CFD said:


> Price and volume yes, but if you take the view that you are only going to trade with the trend, then you need to be consistent in the way you identify the trend.




Doesn't this kind of go against the theories to do with hedging?

Participating and potentially profiting from a short term trend, whilst at the same time participating and potentially profiting in a larger trend, that you would still be in regardless?


----------



## wayneL (20 March 2008)

Chorlton said:


> I agree, and in those circumstances, I would personally use an indicator (ie MA) for convenience.



Indicators definitely DO have uses. 

What I was hoping to achieve was to get people to understand exactly what they are measuring. In so doing, I have personally found that they diminish in importance and become a tool for convenience (as per your point above) rather than the first point of reference.

For instance when I do market scans for trading prospects, it is more convenient to use indicators than trying to code price patterns. Once I have a small universe of prospects, it is back to price.

A few visual "aids" definitely help define the analysis... MAs, trendlines, support and resistance levels etc. 

It is all a visual thing.



buckylegs said:


> Any chance of de-constructing more in the future?
> Scotty




I reckon the best way is to do the work yourselves.

Here is a source for all the mathematical formulas for indicators:

http://www.fmlabs.com/reference/default.htm?url=ADX.htm

With this, you can rip off the wings, pull off the legs, open up the guts and see inside any indicator.

Open up discussion on any indicator here.

Cheers


----------

