public void addTrades() { bar.AddTrade(3.0M, 200.0M); bar.AddTrade(4.0M, 201.0M); bar.AddTrade(2.0M, 198.0M); Assert.AreEqual(3, bar.NumberOfTrades); Assert.AreEqual(bar.Amount, 3 * 200 + 4 * 201 + 2 * 198); Assert.AreEqual(bar.OpenPrice, 200); Assert.AreEqual(bar.ClosePrice, 198); Assert.AreEqual(bar.MinPrice, 198); Assert.AreEqual(bar.MaxPrice, 201); Assert.AreEqual(bar.Volume, 9); }