I am modifying the script below but on studying it I am confused about the statement: vVol = volume();
volume() as I understand it is a series object but the variable it is being assigned to was defined as a single value object. Is this line somehow equivalent to vVol = volume(0); ?
Did the assign statement convert it?
Mike
/************************************************** ***************
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;
}
volume() as I understand it is a series object but the variable it is being assigned to was defined as a single value object. Is this line somehow equivalent to vVol = volume(0); ?
Did the assign statement convert it?
Mike
/************************************************** ***************
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;
}
Comment