Re: [Quickfix-developers] Just Starting...
Brought to you by:
orenmnero
From: McAndrew, P. <pa...@no...> - 2008-01-16 21:17:23
|
You should start with the executor project. Review the code, set up a = config file with your connections and see if you can connect. You can = go to the Open Fix testing website to see if you can connect and = practice sending different types of orders. Below is my config file = code: =20 [DEFAULT] ConnectionType=3Dinitiator ReconnectInterval=3D30 FileStorePath=3DC:\QuickFix\Log FileLogPath=3DC:\QuickFix\Log [SESSION] BeginString=3DFIX.4.2 TargetCompID=3DTarget HeartBtInt=3D45 LogonTimeout=3D60 SenderCompID=3DSender SocketConnectPort=3D1234 SocketConnectHost=3D198.63.227.24 StartTime=3D00:00:00 EndTime=3D23:59:00 DataDictionary=3DC:\\quickfix\spec\FIX42.xml CheckLatency=3DN ResetOnLogout=3DN ResetOnDisconnect=3DN SendResetSeqNumFlag=3DY RefreshOnLogon=3DY =20 [SESSION] BeginString=3DFIX.4.2 TargetCompID=3DTarget1 HeartBtInt=3D45 LogonTimeout=3D60 SenderCompID=3DSender SocketConnectPort=3D1234 SocketConnectHost=3D66.150.110.105 StartDay=3Dsun StartTime=3D00:01:00 EndDay=3Dsat EndTime=3D23:59:00 DataDictionary=3DC:\quickfix\spec\FIX42.xml ValidateUserDefinedFields=3DN ValidateFieldsHaveValues=3DN=20 CheckLatency=3DN ResetOnLogout=3DN ResetOnDisconnect=3DN SendResetSeqNumFlag=3DY RefreshOnLogon=3DY =20 [SESSION] BeginString=3DFIX.4.2 TargetCompID=3DTarget2 HeartBtInt=3D45 LogonTimeout=3D60 SenderCompID=3DSender SocketConnectPort=3D1234 SocketConnectHost=3D66.150.110.105 StartDay=3Dsun StartTime=3D00:01:00 EndDay=3Dsat EndTime=3D23:59:00 DataDictionary=3DC:\quickfix\spec\FIX42.xml ValidateUserDefinedFields=3DN ValidateFieldsHaveValues=3DN=20 CheckLatency=3DN ResetOnLogout=3DN ResetOnDisconnect=3DN SendResetSeqNumFlag=3DY RefreshOnLogon=3DY =20 Here is the code for the executor login to begin heartbeating with the = connection you set up. This is the debug version so it's called from a = form. The live version runs as a service: =20 public void Login() { try { int index =3D new int(); index =3D 1; =20 if (!System.Diagnostics.EventLog.SourceExists("NewSource"))=20 {=20 System.Diagnostics.EventLog.CreateEventSource( "NewSource","EC_Log"); } else { //mEC_Log.Clear(); } mEC_Log.Source =3D "NewSource"; mEC_Log.Log =3D "EC_Log"; mEC_Log.Clear(); mEC_Log.WriteEntry("ElectronicClerk"); ElectronicClerk ec =3D new ElectronicClerk(); //System.Threading.AutoResetEvent autoEvent =3D new = System.Threading.AutoResetEvent(false); // Create a timer that signals the delegate to invoke=20 // ProcessOrders after one second, and every 1/4 second=20 // thereafter. TimerCallback timerDelegate =3D=20 new TimerCallback(ProcessOrders); // create timer and attach our method delegate to it mtmEC =3D=20 new Timer(timerDelegate, null, 1000, 250); =20 string path =3D System.IO.Path.GetDirectoryName(=20 System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase ); path =3D path.Substring(6, path.Length - 6); System.Diagnostics.Debug.WriteLine(path); SessionSettings settings =3D new SessionSettings(path.ToString() + = "\\QuickFix_Test_ALL.cfg"); FIX_ElectronicClerk.Application application =3D new = FIX_ElectronicClerk.Application(); FileStoreFactory factory =3D new FileStoreFactory(settings); FileLogFactory logFactory =3D new FileLogFactory(settings); System.Diagnostics.Debug.WriteLine(settings); MessageFactory messageFactory =3D new DefaultMessageFactory(); m_initiator =3D new SocketInitiator(application, factory, settings, = logFactory, messageFactory); //try //{ //Conn.ConnectionString=3D settings.ToString(); m_initiator.start(); // Write an informational entry to the event log.=20 //} } catch (Exception e) { mEC_Log.WriteEntry(e.ToString()); mtmEC.Dispose(); } } =20 =20 =20 =20 ________________________________ From: qui...@li... on behalf of = azmat Sent: Wed 1/16/2008 12:40 PM To: qui...@li... Subject: Re: [Quickfix-developers] Just Starting... QuickFIX Documentation: = http://www.quickfixengine.org/quickfix/doc/html/index.html QuickFIX Support: http://www.quickfixengine.org/services.html All- In my efforts to learn and use QF at my firm, I plan to share my journey with everyone here -- well mostly for the future newcomers who will need = a place to start. Yesterday I downloaded the source code ( quickfix-1.12.4.zip) and built the solution for VS2005, and followed the Installation instructions (http://www.quickfixengine.org/quickfix/doc/html/index.html).=20 I can now view all of the class files in C++ and C#, but am unsure where = to go from here. I tried running some of the examples (ordermatch, tradeclient, etc), but that doesn't seem to work. I would like to = create a QFServer and a QFClient on my machine to simulate orders/transactions between the two projects -- but not before these samples get working. = Any suggestions? with regards, azmat azmat wrote: > > Hello everyone... > > I've been reading through the FIX Spec (4.2) as well as the quickfix > documentation. I'm able to create sessions, send logon messages, get > feedback from the server, etc.=20 > > Now I want to create a message and send it over to the Acceptor, and > hopefully receive something from the Server. This is where I am = 'stuck'. > How do I handle all of the possible return messages from the Acceptor = in > my code? Do I have to create case statements in case of each type of > message that might get returned from the Acceptor (broker)? > > Another question/concern I have now is what happens when a = packet/message > gets "dropped" between me (initiator) and the broker (acceptor)? I = know > there are a number of resend requests that get passed back and forth, = but > what actually happens? Does quickfix have some sort of internal data > structure that has all of the messages that were sent but not yet = ACKd? > Or is this something I need to implement on my OMS? > > I would also be interested in finding some sort of documentation = regarding > the data flow of objects using the quickfix engine or maybe an entity > relationship diagram of the objects....anything like this would be = much > appreciated! > > I've read several posts of people trying to learn FIX/quickfix over = the > years and now that's my turn I'm hoping some of those people can come = back > and help explain some of the things they learned along the way! > > > > thanks! > Azmat > -- Sent from the QuickFIX - Dev mailing list archive at Nabble.com. -------------------------------------------------------------------------= This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Quickfix-developers mailing list Qui...@li... https://lists.sourceforge.net/lists/listinfo/quickfix-developers |