Can anyone tell me why this doesn’t return the high-low? It currently returns nothing? If I make xADR=vHigh I get the high displayed. If I make xADR=vLow the low is displated. But if I do vHigh-vLow I get nothing!
function main(Length,Source,Symbol,Interval,Upper,Lower,Par ams) {
if(bInit == false){
if(Symbol == null) Symbol = getSymbol();
if(Interval == null) Interval = getInterval();
var vSymbol = Symbol+","+Interval;
var vHigh = high(vSymbol);
var vLow = low(vSymbol);
xADR = vHigh-vLow;
setShowTitleParameters(eval(Params));
bInit = true;
}
return getSeries(xADR);
}
Any ideas?
I'm trying to work out the daily range i.e. each day's high-low and then I want to work out a moving average of that range. Please help!!
function main(Length,Source,Symbol,Interval,Upper,Lower,Par ams) {
if(bInit == false){
if(Symbol == null) Symbol = getSymbol();
if(Interval == null) Interval = getInterval();
var vSymbol = Symbol+","+Interval;
var vHigh = high(vSymbol);
var vLow = low(vSymbol);
xADR = vHigh-vLow;
setShowTitleParameters(eval(Params));
bInit = true;
}
return getSeries(xADR);
}
Any ideas?
I'm trying to work out the daily range i.e. each day's high-low and then I want to work out a moving average of that range. Please help!!
Comment