Ejemplo n.º 1
0
        public void IndexTest()
        {
            IndexBox ibox  = new IndexBox();
            int      highs = 0;

            for (int i = 0; i < futures.Length; i++)
            {
                // send futures update
                ibox.NewIndex(futures[i]);
                // trade the box
                ibox.Trade(timesales[i], new BarList(), new Position(s), new BoxInfo());
                if (ibox.athigh)
                {
                    highs++;
                }
            }
            Assert.That(highs == 3);
            Assert.That(ibox.indexticks == 4);
        }
Ejemplo n.º 2
0
 public void IndexTest()
 {
     IndexBox ibox = new IndexBox();
     int highs = 0;
     for (int i = 0; i < futures.Length; i++)
     {
         // send futures update
         ibox.NewIndex(futures[i]);
         // trade the box
         ibox.Trade(timesales[i], new BarList(), new Position(s), new BoxInfo());
         if (ibox.athigh) highs++;
     }
     Assert.That(highs == 3);
     Assert.That(ibox.indexticks == 4);
 }