public void Fisher() { var indicator = new MedianPriceIndicator(_data); var fisher = new FisherIndicator(indicator); TaTestsUtils.AssertDecimalEquals(fisher.GetValue(10), 0.6448642008177138); TaTestsUtils.AssertDecimalEquals(fisher.GetValue(11), 0.8361770425706673); TaTestsUtils.AssertDecimalEquals(fisher.GetValue(12), 0.9936697984965788); TaTestsUtils.AssertDecimalEquals(fisher.GetValue(13), 0.8324807235379169); TaTestsUtils.AssertDecimalEquals(fisher.GetValue(14), 0.5026313552592737); TaTestsUtils.AssertDecimalEquals(fisher.GetValue(15), 0.06492516204615063); }
public void SetUp() { IList <Tick> ticks = new List <Tick>(); ticks.Add(GenerateTick.From(0, 0, 16, 8)); ticks.Add(GenerateTick.From(0, 0, 12, 6)); ticks.Add(GenerateTick.From(0, 0, 18, 14)); ticks.Add(GenerateTick.From(0, 0, 10, 6)); ticks.Add(GenerateTick.From(0, 0, 32, 6)); ticks.Add(GenerateTick.From(0, 0, 2, 2)); ticks.Add(GenerateTick.From(0, 0, 0, 0)); ticks.Add(GenerateTick.From(0, 0, 8, 1)); ticks.Add(GenerateTick.From(0, 0, 83, 32)); ticks.Add(GenerateTick.From(0, 0, 9, 3)); _timeSeries = GenerateTimeSeries.From(ticks); _average = new MedianPriceIndicator(_timeSeries); }
public void setUp() { List <IBar> bars = new List <IBar>(); bars.Add(new MockBar(0, 0, 16, 8)); bars.Add(new MockBar(0, 0, 12, 6)); bars.Add(new MockBar(0, 0, 18, 14)); bars.Add(new MockBar(0, 0, 10, 6)); bars.Add(new MockBar(0, 0, 32, 6)); bars.Add(new MockBar(0, 0, 2, 2)); bars.Add(new MockBar(0, 0, 0, 0)); bars.Add(new MockBar(0, 0, 8, 1)); bars.Add(new MockBar(0, 0, 83, 32)); bars.Add(new MockBar(0, 0, 9, 3)); this.timeSeries = new MockTimeSeries(bars); average = new MedianPriceIndicator(timeSeries); }