Thread: Re: [Quickfix-developers] Trading Client help
Brought to you by:
orenmnero
From: derekldn <der...@gm...> - 2008-08-28 19:15:44
|
crazy4venu wrote: > > initiator.start(); > //application.run(); > initiator.stop(); > from the above code login and logout events should do be fired,but i > don't see such event firing. > initiator.start will create a new thread. because initiator.stop is called immediately in the main thread, the new thread may not get enough time to execute login and logout. -- View this message in context: http://www.nabble.com/Trading-Client-help-tp19202061p19207200.html Sent from the QuickFIX - Dev mailing list archive at Nabble.com. |
From: <ned...@ao...> - 2008-08-31 01:50:59
|
In case some of you were interested. Thanks Ned 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/29/2008 7:16:59 A.M. Eastern Daylight Time, der...@gm... writes: > 5) where do i get the log. > As you can see, the tradeclient example uses ScreenLogFactory which create ScreenLog object. You can either redirect the output to a file, change the std::cout in ScreenLog, or write your own Log class. -----Original Message----- From: Derek <der...@go...> To: Ned...@ao... Sent: Sat, 30 Aug 2008 9:20 am Subject: Re: [Quickfix-developers] Trading Client help Hi Ned, Totally agree with your advice. Actually I'm not the person starting this thread. Probably you should reply to the whole email list to let others know. Could you please try to answer other questions as well? Thanks, Derek On Fri, Aug 29, 2008 at 2:34 PM, <Ned...@ao...> wrote: 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/29/2008 7:16:59 A.M. Eastern Daylight Time, der...@gm... writes: > 5) where do i get the log. > As you can see, the tradeclient example uses ScreenLogFactory which create ScreenLog object. You can either redirect the output to a file, change the std::cout in ScreenLog, or write your own Log class. It's only a deal if it's where you want to go. Find your travel deal here. |
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) |
From: derekldn <der...@gm...> - 2008-08-29 11:16:52
|
I'm also a newbie on FIX. I'll try to answer some of your questions, but the answers may not be correct. > 1) do i need application.run function to get execute logon logout messages > You don't have to. Application.run only prompts what request you want to execute. I think if you make the main thread wait for a while, for example replace application.run with FIX::process_sleep(10), you will get logon and logout message. > 2) how do i get new order single report or execution report > I think you should send a request somehow. The incoming report will trigger Application.onMessage(FIX42::ExecutionReport&, const FIX::SessionID& ) depending on the FIX version you are using. > 5) where do i get the log. > As you can see, the tradeclient example uses ScreenLogFactory which create ScreenLog object. You can either redirect the output to a file, change the std::cout in ScreenLog, or write your own Log class. -- View this message in context: http://www.nabble.com/Trading-Client-help-tp19202061p19218009.html Sent from the QuickFIX - Dev mailing list archive at Nabble.com. |
From: crazy4venu <cra...@gm...> - 2008-08-29 05:07:50
|
Hello derekldn, Thanks for the support. i am very thankfull for your early response and your answers are very usefull for me. and i do changed some parameters and i executed the trading client. and it works fine now ! Regards tinnu derekldn wrote: > > I'm also a newbie on FIX. I'll try to answer some of your questions, but > the answers may not be correct. > > > >> 1) do i need application.run function to get execute logon logout >> messages >> > You don't have to. Application.run only prompts what request you want to > execute. I think if you make the main thread wait for a while, for example > replace application.run with FIX::process_sleep(10), you will get logon > and logout message. > > > >> 2) how do i get new order single report or execution report >> > I think you should send a request somehow. The incoming report will > trigger Application.onMessage(FIX42::ExecutionReport&, const > FIX::SessionID& ) depending on the FIX version you are using. > > > >> 5) where do i get the log. >> > As you can see, the tradeclient example uses ScreenLogFactory which create > ScreenLog object. You can either redirect the output to a file, change the > std::cout in ScreenLog, or write your own Log class. > > > -- View this message in context: http://www.nabble.com/Trading-Client-help-tp19202061p19218661.html Sent from the QuickFIX - Dev mailing list archive at Nabble.com. |
From: crazy4venu <cra...@gm...> - 2008-08-28 22:51:53
|
Hi derekldn, Thanks for the information. please clarify my futher doubts regarding fix 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. Please help in this issues. Regards tinnu derekldn wrote: > > > > crazy4venu wrote: >> >> initiator.start(); >> //application.run(); >> initiator.stop(); >> from the above code login and logout events should do be fired,but i >> don't see such event firing. >> > > initiator.start will create a new thread. because initiator.stop is called > immediately in the main thread, the new thread may not get enough time to > execute login and logout. > -- View this message in context: http://www.nabble.com/Trading-Client-help-tp19202061p19214053.html Sent from the QuickFIX - Dev mailing list archive at Nabble.com. |