/**
 * True range calculation
 */ export function getTrueRange ( high , low , prevClose ) { if ( prevClose ) { const hl = high - low ; const hc = high > prevClose ? high - prevClose : prevClose - high ; const lc = low > prevClose ? low - prevClose : prevClose - low ; if ( hl >= hc && hl >= lc ) { return hl ; } if ( hc >= hl && hc >= lc ) { return hc ; } return lc ; } return null ; }