상승 종목 검색
ignore 파일 추가
This commit is contained in:
50
Form1.cs
50
Form1.cs
@@ -8,10 +8,13 @@ using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
|
||||
namespace upper_limit_crawler
|
||||
{
|
||||
public partial class Form1 : Form
|
||||
{
|
||||
CPSYSDIBLib.CpSvrNew7043 m_7043 = new CPSYSDIBLib.CpSvrNew7043();
|
||||
|
||||
public Form1()
|
||||
{
|
||||
InitializeComponent();
|
||||
@@ -19,7 +22,54 @@ namespace upper_limit_crawler
|
||||
|
||||
private void btSearch_Click(object sender, EventArgs e)
|
||||
{
|
||||
m_7043.SetInputValue(0, '1');
|
||||
m_7043.SetInputValue(1, '2');
|
||||
m_7043.SetInputValue(2, '1');
|
||||
m_7043.SetInputValue(3, 41);
|
||||
m_7043.SetInputValue(4, '1');
|
||||
m_7043.SetInputValue(5, '0');
|
||||
m_7043.SetInputValue(6, '0');
|
||||
m_7043.SetInputValue(7, 0);
|
||||
m_7043.SetInputValue(8, 30);
|
||||
|
||||
int iResult = m_7043.BlockRequest2(1);
|
||||
if(iResult != 0)
|
||||
{
|
||||
MessageBox.Show("요청 에러");
|
||||
return;
|
||||
}
|
||||
|
||||
Console.WriteLine(string.Format("종목/현재가/대비플래그/대비/대비율/거래량/시가/시가대비/시가대비율/연속일"));
|
||||
|
||||
bool bContinue = true;
|
||||
while(bContinue)
|
||||
{
|
||||
int iCnt = m_7043.GetHeaderValue(0);
|
||||
for (int i = 0; i < iCnt; i++)
|
||||
{
|
||||
object Code = m_7043.GetDataValue(0, i);
|
||||
object Name = m_7043.GetDataValue(1, i);
|
||||
object CurPrice = m_7043.GetDataValue(2, i);
|
||||
object flag = m_7043.GetDataValue(3, i);
|
||||
object Comp = m_7043.GetDataValue(4, i);
|
||||
object CompRate = m_7043.GetDataValue(5, i);
|
||||
object DealAmount = m_7043.GetDataValue(6, i);
|
||||
object StartPrice = m_7043.GetDataValue(7, i);
|
||||
object StartPriceComp = m_7043.GetDataValue(8, i);
|
||||
object StartPriceCompRate = m_7043.GetDataValue(9, i);
|
||||
object SerialDay = m_7043.GetDataValue(10, i);
|
||||
|
||||
Console.WriteLine(string.Format("[{0}:{1}]/{2}/{3}/{4}/{5}/{6}/{7}/{8}/{9}/{10}",
|
||||
Name, Code,
|
||||
CurPrice, flag, Comp, CompRate,
|
||||
DealAmount, StartPrice, StartPriceComp, StartPriceCompRate,
|
||||
SerialDay));
|
||||
}
|
||||
|
||||
bContinue = (m_7043.Continue == 1);
|
||||
if (bContinue == true)
|
||||
iResult = m_7043.BlockRequest2(1);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user