{{Quickfixn}} simple program(2)
Mike Gatny
mgatny at connamara.com
Tue Mar 20 06:48:07 PDT 2018
Igor,
Please post your quickfix/n messages log and events log (sanitized as
necessary for privacy/anonymity). These will be found in the folder you
specified as the FileLogPath in your SessionSettings file (i.e.
"my-config.txt").
Regarding ClOrdID: this is a unique identifier assigned by you, which will
be echoed back to you on ExecutionReports, etc. so that you can associate
orders with their responses. Per the FIX Protocol Specification:
*Uniqueness must be guaranteed within a single trading day. Firms,
> particularly those which electronically submit multi-day orders, trade
> globally or throughout market close periods, should ensure uniqueness
> across days, for example by embedding a date within the ClOrdID field.*
You may find this online interactive specification helpful in understanding
the various FIX Protocol messages and tags: http://fiximate.fixtrading.org/
Regading setting the TimeInForce:
order.Set(New TimeInForce(TimeInForce.GOOD_TIL_CANCEL))
--
Mike Gatny
Connamara Systems, LLC
On Mon, Mar 19, 2018 at 5:12 PM, Mario Vitic <igrview at gmail.com> wrote:
> 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/58a660cfae19dbd3e5
>> 697e64b1a3d789d4a735e1/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/58a660cfae19dbd3e5
>> 697e64b1a3d789d4a735e1/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.
>>
>
>
> _______________________________________________
> Quickfixn mailing list
> Quickfixn at lists.quickfixn.com
> http://lists.quickfixn.com/listinfo.cgi/quickfixn-quickfixn.com
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.quickfixn.com/pipermail/quickfixn-quickfixn.com/attachments/20180320/821cf95a/attachment.htm>
More information about the Quickfixn
mailing list