Hello,
Maybe anyone could help me with this one.
I'm using a formula to calculate relatieve strenght, and display it in a watchlist.
With nLenght up to 10 it's works fine, but any bigger value doesn't give any output (just green dots)
Any help would be welcome
Regards
function rs( nLenght ) {
var nRS = 0;
var nRoC = 0;
var nRoCRef = 0;
var len = -(nLenght-1);
nRoC = (close(0)-close(len))/close(len);
nRoCRef = (close(0,sym("SPY"))-close(len,sym("SPY")))/close(len,sym("SPY"));
nRS = (nRoC-nRoCRef)*100;
return nRS;
}
Maybe anyone could help me with this one.
I'm using a formula to calculate relatieve strenght, and display it in a watchlist.
With nLenght up to 10 it's works fine, but any bigger value doesn't give any output (just green dots)
Any help would be welcome
Regards
function rs( nLenght ) {
var nRS = 0;
var nRoC = 0;
var nRoCRef = 0;
var len = -(nLenght-1);
nRoC = (close(0)-close(len))/close(len);
nRoCRef = (close(0,sym("SPY"))-close(len,sym("SPY")))/close(len,sym("SPY"));
nRS = (nRoC-nRoCRef)*100;
return nRS;
}
Comment