public void Indicators_Lowest_Low_For_Period_Of_Ten() { IEnumerable <double> lowest = Lowest.LowCollection(MakeBars(), 10); Assert.AreEqual(10, lowest.Count()); foreach (double item in lowest) { Assert.AreEqual(137900, item); } }
public void Indicators_Lowest_Low_For_Period_Of_Five() { IEnumerable <double> lowest = Lowest.LowCollection(MakeBars(), 5); Assert.AreEqual(10, lowest.Count()); Assert.AreEqual(139455, lowest.ElementAt(9)); Assert.AreEqual(139455, lowest.ElementAt(8)); Assert.AreEqual(139455, lowest.ElementAt(7)); Assert.AreEqual(139455, lowest.ElementAt(6)); Assert.AreEqual(139455, lowest.ElementAt(5)); Assert.AreEqual(137900, lowest.ElementAt(4)); Assert.AreEqual(137900, lowest.ElementAt(3)); Assert.AreEqual(137900, lowest.ElementAt(2)); Assert.AreEqual(137900, lowest.ElementAt(1)); Assert.AreEqual(137900, lowest.ElementAt(0)); }