Australian (ASX) Stock Market Forum

De-Constructing Indicators

wayneL

VIVA LA LIBERTAD, CARAJO!
Joined
9 July 2004
Posts
25,578
Reactions
12,704
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:
 
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.

insq49.gif

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:

2ch6vc3.gif

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.
 

Attachments

  • insq49.gif
    insq49.gif
    20.2 KB · Views: 0
  • 2ch6vc3.gif
    2ch6vc3.gif
    15.8 KB · Views: 0
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.

30caul0.png

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)

zv2y4x.png

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.

nvv501.png

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.
 

Attachments

  • 30caul0.png
    30caul0.png
    22.7 KB · Views: 0
  • zv2y4x.png
    zv2y4x.png
    23.8 KB · Views: 0
  • nvv501.png
    nvv501.png
    21.2 KB · Views: 0
Hmmmm Maybe my server is blocking them thinking somebody is robbing bandwidth. I'll upload the images to tinypic... give me a few minutes.
 
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:

2r2u81u.png
 

Attachments

  • 2r2u81u.png
    2r2u81u.png
    30.1 KB · Views: 1
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.

35laxhf.jpg

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.

2ywzot2.png

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.

2mg8ld0.png

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

2v01j7t.gif

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(?)

fxxh6w.gif

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

Attachments

  • 2ywzot2.png
    2ywzot2.png
    29.8 KB · Views: 0
  • 35laxhf.jpg
    35laxhf.jpg
    44.6 KB · Views: 0
  • 2mg8ld0.png
    2mg8ld0.png
    31.7 KB · Views: 0
  • 2v01j7t.gif
    2v01j7t.gif
    24 KB · Views: 0
  • fxxh6w.gif
    fxxh6w.gif
    18.3 KB · Views: 0
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?
 
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.
 
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!
 
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:

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
 
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.
 
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.
 
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
 
Top