Login Page - Create Account

Support Board

Date/Time: Sun, 21 Jan 2018 16:48:16 +0000

Post From: Offering To The Community: Klinger Volume Oscillator With Filters

[2015-07-13 04:04:18]
bjohnson777 (Brett Johnson) - Posts: 204
Since I've been studying volume indicators the past few weeks, I took on the Klinger Volume Oscillator (KVO) request in another thread. It has some interesting properties that might help me create my own. After many hours of searching bad web pages and banging my head against the table, I've finally been able to produce the PROPER KVO version. It seems EVERYONE else gets it wrong for some reason. I'll explain more in the next post. I request KVO be added to the main SC distro once its checked over.

From the "Display Study Documentation" button:

Klinger Volume Oscillator With Filters (KVO). A price and volume based oscillator developed by Stephen J. Klinger to handle both short term and long term time frame analysis of money flowing into and out of a security. It's output is very similar to MACD and can be traded in the same way. It is somewhat unique as its algorithm keeps track of current direction and accounts for it in the calculations. Klinger defined volume as a force behind price movement and accumulation/distribution as the overall volume change from period to period. He labeled it Volume Force. A positive Volume Force is more accumulation than distribution, a negative volume force is more distribution than accumulation. As a trend starts to end, the Volume Force should noticeably reduce before the price reversal. Klinger has some guidelines for his oscillator. The most reliable signals from KVO are in the direction of the current price trend so don't trade against the trend. KVO divergence from current price action is a trend weakening signal (similar to MACD divergence). Klinger uses a separate 89 period EMA for price to determine the current price trend. An up trend is price above EMA89, and a down trend is price below EMA89. In an up trend, if KVO tops then down crosses the trigger line, that's a signal that the trend is near completion (invert that for a down trend). Klinger recommends other indicators like Stochastic, RSI, and MACD to help confirm movement into over bought/sold conditions.

Brett Johnson's Programming Rant: Most people are totally clueless about how to properly implement this indicator. Initially I thought I found a web page that properly explained it, but continued searching over the next couple hours proved me very wrong. I've found several variations that are incorrect. I've found some web pages with 3 different versions written in 3 different stock chart languages. I've found a couple web pages showing the proper algorithm in math form (well, mostly), but then they screw up the code several lines down. Nobody seems to pay attention. Some people seem to give up and implement a simplified version. If you're trying to program this indicator yourself and are stuck, check my source code. It's open and excessively documented. There's no reason for a simple algorithm to be this screwed up on so many other platforms and web pages.

This KVO version has multiple smoothing options to handle an extremely noisy indicator.

This KVO version has a Volume Filter option to handle cases when a volume spike smashes the indicator making it hard to read. Large institutions sometimes do this to hide their activity afterward. The "Straight" option passes volume data through without any filtering. The "Log" option runs each volume bar through the log function making a type of "log scale". The "Square Root" option runs each volume bar through the square root function making a type of "square root scale". The "MA Clip" option will clip volume above a chosen moving average. The final Smoothing option will apply a moving average to take some of the noise out of the final OBV line.

To use KVO in its original form, turn off all extra options and use the default values.

Observations. To say that this is a noisy indicator is an understatement. Turn on MA Clip 3 and all the filters to their default values (or higher) to greatly clean this up. In addition to the recommended indicators, also add trend lines as a price shouldn't be traded until it breaks the trend line. Always remember, just because KVO moves doesn't mean that price will move with it. This indicator doesn't do very well with ranging data. To be fair, that's true of many indicators. This indicator was originally developed in the mid 1990's for daily bars that almost always had volume. Low time scale intraday bars (like 1 minute) with 0 volume will make the KVO line very noisy. Zoom out time wise until all the bars have enough volume for a clean signal.

Minor update 2016-10-15. No major function changes.
Regular compiles moved to "Brett Johnson's Standard Tool Kit" DLL.
Date Time Of Last Edit: 2016-10-15 06:49:41
attachmentKlingerVolumeOscillatorWithFilters.cpp - Attached On 2016-10-15 06:49:09 UTC - Size: 20.39 KB - 32 views
attachmentKlingerVolumeOscillatorWithFilters.dll - Attached On 2016-10-15 06:49:27 UTC - Size: 88.5 KB - 25 views