This is what I had to do to create a series for high(0) - close(0) and close(0) - low(0):
My question is why doesn't the following work:
PHP Code:
var diff1 =0;
var diff2 =0;
if(xInit==false){
xDiff1 = efsInternal( "fDiff", close(), low() );
xDiff2 = efsInternal( "fDiff", high(), close() );
xInit=true;
} // xInit
return new Array( xDiff1.getValue(0) , xDiff2.getValue(0) )
function fDiff( x , y) {
return( eval(x.getValue(0) - y.getValue(0) ) );
}
My question is why doesn't the following work:
PHP Code:
var diff1 =0;
var diff2 =0;
if(xInit==false){
xDiff1 = close() - low() ;
xDiff2 = high() - close() ;
xInit=true;
} // xInit
return new Array( xDiff1.getValue(0) , xDiff2.getValue(0) )
Comment