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); } }
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); } }
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 ); }
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); }
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; } }