public HistSim(string TickFolder, TickFileFilter tff) { _folder = TickFolder; if (tff != null) { _filter = tff; } }
public void Basics() { TickFileFilter tff = new TickFileFilter(new string[] { "GM" }); string[] result = tff.Allows(filenames); Assert.That(result.Length == 1); Assert.That(result[0] == filenames[0]); tff = new TickFileFilter(); tff.DateFilter(20070000, DateMatchType.Year); result = tff.Allows(filenames); Assert.That(result.Length == 3); Assert.That(result[2] == filenames[3]); }
public HistSim(TickFileFilter tff) : this(Util.TLTickDir, tff) { }
public HistSim(string TickFolder, TickFileFilter tff) { _folder = TickFolder; if (tff != null) _filter = tff; }
private void playbut_Click(object sender, EventArgs e) { if (!Directory.Exists(tickfolder)) { status("Tick folder " + tickfolder + " doesn't exist, stopping."); return; } highs = new Dictionary<string, decimal>(); lows = new Dictionary<string, decimal>(); TickFileFilter tff = new TickFileFilter(); tff.DateFilter(Util.ToTLDate(monthCalendar1.SelectionEnd),DateMatchType.Day|DateMatchType.Month|DateMatchType.Year); h.FileFilter = tff; _playback = new Playback(h); _playback.RunWorkerCompleted += new RunWorkerCompletedEventHandler(_playback_RunWorkerCompleted); _playback.ProgressChanged+=new ProgressChangedEventHandler(_playback_ProgressChanged); _playback.RunWorkerAsync(new PlayBackArgs((int)trackBar1.Value/5,daystartpicker.Value)); status("Playback started..."); playbut.Enabled = false; stopbut.Enabled = true; trackBar1.Enabled = false; }