コード例 #1
0
 public bool EnterOrder(String m_BS, double m_Qty, String m_FFT)
 {
     try
     {
         OrderProfileClass m_Profile = new OrderProfileClass();
         m_Profile.Instrument = m_Instr;
         m_Profile.set_Set("ACCT", "12345");
         m_Profile.set_Set("BUYSELL", m_BS);
         m_Profile.set_Set("ORDERTYPE", "M");
         m_Profile.set_Set("ORDERQTY", m_Qty.ToString());
         m_Profile.set_Set("FFT", m_FFT);
         long myResult = m_OrderSet.SendOrder(m_Profile);
         return(true);
     }
     catch (Exception e)
     {
         return(false);
     }
 }
コード例 #2
0
        public Order EnterLimitOrder(String BS, double qty, double price, String FFT)
        {
            try
            {
                OrderProfileClass m_Profile = new OrderProfileClass();
                m_Profile.Instrument = m_Instr;
                m_Profile.set_Set("ACCT", "12345");
                m_Profile.set_Set("BUYSELL", BS);
                m_Profile.set_Set("ORDERTYPE", "L");
                m_Profile.set_Set("LIMIT", price.ToString());
                m_Profile.set_Set("ORDERQTY", qty.ToString());
                m_Profile.set_Set("FFT", FFT);
                long myResult = m_OrderSet.SendOrder(m_Profile);

                return(new Order(m_Profile.get_GetLast("SITEORDERKEY"), price));
            }
            catch (Exception e)
            {
                return(null);
            }
        }
コード例 #3
0
ファイル: Form1.cs プロジェクト: oag335/IIT_MSF576_CPRICE
 private void SendMarketOrder( String m_BS )
 {
     // Create an OrderProfileClass object to contain information about a market order.
     OrderProfileClass m_Profile = new OrderProfileClass();
     m_Profile.Instrument = m_Instr;
     m_Profile.set_Set( "ACCT", "12345" );
     m_Profile.set_Set( "BUYSELL", m_BS );
     m_Profile.set_Set( "ORDERTYPE", "M" );
     m_Profile.set_Set( "ORDERQTY", Convert.ToString( 6 ) );
     m_Profile.set_Set( "FFT3", "MKT ORDER" );
     // Send the order through m_OrderSet.
     Int64 m_Result = m_OrderSet.SendOrder( m_Profile );
 }
コード例 #4
0
ファイル: Form1.cs プロジェクト: oag335/IIT_MSF576_CPRICE
 private void SendLimitOrder( String m_BS, String m_Px )
 {
     // Send a limit order here.
     OrderProfileClass m_Profile = new OrderProfileClass();
     m_Profile.Instrument = m_Instr;
     m_Profile.set_Set("ACCT", "12345");
     m_Profile.set_Set("BUYSELL", m_BS);
     m_Profile.set_Set("ORDERTYPE", "L");
     m_Profile.set_Set("LIMIT", m_Px);
     m_Profile.set_Set("ORDERQTY", Convert.ToString(6));
     m_Profile.set_Set("FFT3", "LMT ORDER");
     Int64 m_Result = m_OrderSet.SendOrder(m_Profile);
 }
コード例 #5
0
ファイル: Instrument.cs プロジェクト: pakornavakul/HAC
 public bool EnterOrder(string m_BS, double m_Qty, string m_FFT)
 {
     try
     {
         OrderProfileClass m_Profile = new OrderProfileClass();
         m_Profile.Instrument = m_Instr;
         m_Profile.set_Set("ACCT", "12345");
         m_Profile.set_Set("BUYSELL", m_BS);
         m_Profile.set_Set("ORDERTYPE", "M");
         m_Profile.set_Set("ORDERQTY", m_Qty.ToString());
         m_Profile.set_Set("FFT", m_FFT);
         long myResult = m_OrderSet.SendOrder(m_Profile);
         return true;
     }
     catch (Exception e)
     {
         return false;
     }
 }