I\'m trying to convert the following python code which calculates ATR using EMA into C#.
def calc_atr(df, high, low, cl