Monthly Archives: April 2015

Stochastic Oscillator

The Stochastic is another momentum oscillator indicator which is highly popular amongst traders. It was originally developed by George C. Lane back in the 1950’s. Lane was quoted as saying, “Stochastics measures the momentum of price. If you visualize a rocket going up in the air – before it can turn down, it must slow down. Momentum always changes direction before price.”

This indicator calculates the position of the current price in relation to the highest high and the lowest low of the last n bars. The idea being that when the market is trending up, price is closer to the highs of the bars and when the market is trending down price tends to be closer to the lows of the bars.

The Stochastic uses a scale from 0 to 100 and has an Overbought line at 80 and an Oversold line at 20.

There are two speeds of Stochastics that are available – Fast and Slow – one being a derivative of the other.


For the Fast Stochastic we want to take the highest high and the lowest low of the past n bars like so:

%K = (CurrentPrice – Lowest(Low, n)) / (Highest(High, n) – Lowest(Low, n)) * 100;

%K represents the Stochastic. The n is period lookback used and is usually set to 14 by default.

There is another plot called the %D which Lane contended was good to find divergence in the market. The %D is calculated simply by averaging the %K as follows:

%D = Average(%K, n);

The n in this case is typically set to 3 by default.

Stochastic (Fast)

Given the focus on the Fast %D for divergence, the Slow Stochastic was created to emphasize its importance. To do this version, you continue with the formula above by doing:

Slow%K = %D;
Slow%D = Average(Slow%K, n);

As you can see, to make the Slow Stochastic, we simply get the %D from the fast stochastic and use it as the Slow%K and then we smooth the Slow%K to make the Slow%D. Like the Fast Stochastic, the typical period (n) used for the Slow%D is 3 by default. This effectively smooths out a lot of the noise of the faster version.

Stochastic (Slow)

In summary:

Fast %K = %K basic calculation
Fast %D = 3 period average of Fast %K
Slow %K = Fast % D
Slow %D = 3 period average of Slow %K


Like I say for all oscillators, do not expect the market to reverse when the oscillator tells you it is Overbought or Oversold – they could stay that way for a LONG time if there is a lot of buying or selling pressure. However, the Stochastic is real good at showing a decline of momentum.

Stochastic is very good at showing a divergence in the market – for instance in an uptrend the market is making higher highs but the Stochastic is making lower highs – THAT is a divergence and usually means the market is getting tired and about to reverse. The same goes for lower lows in the market and higher lows in the Stochastic – a signal that the market could be ready for a reversal to the upside.

Stochastic Divergence

Sometimes traders like to treat the %D as a trigger line – for instance, when the %K crosses over the %D and the 20 line, there is a Long condition. Likewise, when the %K crossed under the %D and the 80 line, there is a Short condition. However be cautioned in that this doesn’t happen all the time. When there is a strong trend, a cross of the %D can be a fake out.

Relative Strength Index (RSI)

J. Welles Wilder is known for his innovations in technical analysis – like Average True Range, Average Directional Index (ADX) and the Parabolic SAR – but perhaps his most popular indicator used in trading is the Relative Strength Index.

The Relative Strength Index (RSI) is an oscillator that measures the momentum of price change. It uses a scale between zero and 100 and is considered “overbought” when over 70 and “oversold” when below 30. Like many technical analysis indicators, the RSI has a lookback period where it compares price changes for a specific period of time – this is typically set to 14.


To calculate the RSI, you take the average gains from the last n days and divide that by the average losses from the same n days. For instance:

RS = Average(Gains, nPeriod) / Average(Losses, nPeriod);

The result is then normalized to a 0 to 100 scale by doing:

RSI = 100 – (100 / (1+RS));  

RSI Indicator

The original calculation uses a Simple Moving Average for the gains and losses, but some version will use the Exponential Moving Average. I have even seen the Hull Moving Average used for an extra smooth and responsive RSI movement.


The purpose of most oscillators is to show when a security is over extended to the upside or the downside. When the RSI is above 70 it is considered Overbought and when it is below 30 it is Oversold. And also like most oscillators, you cannot trust that when a security is Overbought or Oversold that it will change its trend any time soon – sometimes trends can last for weeks before price returns to the mean.

So what I use the RSI for? The RSI can tell you the strength of directional movement. Given the typical 14 day period, when the RSI pegs 100, it means there has not been a losing day in the last 14 days. Likewise, if the RSI hits 0 (zero) then there have been no gains in the last 14 days. Obviously those conditions cannot last forever, but given that the Overbought and Oversold zones are 30 points each, it is possible they can last a long while. But know that the steeper the directional move is in the RSI, the stronger the trend is in the market.

This is to say, use the RSI for directional momentum rather than a signal that the market is about to turn.