Hello,
I've defined two variables, one is calculated and plots fine as a non-price study. The other is supposed to be an ema of the series and it also plots but it is not scaled correctly.
How can I correct this?
Also, I've got bbs and ema script in the preMAin()
Thanks!
// this part is in the pre main.
var vVSI = null;
var vEma = null;
}
function main() {
//returns the series for VSI
vVSI = (ema(6) - lowerBB(20,2)) - (upperBB(20,2) - ema(6));
vEma = ema(6, vVSI);
return new Array (vVSI, vEma);
}
I've defined two variables, one is calculated and plots fine as a non-price study. The other is supposed to be an ema of the series and it also plots but it is not scaled correctly.
How can I correct this?
Also, I've got bbs and ema script in the preMAin()
Thanks!
// this part is in the pre main.
var vVSI = null;
var vEma = null;
}
function main() {
//returns the series for VSI
vVSI = (ema(6) - lowerBB(20,2)) - (upperBB(20,2) - ema(6));
vEma = ema(6, vVSI);
return new Array (vVSI, vEma);
}
Comment