{{Quickfixn}} simple program(2)
Mario Vitic
igrview at gmail.com
Mon Mar 19 14:12:13 PDT 2018
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
2018-03-16 14:58 GMT+01:00 Mike Gatny <mgatny at connamara.com>:
> Igor,
>
> Before quickfix/n was created, the C++ version of quickfix included an
> example application written in VB.NET:
> https://github.com/quickfix/quickfix/tree/58a660cfae19dbd3e5697e64b1a3d7
> 89d4a735e1/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 example application might help you
> understand FromApp(), Crack(), etc.:
> https://github.com/quickfix/quickfix/blob/58a660cfae19dbd3e5697e64b1a3d7
> 89d4a735e1/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.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quickfixn.com/pipermail/quickfixn-quickfixn.com/attachments/20180319/bb63a1ce/attachment.htm>
More information about the Quickfixn
mailing list