added epsilon option to calc sma 2