Function calculate_trange

Source
pub fn calculate_trange(df: &DataFrame) -> PolarsResult<Series>
Expand description

Calculates True Range (TRANGE) True Range is the greatest of the following:

  1. Current High - Current Low
  2. |Current High - Previous Close|
  3. |Current Low - Previous Close|

§Arguments

  • df - DataFrame containing the price data

§Returns

Returns a PolarsResult containing the True Range Series