Пример #1
0
        private void FillTestData()
        {
            Random r = new Random();

            for (int i = 0; i < 10; i++)
            {
                Quotation.Add(new Quotation()
                {
                    Id           = i,
                    Close        = (float)(i * r.NextDouble()),
                    Date         = DateTime.Now,
                    High         = (float)(i * r.NextDouble()),
                    Low          = (float)(i * r.NextDouble()),
                    Name         = $"Q_{i}",
                    Open         = (float)(i * r.NextDouble()),
                    Volume       = 10 * i * (int)Math.Round(r.NextDouble()),
                    InstrumentId = i + 1,
                    Difference   = 25
                });
            }
        }