US CCP2 updated version

works with min/max values, has a better moving average and uses
realtimer