public void Calculate_CorrectInput__CalculatesCorrectly(float[] highs, float[] lows, int period, float[] expectedH, float[] expectedL) { HLChannelData res = HLChannel.Calculate(highs, lows, period); res.H.ShouldBe(expectedH); res.L.ShouldBe(expectedL); }
private void TestForEmptyList(float[] highs, float[] lows, int period) { HLChannelData res = HLChannel.Calculate(highs, lows, period); res.H.Length.ShouldBe(0); res.L.Length.ShouldBe(0); }
public override void Calculate(StockPricesData data) { HLChannelData res = HLChannel.Calculate(data.H, data.L, _statParams.Get(StatHLChannelParams.Period).As <int>()); _data[StatHLChannelData.H] = res.H; _data[StatHLChannelData.L] = res.L; }