Announcement

Collapse
No announcement yet.

Kvo Cumulative

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Kvo Cumulative

    Hi Alex
    Klinger volume osc. cumulative is different then
    Klinger volume osc. I read about that KVO cumulative
    moving line cross each other few times then KVO.
    Cumulative work as a long term trend. If anybody
    know about that, Is somebody can write KVO
    cumulative into EFS. Just script not gonna help
    I do not know how to write.
    Thanks

    Bassian

  • #2
    Hi Bassian,

    Below is the code of KVO. Please let me know how I could be of a further help.

    Regards,
    Andy


    Code:
    /**********************************************
    Description	: This Study Plots Klinger Volume Oscillator
    Provided By	: TS Support, LLC for eSignal
    ***********************************************/
    
    function preMain(){
        setStudyTitle("Klinger Volume Oscillator");
        setCursorLabelName("KVO",0);
        setDefaultBarFgColor(Color.red,0);
        setDefaultBarFgColor(Color.brown,1);
        setComputeOnClose();
        addBand(0, PS_SOLID, 1, Color.black);
    }
    
    var FXAvg_1 = 0;
    var SXAvg_1 = 0;
    var Trigger_1 = 0;
    
    function main(FastX, SlowX, TrigLen, Smooth){
    	if(FastX == null)
    		FastX = 34;
    	if(SlowX == null)
    		SlowX = 55;
    	if(TrigLen == null)
    		TrigLen = 13;
    	if(Smooth == null)
    		Smooth = 1;
    	var KFastX = 2 / (FastX + 1), KSlowX = 2 / (SlowX + 1), KTrig = 2 / (TrigLen + 1);
        	
    	if(high() + low() + close() > high(-1) + low(-1) + close(-1))
    		Trend = 1;
    	else
    		Trend = -1;
    	
    	VForce = volume() * Trend * 100;
    		
    	FXAvg = KFastX * VForce  + (1 - KFastX) * FXAvg_1;
    	SXAvg = KSlowX * VForce  + (1 - KSlowX) * SXAvg_1;
    	
        	
    	KVO = FXAvg - SXAvg;
    	Trigger = KTrig * KVO  + (1 - KTrig) * Trigger_1;
    	
        	if (getBarState() == BARSTATE_NEWBAR){
        		FXAvg_1 = FXAvg;
        		SXAvg_1	= SXAvg;
        		Trigger_1 = Trigger;
        	}
        		
    	return new Array(KVO,Trigger);
    }
    Attached Files

    Comment


    • #3
      KVO

      Hi Andy

      Thanks very much

      Comment

      Working...
      X