EHN max and min for signal

create max and min similar to mean