def DONCH_H(df, n, field = 'high'): DC_H = pd.rolling_max(df[field],n) return pd.Series(DC_H, name = 'DONCH_H' + field[0].upper() + str(n))