Please HELP!
By some reason I cannot use hhv() and llv() functions for difference between stock prices.
I have tried different combinations, but it is always takes set of values from current open price of stock and not the difference between specified stock prices.
function main() {
var h_yyy=hhv(30,(close(sym("MSFT,60"))-close(sym("INTC,60"))));
var l_yyy=llv(30,(close(sym("MSFT,60"))-close(sym("INTC,60"))));
var vUpper = hhv(30,fc());
var vLower = llv(30,h_yyy);
return new Array (fc(),h_yyy,l_yyy, vUpper );
}
function fc(){
var f1 = (close(sym("MSFT,60"))-close(sym("INTC,60")))*6;
return f1;
}
Thank you in advance for your help.
By some reason I cannot use hhv() and llv() functions for difference between stock prices.
I have tried different combinations, but it is always takes set of values from current open price of stock and not the difference between specified stock prices.
function main() {
var h_yyy=hhv(30,(close(sym("MSFT,60"))-close(sym("INTC,60"))));
var l_yyy=llv(30,(close(sym("MSFT,60"))-close(sym("INTC,60"))));
var vUpper = hhv(30,fc());
var vLower = llv(30,h_yyy);
return new Array (fc(),h_yyy,l_yyy, vUpper );
}
function fc(){
var f1 = (close(sym("MSFT,60"))-close(sym("INTC,60")))*6;
return f1;
}
Thank you in advance for your help.
Comment