Exemplo n.º 1
0
        public void BarStreamTest()
        {
            IBarDatum datum = CreateFirstBar();

            barDatumEntries.Add(datum);

            Assert.IsTrue(barDatumEntries.Count == 1);

            moveManager.Insert(datum);

            moveManager.BarStream.Subscribe(b => BarIsValid(b));
        }
Exemplo n.º 2
0
        public void WaveTest()
        {
            InitializeMoves();

            IBarDatum lastTrendBar = moves.Last().End;

            List <IBar> testBar = BarMocks.DownMove(1, lastTrendBar.High - 5);

            List <IBarDatum> testDatum = testBar.ToBarDatum().ToList();

            bars.ForEach(b => moveManager.Insert(b));

            var ir = moveManager.Highs.Where(b => b.High < testDatum.First().Low)
                     .Select(b => b.High).ToList();

            var lowBarQuery = moveManager.Lows.Where(b => b.Low < testDatum.First().Low)
                              .Select(b => b.Low).ToList();

            ir.AddRange(lowBarQuery);

            Assert.IsTrue(ir.Count == 2);
        }