Пример #1
0
 /// <summary>
 /// converts EPF files to tick files in current directory
 /// </summary>
 /// <param name="args"></param>
 public static void Epf2Tik(string[] args)
 {
     // get a list of epf files
     foreach (string file in args)
     {
         SecurityImpl sec = SecurityImpl.FromTik(file);
         sec.HistSource.GotTick += HistSource_gotTick;
         _tw = new TikWriter(sec.Name);
         while (sec.NextTick())
         {
             _tw.Close();
         }
     }
 }
Пример #2
0
        // fill cache for multi-core
        private void simworker_DoWork(object sender, DoWorkEventArgs e)
        {
            IsWorking    = true;
            _lastworking = true;
            int readahead = (int)e.Argument;

            // while simulation hasn't been canceled, we still have historical ticks to read and we
            // haven't read too many, cache a tick
            while (!e.Cancel && Workersec.NextTick() &&
                   (_readcount++ < readahead))
            {
                ;
            }
        }