public void ResetsProperly() { var date = DateTime.Today; var variance = new Variance("VAR", 10); foreach (var data in TestHelper.GetTradeBarStream("spy_var.txt")) { variance.Update(date, data.Close); } Assert.IsTrue(variance.IsReady); variance.Reset(); TestHelper.AssertIndicatorIsInDefaultState(variance); }
public void Update(Security security, BaseData data) { _variance.Update(data.EndTime, data.Price - _previousPrice); _previousPrice = data.Price; }
public void Update(Security security, BaseData data) { _variance.Update(data.EndTime, data.Price); }