Exemplo n.º 1
0
        private void InitParams()
        {
            var first = Ticks.First();
            var last  = Ticks.Last();

            //var period = (last.Time - first.Time);
            //if (period.Seconds != 0 || (int)period.TotalMinutes != PeriodMins)
            //	throw new Exception("Ticks are not coordinated with period");

            Open  = first.Value;
            Close = last.Value;
            High  = 0;
            Low   = int.MaxValue;

            foreach (var tick in Ticks)
            {
                if (tick.Value > High)
                {
                    High = tick.Value;
                }
                if (tick.Value < Low)
                {
                    Low = tick.Value;
                }
            }
        }