added if and avg formula. Updated ewma formula
Updated the refernce system for settings. Updated formulas