Exemplo n.º 1
0
        public async Task Ema_MA_Success()
        {
            // Arrange
            var loggerMock = Mock.Of <ILogger <CsvLoader> >();
            var parser     = new CsvLoader(loggerMock);
            var fileH1     = Path.Combine(Directory.GetCurrentDirectory(), "RTS-12.20_H1.csv");
            var bars       = await parser.LoadBars(fileH1);

            var chartManager = new ChartManager(bars);

            chartManager.Finish();
            var ema = new MovingAverage(chartManager.Chart, 50);

            // Act
            var emaValues = ema.EmaValue();


            // Assert
            bars.Should().NotBeEmpty();
            bars.Should().HaveCount(863);
        }