Thread: [Quickfix-users] How to integrate QuickFIX into an existing system?
Brought to you by:
orenmnero
From: Phil <ph...@me...> - 2011-05-07 08:30:35
|
Hi there, To give a bit of background, I'm building a trading platform and I'm using QuickFIX to manage my FIX connection between my server and a FIX gateway I'm subscribed to. By following the examples provided, I was able to write up a very basic application that establish a connection and login to the FIX gateway. Now I'm at the point where I need to integrate QuickFIX into my system. At first I thought I could use the loop after the "initiator.start()" command but the code within the loop gets trigger only when the heartbeat is triggered. (the loop I'm talking about is the one in the executor example) I figured that I need to use the fromApp or toApp methods however I have yet figured out how to trigger those and I thought maybe some of you guys might have an idea. What I'm trying to do is to have my strategy (which is running independently) send a command to my QuickFIX application then the QuickFIX application would figure out what it needs to do depending on the command. I realize I might be doing this the wrong way so I appreciate any advices. - Phil |
From: <ma...@ma...> - 2011-05-07 10:03:20
|
On Sat, May 07, 2011 at 03:30:17PM +0700, Phil wrote: > > What I'm trying to do is to have my strategy (which is running > independently) send a command to my QuickFIX application then the > QuickFIX application would figure out what it needs to do depending > on the command. I realize I might be doing this the wrong way so I > appreciate any advices. You need to think about what commands and other information you're going to exchange and then consider the simplest information exchange mechanism that meets your information flow and latency requirements. For example, for a trivial, non-low-latency day-trading strategy it might be entirely appropriate to have the strategy write one file per new order to a directory and extend the quickfix engine to poll that directory for new orders. > - Phil Martin |
From: Phil M. <ph...@me...> - 2011-05-07 11:40:30
|
This is good news, I coded something that does what your example does except I'm using Redis to do it. The part where I'm still confused with is where in my QuickFIX application that I need to write the code to poll the commands. Any idea? - Phil On May 7, 2011, at 5:00 PM, ma...@ma... wrote: > On Sat, May 07, 2011 at 03:30:17PM +0700, Phil wrote: >> >> What I'm trying to do is to have my strategy (which is running >> independently) send a command to my QuickFIX application then the >> QuickFIX application would figure out what it needs to do depending >> on the command. I realize I might be doing this the wrong way so I >> appreciate any advices. > > You need to think about what commands and other information you're > going to exchange and then consider the simplest information exchange > mechanism that meets your information flow and latency requirements. > > For example, for a trivial, non-low-latency day-trading strategy it > might be entirely appropriate to have the strategy write one file per > new order to a directory and extend the quickfix engine to poll that > directory for new orders. > >> - Phil > > Martin |
From: <ma...@ma...> - 2011-05-07 12:05:15
|
On Sat, May 07, 2011 at 06:38:52PM +0700, Phil Michaud wrote: > The part where I'm still confused with is where in my QuickFIX > application that I need to write the code to poll the commands. Any > idea? Have a look at line 91 of: http://quickfix.svn.sourceforge.net/viewvc/quickfix/trunk/quickfix/examples/tradeclient/Application.cpp?revision=2076&view=markup ...called from line 57 of: http://quickfix.svn.sourceforge.net/viewvc/quickfix/trunk/quickfix/examples/tradeclient/tradeclient.cpp?revision=2241&view=markup Seems like a simple place to start. > - Phil Martin |
From: BlackWaveTechnologies <co...@bl...> - 2011-05-07 12:11:11
|
The key to consider is that FIX in general is an event driven async process. On the price quote side you can subscribe and be continually pushed price data. On the order side you make asynchronous requests and have to handle events to manage the responses. Do a bit of searching in sourceforge and codeplex for some apps using QuickFIX. It takes some work but after looking at a few other examples, you will quickly catch on. Phil-195 wrote: > > QuickFIX Documentation: > http://www.quickfixengine.org/quickfix/doc/html/index.html > QuickFIX Support: http://www.quickfixengine.org/services.html > > Hi there, > > To give a bit of background, I'm building a trading platform and I'm using > QuickFIX to manage my FIX connection between my server and a FIX gateway > I'm subscribed to. By following the examples provided, I was able to write > up a very basic application that establish a connection and login to the > FIX gateway. > > Now I'm at the point where I need to integrate QuickFIX into my system. At > first I thought I could use the loop after the "initiator.start()" command > but the code within the loop gets trigger only when the heartbeat is > triggered. (the loop I'm talking about is the one in the executor example) > > I figured that I need to use the fromApp or toApp methods however I have > yet figured out how to trigger those and I thought maybe some of you guys > might have an idea. > > What I'm trying to do is to have my strategy (which is running > independently) send a command to my QuickFIX application then the QuickFIX > application would figure out what it needs to do depending on the command. > I realize I might be doing this the wrong way so I appreciate any advices. > > > - Phil > > > > > ------------------------------------------------------------------------------ > WhatsUp Gold - Download Free Network Management Software > The most intuitive, comprehensive, and cost-effective network > management toolset available today. Delivers lowest initial > acquisition cost and overall TCO of any competing solution. > http://p.sf.net/sfu/whatsupgold-sd > _______________________________________________ > Quickfix-users mailing list > Qui...@li... > https://lists.sourceforge.net/lists/listinfo/quickfix-users > > -- View this message in context: http://old.nabble.com/How-to-integrate-QuickFIX-into-an-existing-system--tp31564688p31565588.html Sent from the QuickFIX - User mailing list archive at Nabble.com. |
From: Phil M. <ph...@me...> - 2011-05-07 12:48:56
|
Interesting, I just checked the code and it is essentially what I have coded however the code inside my while loop is only triggered once every heartbeat meaning if my heartbeat is set to 30 seconds, the code will get triggered once every 30 seconds. Based on the example you sent me I'm assuming that there is something wrong with my code because the loop should be like any other loop correct? - Phil On May 7, 2011, at 7:02 PM, "ma...@ma..." <ma...@ma...> wrote: > On Sat, May 07, 2011 at 06:38:52PM +0700, Phil Michaud wrote: >> The part where I'm still confused with is where in my QuickFIX >> application that I need to write the code to poll the commands. Any >> idea? > > Have a look at line 91 of: > > http://quickfix.svn.sourceforge.net/viewvc/quickfix/trunk/quickfix/examples/tradeclient/Application.cpp?revision=2076&view=markup > > ...called from line 57 of: > > http://quickfix.svn.sourceforge.net/viewvc/quickfix/trunk/quickfix/examples/tradeclient/tradeclient.cpp?revision=2241&view=markup > > Seems like a simple place to start. > >> - Phil > > Martin |
From: <ma...@ma...> - 2011-05-08 03:36:59
|
Does the tradeclient example program work for you? If so, it's your code... Martin |