Re: [Quickfix-developers] Trading Client help
Brought to you by:
orenmnero
|
From: <Ned...@ao...> - 2008-09-02 15:07:19
|
I will try and answer the following questions. Please correct me if I am
wrong.
1) do i need application.run function to get execute logon logout messages
The application.run function are in the QuickFix examples and is essentially
a wait loop. You will need some kind of wait loop once you start your
initiator or acceptor (initiator.start(), acceptor.start()). I believe you will
need a wait loop for the logon and logout messages in addition to all the other
messages that you will send or receive.
2) how do i get new order single report or execution report (in which event
i can capture this message)
These messages (application level messages) can be captured in the fromApp
event. There are a couple of ways of doing this; however the QuickFix
documentation recommends using the "crack" function that you specify in the fromApp
event which allows you to overload the fromApp message function by specifying
one or more "onMessage" functions for a specific application message.
For example:
void Application::onMessage(const FIX42::NewOrderSingle &message, const
FIX::SessionID&)
{
}
is an overloaded function to capture New Order Single Reports in the FIX42
format.
void Application::onMessage(const FIX42::ExecutionReport &message, const
FIX::SessionID&)
{
}
is an overloaded function to capture Execution Reports in the FIX42 format.
In order to use the "crack" function you will need your Application class to
inherit from "public FIX::MessageCracker".
I know this sounds confusing, but if you look at the documentation for
receiving messages and specifically the link
_http://www.quickfixengine.org/quickfix/doc/html/receiving_messages.html_
(http://www.quickfixengine.org/quickfix/doc/html/receiving_messages.html) , it will explain how to do this.
3) what is the use of initiator and acceptor
I don't think I can give you a good answer about defining an initiator and
acceptor, but I will try. Both are ways of defining a type of application and
consequently a connection using QuickFix. An initiator looks to make a
connection to one or more servers by specifying a SocketConnectPort (socket port)
and SocketConnectHost (IP address of a server to connect to). An acceptor
listens for incoming connections and uses a SocketAcceptPort (socket port for
listening to incoming connections). There are other parameters that you specify
for initiators and acceptors. Please see the documention for configuration
specifically the link
_http://www.quickfixengine.org/quickfix/doc/html/configuration.html_
(http://www.quickfixengine.org/quickfix/doc/html/configuration.html) .
4) does executor and ordermatch require for trading client.
I believe you can use the executor application as a server for the
tradeclient application. The ordermatch application is also a server and I would
think it can be used with the tradeclient application, but I'm not sure.
Please see the documentation for example applications specifically the link
_http://www.quickfixengine.org/quickfix/doc/html/examples.html_
(http://www.quickfixengine.org/quickfix/doc/html/examples.html) .
5) where do i get the log.
I would add the following to the response you received on this question.
Let's assume you want to use the QuickFix log and have it log to a file:
1) Use the FileLogFactory as in the following:
FIX::SessionSettings settings ( config );
FIX::FileLogFactory logFactory ( settings );
initiator = FIX::SocketInitiator(application, storeFactory, settings,
logFactory);
2) Set your configuration file as in the following:
FileLogPath=log
The FileLogPath allows you to specify the path to the directory that the log
files will be in. In the above example, the name of the directory will be
"log" and since there was no path specified (i.e. c:\mylocation\log), the
location of the "log" directory will default to the start in directory I believe.
I hope this helps
Ned
In a message dated 8/31/2008 7:15:29 A.M. Eastern Daylight Time,
der...@go... writes:
1) do i need application.run function to get execute logon logout messages
2) how do i get new order single report or execution report (in which event
i can capture this message)
3) what is the use of initiator and acceptor
4) does executor and ordermatch require for trading client.
5) where do i get the log.
**************It's only a deal if it's where you want to go. Find your travel
deal here.
(http://information.travel.aol.com/deals?ncid=aoltrv00050000000047)
|