Esempio n. 1
0
        static void testMM2()
        {
            AMarket   mkt = AMarket.GetInstance(MarketVendor.Exchange);
            ASecurity s   = mkt.GetOption("90000229", new ETF("510050", Exchange.SHE));

            AOptionMakeMarket mm = new OptionMakeMarket1();

            mm.AddOptions(s);
            mm.Run();
        }
Esempio n. 2
0
        private void btnRunMM_Click(object sender, EventArgs e)
        {
            foreach (string code in checkedListBoxUnderlying.CheckedItems)
            {
                ASecurity s = null;
                if (htUnderlyings.Contains(code))
                {
                    s = (ASecurity)htUnderlyings[code];
                }

                AOptionMakeMarket omm = new OptionMakeMarket1();
                omm.AddOptions(s);
                MMRunDelegate dlg = new MMRunDelegate(omm.Run);
                dlg.BeginInvoke(null, null);
                htmarketmakers.Add(s.code, omm);
            }

            //消息列表
            isMMruning = true;
            Thread thread = new Thread(readMsg);

            thread.IsBackground = true;
            thread.Start();
        }