Beispiel #1
0
 public static extern int SKQuoteLib_GetBest5(int sMarketNo, int sStockidx, out BEST5 Best5);
Beispiel #2
0
        private void InsertBest5(BEST5 Best5)
        {
            if (m_dtBest5Ask.Rows.Count == 0 && m_dtBest5Bid.Rows.Count == 0)
            {
                DataRow myDataRow;

                myDataRow = m_dtBest5Ask.NewRow();
                myDataRow["m_nAskQty"] = Best5.m_nAskQty1;
                myDataRow["m_nAsk"]    = Best5.m_nAsk1 / 100.00;
                m_dtBest5Ask.Rows.Add(myDataRow);

                myDataRow = m_dtBest5Ask.NewRow();
                myDataRow["m_nAskQty"] = Best5.m_nAskQty2;
                myDataRow["m_nAsk"]    = Best5.m_nAsk2 / 100.00;
                m_dtBest5Ask.Rows.Add(myDataRow);

                myDataRow = m_dtBest5Ask.NewRow();
                myDataRow["m_nAskQty"] = Best5.m_nAskQty3;
                myDataRow["m_nAsk"]    = Best5.m_nAsk3 / 100.00;
                m_dtBest5Ask.Rows.Add(myDataRow);

                myDataRow = m_dtBest5Ask.NewRow();
                myDataRow["m_nAskQty"] = Best5.m_nAskQty4;
                myDataRow["m_nAsk"]    = Best5.m_nAsk4 / 100.00;
                m_dtBest5Ask.Rows.Add(myDataRow);

                myDataRow = m_dtBest5Ask.NewRow();
                myDataRow["m_nAskQty"] = Best5.m_nAskQty5;
                myDataRow["m_nAsk"]    = Best5.m_nAsk5 / 100.00;
                m_dtBest5Ask.Rows.Add(myDataRow);



                myDataRow = m_dtBest5Bid.NewRow();
                myDataRow["m_nAskQty"] = Best5.m_nBidQty1;
                myDataRow["m_nAsk"]    = Best5.m_nBid1 / 100.00;
                m_dtBest5Bid.Rows.Add(myDataRow);

                myDataRow = m_dtBest5Bid.NewRow();
                myDataRow["m_nAskQty"] = Best5.m_nBidQty2;
                myDataRow["m_nAsk"]    = Best5.m_nBid2 / 100.00;
                m_dtBest5Bid.Rows.Add(myDataRow);

                myDataRow = m_dtBest5Bid.NewRow();
                myDataRow["m_nAskQty"] = Best5.m_nBidQty3;
                myDataRow["m_nAsk"]    = Best5.m_nBid3 / 100.00;
                m_dtBest5Bid.Rows.Add(myDataRow);

                myDataRow = m_dtBest5Bid.NewRow();
                myDataRow["m_nAskQty"] = Best5.m_nBidQty4;
                myDataRow["m_nAsk"]    = Best5.m_nBid4 / 100.00;
                m_dtBest5Bid.Rows.Add(myDataRow);

                myDataRow = m_dtBest5Bid.NewRow();
                myDataRow["m_nAskQty"] = Best5.m_nBidQty5;
                myDataRow["m_nAsk"]    = Best5.m_nBid5 / 100.00;
                m_dtBest5Bid.Rows.Add(myDataRow);
            }
            else
            {
                m_dtBest5Ask.Rows[0]["m_nAskQty"] = Best5.m_nAskQty1;
                m_dtBest5Ask.Rows[0]["m_nAsk"]    = Best5.m_nAsk1 / 100.00;

                m_dtBest5Ask.Rows[1]["m_nAskQty"] = Best5.m_nAskQty2;
                m_dtBest5Ask.Rows[1]["m_nAsk"]    = Best5.m_nAsk2 / 100.00;

                m_dtBest5Ask.Rows[2]["m_nAskQty"] = Best5.m_nAskQty3;
                m_dtBest5Ask.Rows[2]["m_nAsk"]    = Best5.m_nAsk3 / 100.00;

                m_dtBest5Ask.Rows[3]["m_nAskQty"] = Best5.m_nAskQty4;
                m_dtBest5Ask.Rows[3]["m_nAsk"]    = Best5.m_nAsk4 / 100.00;

                m_dtBest5Ask.Rows[4]["m_nAskQty"] = Best5.m_nAskQty5;
                m_dtBest5Ask.Rows[4]["m_nAsk"]    = Best5.m_nAsk5 / 100.00;


                m_dtBest5Bid.Rows[0]["m_nAskQty"] = Best5.m_nBidQty1;
                m_dtBest5Bid.Rows[0]["m_nAsk"]    = Best5.m_nBid1 / 100.00;

                m_dtBest5Bid.Rows[1]["m_nAskQty"] = Best5.m_nBidQty2;
                m_dtBest5Bid.Rows[1]["m_nAsk"]    = Best5.m_nBid2 / 100.00;

                m_dtBest5Bid.Rows[2]["m_nAskQty"] = Best5.m_nBidQty3;
                m_dtBest5Bid.Rows[2]["m_nAsk"]    = Best5.m_nBid3 / 100.00;

                m_dtBest5Bid.Rows[3]["m_nAskQty"] = Best5.m_nBidQty4;
                m_dtBest5Bid.Rows[3]["m_nAsk"]    = Best5.m_nBid4 / 100.00;

                m_dtBest5Bid.Rows[4]["m_nAskQty"] = Best5.m_nBidQty5;
                m_dtBest5Bid.Rows[4]["m_nAsk"]    = Best5.m_nBid5 / 100.00;
            }
        }
 public void OnNotifyBest5(BEST5 bfi)
 {
     m_best5 = bfi;
 }
