private void button1_Click(object sender, EventArgs e) { listView1.Items.Clear(); pocetPod05 = 0; pocet05az1 = 0; pocet1az15 = 0; pocet15az25 = 0; pocetnad25 = 0; pocetPod05perc = 0; pocet05az1perc = 0; pocet1az15perc = 0; pocet15az25perc = 0; pocetnad25perc = 0; Jadro jadro = new Jadro(IEXTrading_API_URL, Token); List <HistoryStockPrice> res = jadro.GetPiatkoveCeny(textBox1.Text, checkBox1.Checked, int.Parse(textBox3.Text)); Statistics stats = jadro.GetStatistics(res, listView1); textBox2.Text = string.Empty; textBox2.Text = "Pocet pod 0.5 - " + stats.PocetPod05 + Environment.NewLine + "Pocet medzi 0.5 - 1.0 - " + stats.Pocet05Az1 + Environment.NewLine + "Pocet medzi 1 - 1.5 - " + stats.Pocet1Az15 + Environment.NewLine + "Pocet medzi 1.5 - 2.5 - " + stats.Pocet15Az25 + Environment.NewLine + "Pocet nad 2.5 - " + stats.Pocetnad25 + Environment.NewLine + " ================================ " + Environment.NewLine + "Pocet pod 0.5 % - " + stats.PocetPod05Perc + Environment.NewLine + "Pocet medzi 0.5 - 1.0 % - " + stats.Pocet05Az1Perc + Environment.NewLine + "Pocet medzi 1 - 1.5 % - " + stats.Pocet1Az15Perc + Environment.NewLine + "Pocet medzi 1.5 - 2.5 % - " + stats.Pocet15Az25Perc + Environment.NewLine + "Pocet nad 2.5 % - " + stats.Pocetnad25Perc; }
private string GetDenneLimity(System.DayOfWeek day) { Jadro jadro = new Jadro(IEXTrading_API_URL, Token); List <HistoryStockPrice> res = jadro.GetPiatkoveCeny(textBox1.Text, checkBox1.Checked, int.Parse(textBox3.Text), day); Statistics stats = jadro.GetStatistics(res); var result = string.Empty; result = //"Pocet pod 0.5 - " + stats.PocetPod05 + Environment.NewLine + //"Pocet medzi 0.5 - 1.0 - " + stats.Pocet05Az1 + Environment.NewLine + //"Pocet medzi 1 - 1.5 - " + stats.Pocet1Az15 + Environment.NewLine + //"Pocet medzi 1.5 - 2.5 - " + stats.Pocet15Az25 + Environment.NewLine + //"Pocet nad 2.5 - " + stats.Pocetnad25 + Environment.NewLine + " ----------------------- " + Environment.NewLine + "Pocet pod 0.5 % - " + stats.PocetPod05Perc + Environment.NewLine + "Pocet medzi 0.5 - 1.0 % - " + stats.Pocet05Az1Perc + Environment.NewLine + "Pocet medzi 1 - 1.5 % - " + stats.Pocet1Az15Perc + Environment.NewLine + "Pocet medzi 1.5 - 2.5 % - " + stats.Pocet15Az25Perc + Environment.NewLine + "Pocet nad 2.5 % - " + stats.Pocetnad25Perc; return(result); }
private void button2_Click(object sender, EventArgs e) { InitColumnCompletScan(); Jadro jadro = new Jadro(IEXTrading_API_URL, Token); var symbols = File.ReadAllLines("SP500.txt"); //jadro.LoadSymbols(); foreach (var symbol in symbols) { if (!symbol.Contains("-")) { List <HistoryStockPrice> res = jadro.GetPiatkoveCeny(symbol, checkBox1.Checked, int.Parse(textBox3.Text)); Statistics stats = jadro.GetStatistics(res); string[] row = { symbol, stats.Cena.ToString("F"), stats.PocetPod05Perc.ToString(), stats.Pocet05Az1Perc.ToString(), stats.Pocet1Az15Perc.ToString(), stats.Pocet15Az25Perc.ToString(), stats.Pocetnad25Perc.ToString() }; var listViewItem = new ListViewItem(row); listView1.Items.Add(listViewItem); listView1.Refresh(); Thread.Sleep(1100); } } MessageBox.Show("Koniec"); }