File Name: CumVolume.efs

Description:
Tracks the cumulative volume based on the advance chart’s time template.

Formula Parameters:
None.

Notes:
Here's another version of this formula that includes a DDE link, CumVolumeDDE.efs

Download File:
CumVolume.efs




EFS Code:
PHP Code:
/***********************************
Provided By : eSignal. (c) Copyright 2004
***********************************/

function preMain() {
    
setStudyTitle("Cumulative Volume ");
    
setCursorLabelName("CumVol");
    
setPlotType(PLOTTYPE_HISTOGRAM);
    
setDefaultBarThickness(3);
}

var 
vVol 0;
var 
vLastVol 0;
var 
TotVol 0;

function 
main() {
    if (
getBarState() == BARSTATE_NEWBAR) {
        if (
getDay(0) != getDay(-1)) TotVol 0;
        
vLastVol 0;
    } else {
        
vLastVol vVol;
    }
    
    
vVol volume();    
    
TotVol += (vVol vLastVol);
    
    return 
TotVol;