//@Name:Discount or Premium to NTAV //@Description:Is share trading at a discount or premium to NTAV? //@Returns:Text //@Width:120 // If NAV not yet available for current year, NAV from previous year's results will be used. function getVal(share) { var x=share.getClose(); var y=share.getResult(0,Result.TangibleBookValuePS); if (y==undefined) { y=share.getResult(-1,Result.TangibleBookValuePS); if (y==undefined) return; } if (x > y) return "Premium"; else return "Discount"; }