Download MetaTrader 5

Watch how to download trading robots for free

Interesting script?
So post a link to it -
let others appraise it

You liked the script? Try it in the MetaTrader 5 terminal

2011.10.28 10:27

XKVO - indicator for MetaTrader 5

| English Deutsch Русский 中文 Español 日本語 Português

votes: 13
xkvo.mq5 (10.87 KB)view


Klinger Volume Oscillator (KVO) was developed by Stephen Klinger. KVO has two features that may seem opposed to each other at the first glance: it is quite sensitive to the signals of short-term tops and bottoms but at the same time it displays long-term money flows heading to and out of the market quite accurately.

KVO indicator is based on the following principles:

  1. A price range is a movement measure and the volume is a power of that movement. High + Low + Close sum determines a trend. There is an accumulation, in case the current day sum exceeds the sum of a previous day, and there is distribution in the reverse case. In case these sums are equal to each other, the current trend remains;
  2. The volume causes constant intraday price changes that show buy and sell power. KVO determines the difference between the number of accumulated and distributed stocks every day as a volume fоrсе. High and growing volume force value must follow an uptrend. Then this value gradually diminishes that corresponds to the last steps of an uptrend and the first steps of the successing downtrend. Further on, the rising of the volume force showing definite accumulation must happen again before the bottom is formed;
  3. After transformation of the volume force into the oscillator that represents the difference between 34 and 55 day exponential moving average with 13 day trigger (signal line) it is quite easy to trace a "volume force" to and out of the market. Comparing this force with prices movement can help to reveal divergencies at tops and bottoms.

Klinger recommends the following basic concepts when applying KVO:

  • The most reliable signals appear in the direction of a leading trend;
  • The most strong signal is a divergence between new tops and bottoms of a price and an indicator charts, especially in overbought/oversold areas;
  • In case of an uptrend it is time to buy when KVO goes down to very low levels below zero — and then turns upwards and crosses its trigger line. In case of a downtrend, it is time to sell when KVO goes up to very high levels above zero, turns downwards and crosses its trigger line.

It should be repeated that KVO works well during trade operations in direction of a trend and is less efficient in case working against a trend.

This indicator allows to select the smoothing type of XCVO basic histogram and its signal line out of ten possible versions:

  1. SMA - simple moving average;
  2. EMA - exponential moving average;
  3. SMMA - smoothed moving average;
  4. LWMA - linear weighted moving average;
  5. JJMA - JMA adaptive average;
  6. JurX - ultralinear smoothing;
  7. ParMA - parabolic smoothing;
  8. T3 - Tillson's multiple exponential smoothing;
  9. VIDYA - smoothing with the use of Tushar Chande's algorithm;;
  10. AMA - smoothing with the use of Perry Kaufman's algorithm.

It should be noted that Phase type parameters for different smoothing algorithms have completely different meaning. For JMA it is an external Phase variable changing from -100 to +100. For T3 it is a smoothing ratio multiplied by 100 for better visualization, for VIDYA it is a CMO oscillator period and for AMA it is a slow EMA period. In other algorithms these parameters do not affect smoothing. For AMA fast EMA period is a fixed value and is equal to 2 by default. The ratio of raising to the power is also equal to 2 for AMA.

The indicator uses SmoothAlgorithms.mqh library classes (must be copied to the terminal_data_folder\MQL5\Include). The use of the classes was thoroughly described in the article "Averaging Price Series for Intermediate Calculations Without Using Additional Buffers".


XKVO indicator (Klinger Volume Oscillator)

Translated from Russian by MetaQuotes Software Corp.
Original code:

Accelerator Oscillator (AC) Accelerator Oscillator (AC)

The Acceleration/Deceleration Indicator (AC) measures acceleration and deceleration of the current driving force.

Average Directional Movement Index (ADX) Average Directional Movement Index (ADX)

The Average Directional Movement Index Indicator (ADX) helps to determine if there is a price trend.

Closed_TOTAL Closed_TOTAL

Total closure of all positions (winners/losers). You can also select which are of a single instrument.

Closed_LOSS Closed_LOSS

Closure of all positions with a loss. (You can indicate a specific instrument if you want to).