Announcement

Collapse
No announcement yet.

Klinger Volume Oscillator (KVO)

Collapse
This topic is closed.
X
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Klinger Volume Oscillator (KVO)

    File Name: KVO.efs

    Description:
    Klinger Volume Oscillator (KVO)

    Formula Parameters:
    TrigLen : 13
    FastX : 34
    SlowX : 55


    Notes:
    The Klinger Oscillator (KO) was developed by Stephen J. Klinger. Learning
    from prior research on volume by such well-known technicians as Joseph Granville,
    Larry Williams, and Marc Chaikin, Mr. Klinger set out to develop a volume-based
    indicator to help in both short- and long-term analysis.
    The KO was developed with two seemingly opposite goals in mind: to be sensitive
    enough to signal short-term tops and bottoms, yet accurate enough to reflect the
    long-term flow of money into and out of a security.
    The KO is based on the following tenets:
    Price range (i.e. High - Low) is a measure of movement and volume is the force behind
    the movement. The sum of High + Low + Close defines a trend. Accumulation occurs when
    today's sum is greater than the previous day's. Conversely, distribution occurs when
    today's sum is less than the previous day's. When the sums are equal, the existing trend
    is maintained.
    Volume produces continuous intra-day changes in price reflecting buying and selling pressure.
    The KO quantifies the difference between the number of shares being accumulated and distributed
    each day as "volume force". A strong, rising volume force should accompany an uptrend and then
    gradually contract over time during the latter stages of the uptrend and the early stages of
    the following downtrend. This should be followed by a rising volume force reflecting some
    accumulation before a bottom develops.


    Download File:
    KVO.efs



    EFS Code:
    PHP Code:
    /*********************************
    Provided By:  
        eSignal (Copyright c eSignal), a division of Interactive Data 
        Corporation. 2009. All rights reserved. This sample eSignal 
        Formula Script (EFS) is for educational purposes only and may be 
        modified and saved under a new file name.  eSignal is not responsible
        for the functionality once modified.  eSignal reserves the right 
        to modify and overwrite this EFS file with each new release.

    Description:        
        Klinger Volume Oscillator (KVO) 
        
    Version:            1.0  05/27/2009
     
    Formula Parameters:                     Default:
        TrigLen                             13
        FastX                               34
        SlowX                               55
        
    Notes:
        The Klinger Oscillator (KO) was developed by Stephen J. Klinger. Learning 
        from prior research on volume by such well-known technicians as Joseph Granville, 
        Larry Williams, and Marc Chaikin, Mr. Klinger set out to develop a volume-based 
        indicator to help in both short- and long-term analysis.
        The KO was developed with two seemingly opposite goals in mind: to be sensitive 
        enough to signal short-term tops and bottoms, yet accurate enough to reflect the 
        long-term flow of money into and out of a security.
        The KO is based on the following tenets:
        Price range (i.e. High - Low) is a measure of movement and volume is the force behind 
        the movement. The sum of High + Low + Close defines a trend. Accumulation occurs when 
        today's sum is greater than the previous day's. Conversely, distribution occurs when 
        today's sum is less than the previous day's. When the sums are equal, the existing trend 
        is maintained.
        Volume produces continuous intra-day changes in price reflecting buying and selling pressure. 
        The KO quantifies the difference between the number of shares being accumulated and distributed 
        each day as "volume force". A strong, rising volume force should accompany an uptrend and then 
        gradually contract over time during the latter stages of the uptrend and the early stages of 
        the following downtrend. This should be followed by a rising volume force reflecting some 
        accumulation before a bottom develops.

    **********************************/
    var fpArray = new Array();
    var 
    bInit false;

    function 
    preMain() {
        
    setStudyTitle("Klinger Volume Oscillator");
        
    setCursorLabelName("KVO",0);
        
    setCursorLabelName("Trigger",1);    
        
    setDefaultBarFgColor(Color.red,0);
        
    setDefaultBarFgColor(Color.brown,1);
        
    addBand(0PS_SOLID1Color.black);
        var 
    0;
        
    fpArray[x] = new FunctionParameter("TrigLen"FunctionParameter.NUMBER);
        
    with(fpArray[x++]) {
            
    setLowerLimit(1);
            
    setDefault(13);
        }    
        
    fpArray[x] = new FunctionParameter("FastX"FunctionParameter.NUMBER);
        
    with(fpArray[x++]) {
            
    setLowerLimit(1);
            
    setDefault(34);
        }    
        
    fpArray[x] = new FunctionParameter("SlowX"FunctionParameter.NUMBER);
        
    with(fpArray[x++]) {
            
    setLowerLimit(1);
            
    setDefault(55);
        }    
    }

    var 
    xKVO null;
    var 
    xTrigger null;

    function 
    main(FastXSlowXTrigLen){
    var 
    nBarState getBarState();
    var 
    nKVO 0;
    var 
    nTrigger 0;
        if (
    nBarState == BARSTATE_ALLBARS) {
            if(
    FastX == nullFastX 34;
            if(
    SlowX == nullSlowX 55;
            if(
    TrigLen == nullTrigLen 13;
        }    
        if (
    bInit == false) {
            
    xKVO efsInternal("Calc_KVO"FastXSlowX);
            
    xTrigger ema(TrigLenxKVO);
            
    bInit true;
        }
        
    nKVO xKVO.getValue(0);
        
    nTrigger xTrigger.getValue(0);
        if (
    nTrigger == null) return;
        return new Array(
    nKVOnTrigger);
    }

    var 
    bSecondInit false;
    var 
    xFast null;
    var 
    xSlow null;
    var 
    xTrend null;

    function 
    Calc_KVO(FastXSlowX) {
    var 
    nRes 0;
    var 
    FXAvg 0;
    var 
    SXAvg 0;
        if (
    bSecondInit == false) {
            
    xTrend efsInternal("Calc_Trend");
            
    xFast ema(FastXxTrend);
            
    xSlow ema(SlowXxTrend);
            
    bSecondInit true;
        }
        
    FXAvg xFast.getValue(0);
        
    SXAvg xSlow.getValue(0);
        if (
    SXAvg == null) return;
        
    nRes FXAvg SXAvg;
        return 
    nRes;
    }

    var 
    xhlc3 null;

    function 
    Calc_Trend() {
    var 
    nRes 0;
        if (
    xhlc3 == nullxhlc3 hlc3();
        if (
    xhlc3.getValue(-1) == null) return;
        if(
    xhlc3.getValue(0) > xhlc3.getValue(-1))
            
    nRes 1;
        else
            
    nRes = -1;
        
    nRes volume(0) * nRes 100;
        return 
    nRes;

Working...
X