The following is my codes:
function preMain() {
setPriceStudy(false);
setStudyTitle("vTotvVOL");
setCursorLabelName("vTotvVOL",0);
setPlotType(PLOTTYPE_LINE,0);
setDefaultBarThickness(1,0);
}
var vVOL = 0;
var vLASTvVOL = 0;
var vTotvVOL = 0;
function main(){
var vVOL= efsInternal("sVOL");
if (getBarState() == BARSTATE_NEWBAR) {
vLASTvVOL = vTotvVOL;
}
vTotvVOL = vVOL + vLASTvVOL;
return vTotvVOL;
}
function sVOL(){
return ((volume() + volume(-1))/((hhv(2,high())-llv(2,low())) * 100));
}
what i am trying to do is to add all vVOL together, but i get response of "<none>".
I try " return vVOL" instead of vTotvVOL, and i can see the series of vVOL but when i change it back to vTotvVOL, it doesnot work.
Does this mean that i have to create a new function for adding vVOL together?
Any suggestions?
function preMain() {
setPriceStudy(false);
setStudyTitle("vTotvVOL");
setCursorLabelName("vTotvVOL",0);
setPlotType(PLOTTYPE_LINE,0);
setDefaultBarThickness(1,0);
}
var vVOL = 0;
var vLASTvVOL = 0;
var vTotvVOL = 0;
function main(){
var vVOL= efsInternal("sVOL");
if (getBarState() == BARSTATE_NEWBAR) {
vLASTvVOL = vTotvVOL;
}
vTotvVOL = vVOL + vLASTvVOL;
return vTotvVOL;
}
function sVOL(){
return ((volume() + volume(-1))/((hhv(2,high())-llv(2,low())) * 100));
}
what i am trying to do is to add all vVOL together, but i get response of "<none>".
I try " return vVOL" instead of vTotvVOL, and i can see the series of vVOL but when i change it back to vTotvVOL, it doesnot work.
Does this mean that i have to create a new function for adding vVOL together?
Any suggestions?
Comment