If you take the Builtin "Volume MA" EFS
function main(nInputLength) {
if(nInputLength == null)
nInputLength = 10;
var nLength = nInputLength;
var i;
var vSum = 0.0;
var vValue;
vValue = volume(0, -nLength);
if(vValue == null) {
return;
}
for(i = 0; i < nLength; i++) {
vSum += vValue[i];
}
return (vSum / nLength);
How would you add "addband" to this formula. I like to place 1 or 2 mental guide lines on the study so it gives me a good idea of how things are doing.
function main(nInputLength) {
if(nInputLength == null)
nInputLength = 10;
var nLength = nInputLength;
var i;
var vSum = 0.0;
var vValue;
vValue = volume(0, -nLength);
if(vValue == null) {
return;
}
for(i = 0; i < nLength; i++) {
vSum += vValue[i];
}
return (vSum / nLength);
How would you add "addband" to this formula. I like to place 1 or 2 mental guide lines on the study so it gives me a good idea of how things are doing.
Comment