def indicator_atr(df, lookback=20):
    """Creates average true range

    Args:
        df (pd.DataFrame): OHLCV intraday dataframe, only needs high, low, close
        lookback (:obj:int, optional): rolling window.  Default is 20

    Returns:
        pd.DataFrame: columns with true_range and atr

    Example:
    """
    df = df[['high', 'low', 'close']].copy()
    df['highlow'] = abs(df['high'] - df['low'])
    df['highclose'] = abs(df['high'] - df['close'].shift(1))
    df['lowclose'] = abs(df['low'] - df['close'].shift(1))
    df['true_range'] = df[['highlow', 'highclose', 'lowclose']].max(axis=1)
    df['atr'] = df['true_range'].rolling(lookback).mean()
    return df[['atr', 'true_range']]
