{{Quickfixn}} simple program(2)

Roberto Reff roberto.reff at poligram.de
Tue Mar 20 00:49:13 PDT 2018


Hi.


As this happens on connect, it is an connection error.

Keep the app running without sending the order. I have the same issue but after some seconds the connection got back well.


20180320-06:30:10.841 : Connecting to 160.43.172.32 on port 8228
20180320-06:30:11.200 : Connection succeeded
20180320-06:30:11.372 : Initiated logon request
20180320-06:30:14.663 : Received logon
20180320-06:30:16.163 : Session FIX.4.4:LBBISTP->BLPSTP disconnecting: System.Net.Sockets.SocketException (0x80004005): An existing connection was forcibly closed by the remote host
   at QuickFix.SocketInitiatorThread.ReadSome(Byte[] buffer, Int32 timeoutMilliseconds) in ..\lib\QuickFix\quickfixn\source\QuickFIXn\SocketInitiatorThread.cs:line 157
   at QuickFix.SocketInitiatorThread.Read() in ..\lib\QuickFix\quickfixn\source\QuickFIXn\SocketInitiatorThread.cs:line 82
20180320-06:30:41.232 : Connecting to 160.43.172.32 on port 8228
20180320-06:30:41.528 : Connection succeeded
20180320-06:30:41.528 : Initiated logon request
20180320-06:30:43.156 : Received logon
20180320-06:30:43.156 : Got resend request from 2 to 0
20180320-06:30:43.156 : Sent SequenceReset TO: 8

I'll look into it tomorrow.

Are you also connecting to Bloomberg? I have this issue at TSOX, EMSX and FXEM sessions.


Regards
Roberto

Von: Quickfixn [mailto:quickfixn-bounces at lists.quickfixn.com] Im Auftrag von Mario Vitic
Gesendet: Montag, 19. März 2018 22:12
An: Mailing list for QuickFIX/n <quickfixn at lists.quickfixn.com>
Betreff: Re: {{Quickfixn}} simple program(2)

Hi, Thanks

Finally made progress. It takes time to figure out that Acceptor is something I don't need because it is the server/broker side, and that my program is Initiator. This should be clearly stated in documentation. Docs assumes high level of knowledge.

I got this error in debug \log.txt:

0180319-20:36:11.447 : Created session
20180319-20:36:19.662 : Connecting to XXXXXXXXXXXXXXXXXxx
20180319-20:36:20.603 : Connection succeeded
20180319-20:37:44.162 : Initiated logon request
20180319-20:37:44.173 : Session FIX.4.4:XXXXXXXXXXXx->XXXXXXXXXX disconnecting: System.Net.Sockets.SocketException (0x80004005): An existing connection was forcibly closed by the remote host
   at QuickFix.SocketInitiatorThread.ReadSome(Byte[] buffer, Int32 timeoutMilliseconds)
   at QuickFix.SocketInitiatorThread.Read()

My code below... something is wrong with my  NewOrderSingle i guess?

Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
        Try
            Dim settings As SessionSettings = New SessionSettings("my-config.txt")
            Dim myApp2 As IApplication = New TradeClientApp()
            Dim storeFactory As IMessageStoreFactory = New FileStoreFactory(settings)
            Dim logFactory As ILogFactory = New FileLogFactory(settings)
            Dim initiator As SocketInitiator = New SocketInitiator(myApp2, storeFactory, settings, logFactory)

            initiator.Start()

            TradeClientApp.Run()
            initiator.Stop()

        Catch ex As Exception
            MessageBox.Show(ex.Message)
        End Try
    End Sub

===========
Then,  In TradeClientApp.Run() it calls this function:
===========


    Shared Function QueryNewOrderSingleNEW44()
        Try
            Dim order = New QuickFix.FIX44.NewOrderSingle(New ClOrdID("1234"),
                                                          New Symbol("EUR/USD"),
                                                          New Side(Side.BUY),
                                                          New TransactTime(DateTime.Now),
                                                          New OrdType(OrdType.MARKET))
            order.Account = New Account("01053978")
            order.Set(New OrderQty(1))

            'order.Set(New TimeInForce("GOOD_TILL_CANCEL")  comment: doesn't work

            Session.SendToTarget(order, MySessionID_X)
        Catch ex As Exception
            MessageBox.Show(ex.Message)
        End Try
    End Function

Is  ClOrdID something arbitrary?
So what am I missing in my code please?
Is my  order. missing some parameter?
How to set  GOOD_TILL_CANCEL please?

Thank you
Best regards
Igor
[https://ssl.gstatic.com/ui/v1/icons/mail/images/cleardot.gif]


2018-03-16 14:58 GMT+01:00 Mike Gatny <mgatny at connamara.com<mailto:mgatny at connamara.com>>:
Igor,

Before quickfix/n was created, the C++ version of quickfix included an example application written in VB.NET<http://VB.NET>:
https://github.com/quickfix/quickfix/tree/58a660cfae19dbd3e5697e64b1a3d789d4a735e1/examples/executor/vbnet

Although quickfix/n is not a drop-in replacement for the old quickfix/c++ .NET wrapper, this part of the VB.NET<http://VB.NET> example application might help you understand FromApp(), Crack(), etc.:
https://github.com/quickfix/quickfix/blob/58a660cfae19dbd3e5697e64b1a3d789d4a735e1/examples/executor/vbnet/Application.vb

Hopefully someone on the mailing list or stackoverflow can help out with some example code.  If not, and you are still struggling, we do offer paid support.





________________________________
Poligram GmbH
Rilkeweg 4
59519 Möhnesee


Geschäftsführung: Roberto Reff
Registergericht: Amtsgericht Arnsberg
Registernummer: HRB10900
USt.ID: DE251226082

http://www.poligram.de


This message contains confidential information and is intended only for the individual(s) addressed in the message. If you are not the named addressee, you should not disseminate, distribute, or copy this e-mail. If you are not the intended recipient, you are notified that disclosing, distributing, or copying this e-mail is strictly prohibited.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quickfixn.com/pipermail/quickfixn-quickfixn.com/attachments/20180320/bb54de28/attachment.htm>


More information about the Quickfixn mailing list