Beispiel #4
0
 public static extern int SKQuoteLib_GetBest5(int sMarketNo, int sStockidx, out BEST5 Best5);
Beispiel #5
0
        private void InsertBest5(BEST5 Best5)
        {
            if (m_dtBest5Ask.Rows.Count == 0 &&  m_dtBest5Bid.Rows.Count == 0)
            {
                DataRow myDataRow;

                myDataRow = m_dtBest5Ask.NewRow();
                myDataRow["m_nAskQty"]  = Best5.m_nAskQty1;
                myDataRow["m_nAsk"]     = Best5.m_nAsk1/ 100.00;
                m_dtBest5Ask.Rows.Add(myDataRow);

                myDataRow = m_dtBest5Ask.NewRow();
                myDataRow["m_nAskQty"]  = Best5.m_nAskQty2;
                myDataRow["m_nAsk"]     = Best5.m_nAsk2/ 100.00;
                m_dtBest5Ask.Rows.Add(myDataRow);

                myDataRow = m_dtBest5Ask.NewRow();
                myDataRow["m_nAskQty"]  = Best5.m_nAskQty3;
                myDataRow["m_nAsk"] =    Best5.m_nAsk3/ 100.00;
                m_dtBest5Ask.Rows.Add(myDataRow);

                myDataRow = m_dtBest5Ask.NewRow();
                myDataRow["m_nAskQty"]  = Best5.m_nAskQty4;
                myDataRow["m_nAsk"]     = Best5.m_nAsk4/ 100.00;
                m_dtBest5Ask.Rows.Add(myDataRow);

                myDataRow = m_dtBest5Ask.NewRow();
                myDataRow["m_nAskQty"]  = Best5.m_nAskQty5;
                myDataRow["m_nAsk"]     = Best5.m_nAsk5/ 100.00;
                m_dtBest5Ask.Rows.Add(myDataRow);



                myDataRow = m_dtBest5Bid.NewRow();
                myDataRow["m_nAskQty"] = Best5.m_nBidQty1;
                myDataRow["m_nAsk"] = Best5.m_nBid1 / 100.00;
                m_dtBest5Bid.Rows.Add(myDataRow);

                myDataRow = m_dtBest5Bid.NewRow();
                myDataRow["m_nAskQty"] = Best5.m_nBidQty2;
                myDataRow["m_nAsk"] = Best5.m_nBid2 / 100.00;
                m_dtBest5Bid.Rows.Add(myDataRow);

                myDataRow = m_dtBest5Bid.NewRow();
                myDataRow["m_nAskQty"] = Best5.m_nBidQty3;
                myDataRow["m_nAsk"] = Best5.m_nBid3 / 100.00;
                m_dtBest5Bid.Rows.Add(myDataRow);

                myDataRow = m_dtBest5Bid.NewRow();
                myDataRow["m_nAskQty"] = Best5.m_nBidQty4;
                myDataRow["m_nAsk"] = Best5.m_nBid4 / 100.00;
                m_dtBest5Bid.Rows.Add(myDataRow);

                myDataRow = m_dtBest5Bid.NewRow();
                myDataRow["m_nAskQty"] = Best5.m_nBidQty5;
                myDataRow["m_nAsk"] = Best5.m_nBid5 / 100.00;
                m_dtBest5Bid.Rows.Add(myDataRow);

            }
            else
            {
                m_dtBest5Ask.Rows[0]["m_nAskQty"]   = Best5.m_nAskQty1;
                m_dtBest5Ask.Rows[0]["m_nAsk"]      = Best5.m_nAsk1/ 100.00;

                m_dtBest5Ask.Rows[1]["m_nAskQty"]   = Best5.m_nAskQty2;
                m_dtBest5Ask.Rows[1]["m_nAsk"]      = Best5.m_nAsk2/ 100.00;
                
                m_dtBest5Ask.Rows[2]["m_nAskQty"]   = Best5.m_nAskQty3;
                m_dtBest5Ask.Rows[2]["m_nAsk"]      = Best5.m_nAsk3/ 100.00;
                
                m_dtBest5Ask.Rows[3]["m_nAskQty"]   = Best5.m_nAskQty4;
                m_dtBest5Ask.Rows[3]["m_nAsk"]      = Best5.m_nAsk4/ 100.00;
                
                m_dtBest5Ask.Rows[4]["m_nAskQty"]   = Best5.m_nAskQty5;
                m_dtBest5Ask.Rows[4]["m_nAsk"]      = Best5.m_nAsk5/ 100.00;


                m_dtBest5Bid.Rows[0]["m_nAskQty"]   = Best5.m_nBidQty1;
                m_dtBest5Bid.Rows[0]["m_nAsk"]      = Best5.m_nBid1 / 100.00;

                m_dtBest5Bid.Rows[1]["m_nAskQty"]   = Best5.m_nBidQty2;
                m_dtBest5Bid.Rows[1]["m_nAsk"]      = Best5.m_nBid2 / 100.00;

                m_dtBest5Bid.Rows[2]["m_nAskQty"]   = Best5.m_nBidQty3;
                m_dtBest5Bid.Rows[2]["m_nAsk"]      = Best5.m_nBid3 / 100.00;

                m_dtBest5Bid.Rows[3]["m_nAskQty"]   = Best5.m_nBidQty4;
                m_dtBest5Bid.Rows[3]["m_nAsk"]      = Best5.m_nBid4 / 100.00;

                m_dtBest5Bid.Rows[4]["m_nAskQty"]   = Best5.m_nBidQty5;
                m_dtBest5Bid.Rows[4]["m_nAsk"]      = Best5.m_nBid5 / 100.00;
            }
        }