{{Quickfixn}} RES: Quickfixn Digest, Vol 9, Issue 25

Felipe Soares felipe.soares at traderdata.com.br
Tue Jul 31 11:42:22 PDT 2012


Do you have any tutorial on how I do that on Ruby?
I am completely lost with Ruby.

Regards


-----Mensagem original-----
De: quickfixn-bounces at lists.quickfixn.com
[mailto:quickfixn-bounces at lists.quickfixn.com] Em nome de
quickfixn-request at lists.quickfixn.com
Enviada em: terça-feira, 31 de julho de 2012 14:48
Para: quickfixn at lists.quickfixn.com
Assunto: Quickfixn Digest, Vol 9, Issue 25

Send Quickfixn mailing list submissions to
	quickfixn at lists.quickfixn.com

To subscribe or unsubscribe via the World Wide Web, visit
	http://lists.quickfixn.com/listinfo.cgi/quickfixn-quickfixn.com
or, via email, send a message with subject or body 'help' to
	quickfixn-request at lists.quickfixn.com

You can reach the person managing the list at
	quickfixn-owner at lists.quickfixn.com

When replying, please edit your Subject line so it is more specific than
"Re: Contents of Quickfixn digest..."


Today's Topics:

   1. Re:  felipe's custom message problem (Grant Birchmeier)
   2.  RES: felipe's custom message problem (Felipe Soares)
   3.  RES: felipe's custom message problem (Felipe Soares)


----------------------------------------------------------------------

Message: 1
Date: Tue, 31 Jul 2012 11:05:35 -0500
From: Grant Birchmeier <gbirchmeier at connamara.com>
To: Felipe Soares <felipe.soares at traderdata.com.br>
Cc: Mailing list for QuickFIX/n <quickfixn at lists.quickfixn.com>
Subject: Re: {{Quickfixn}} felipe's custom message problem
Message-ID:

<CAMq4opNNnRoQOEq1ppFVYkNR_W6vKewUW-enCxUj6R3jLTeD8A at mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"

Because we wrote the code generator in Ruby, which was an easy and fast
way to do it.

That Ruby bit generates C# source code, so the engine itself is all C#.

We're not 100% happy about this Ruby dependency, but we haven't found a
more windows-centric tool that we don't hate.


On Tue, Jul 31, 2012 at 11:01 AM, Felipe Soares <
felipe.soares at traderdata.com.br> wrote:

> Thanks a lot Grant,
>
>
>
> I will try that now.
>
> I thought that quickfix/N was constructed entirely in C#. Why do I
> need ruby?
>
>
>
> Regards
>
> Felipe soares
>
>
>
> *De:* Grant Birchmeier [mailto:gbirchmeier at connamara.com]
> *Enviada em:* ter?a-feira, 31 de julho de 2012 12:57
> *Para:* Mailing list for QuickFIX/n; Felipe Soares
> *Assunto:* Re: {{Quickfixn}} felipe's custom message problem
>
>
>
> Furthermore, I'd recommend that you actually look into downloading the
> QF/N source and regenerating a version according to your custom
> FIX44.xml DD.  However, you'll need Ruby to generate the source.
>
>
>
> This will give you a FIX44 version of the ApplicationMessageRequest
> and field methods.  These are preferred over the generic methods.
>
>
>
> -Grant
>
>
>
>
>
> On Tue, Jul 31, 2012 at 10:52 AM, Grant Birchmeier <
> gbirchmeier at connamara.com> wrote:
>
> Felipe,
>
> In this an future discussions, I highly recommend that you turn off
> digest mode.  It's making it difficult to follow the discussion when
> the subject lines are constantly changing.
>
> Problem 1: In your cfg file, you need to add UseDataDictionary=Y
>
> Problem 2: You are not constructing your repeating group correctly.
>
> Problem 3: You were not using the correct message constructor.  (The
> first parameter to Message(string,bool) is an entire FIX message
> string, not just the 35 field.)
>
> To construct your message with generic methods, it should look like
this:
>
>
>
>             QuickFix.Message m = new Message();
>             m.Header.SetField(new BeginString("FIX.4.4"));
>             m.SetField(new QuickFix.Fields.StringField(35, "BW"));
>
>             m.SetField(new QuickFix.Fields.StringField(1346,
> "TRADER")); //AppReqId
>             m.SetField(new QuickFix.Fields.IntField(1347, 0));
> //ApplReqType
>
>             int[] ordering = {1355,1182,1183};
>             Group g = new Group(1351, 1355, ordering);
>
>             // first group element
>             g.SetField(new QuickFix.Fields.StringField(1355,("foo")));
> //RefApplID
>             g.SetField(new QuickFix.Fields.IntField(1182, 10));
> //ApplBegSeqNum
>             g.SetField(new QuickFix.Fields.IntField(1183, 20));
> //ApplEndSeqNum
>             m.AddGroup(g);
>
>             // second group element
>             g.SetField(new QuickFix.Fields.StringField(1355,
> ("bar"))); //RefApplID
>             g.SetField(new QuickFix.Fields.IntField(1182, 11));
> //ApplBegSeqNum
>             g.SetField(new QuickFix.Fields.IntField(1183, 22));
> //ApplEndSeqNum
>             m.AddGroup(g);
>
>             Console.WriteLine(m.ToString());
>
>             //
> prints
> 8=FIX.4.4|9=82|35=BW|1346=TRADER|1347=0|1351=2|1355=foo|1182=10|1183=2
> 0|1355=bar|1182=11|1183=22|10=202|
>
>
>
>
>
>
>
> --
> Grant Birchmeier
> Connamara Systems, LLC
> Made-To-Measure Trading Solutions.
> Exactly what you need. No more. No less.
> http://connamara.com
>
> _______________________________________________
> Quickfixn mailing list
> Quickfixn at lists.quickfixn.com
> http://lists.quickfixn.com/listinfo.cgi/quickfixn-quickfixn.com
>
>
>
>
> --
>
> Grant Birchmeier
>
> *Connamara Systems, LLC*
>
> *Made-To-Measure Trading Solutions.*
>
> Exactly what you need. No more. No less.
>
> http://connamara.com
>
>
>



--
Grant Birchmeier
*Connamara Systems, LLC*
*Made-To-Measure Trading Solutions.*
Exactly what you need. No more. No less.*
*
http://connamara.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.quickfixn.com/pipermail/quickfixn-quickfixn.com/attachments/
20120731/b62de1b5/attachment-0001.htm>

------------------------------

Message: 2
Date: Tue, 31 Jul 2012 14:34:13 -0300
From: Felipe Soares <felipe.soares at traderdata.com.br>
To: Grant Birchmeier <gbirchmeier at connamara.com>, 	"Mailing list for
	QuickFIX/n" <quickfixn at lists.quickfixn.com>
Subject: {{Quickfixn}} RES: felipe's custom message problem
Message-ID: <b0fdcdf75d5fea5d645cb0b1aa3ffb61 at mail.gmail.com>
Content-Type: text/plain; charset="windows-1252"

Ok Grant,



Now it looks that I made some progress..

I didn?t understand problem 2?



Now my sessions isn?t connecting? since I put the USeDataDctionary option
to Y



*De:* Grant Birchmeier [mailto:gbirchmeier at connamara.com]
*Enviada em:* ter?a-feira, 31 de julho de 2012 12:53
*Para:* Mailing list for QuickFIX/n; Felipe Soares
*Assunto:* felipe's custom message problem



Felipe,

In this an future discussions, I highly recommend that you turn off digest
mode.  It's making it difficult to follow the discussion when the subject
lines are constantly changing.

Problem 1: In your cfg file, you need to add UseDataDictionary=Y

Problem 2: You are not constructing your repeating group correctly.

Problem 3: You were not using the correct message constructor.  (The first
parameter to Message(string,bool) is an entire FIX message string, not
just the 35 field.)

To construct your message with generic methods, it should look like this:



            QuickFix.Message m = new Message();
            m.Header.SetField(new BeginString("FIX.4.4"));
            m.SetField(new QuickFix.Fields.StringField(35, "BW"));

            m.SetField(new QuickFix.Fields.StringField(1346, "TRADER"));
//AppReqId
            m.SetField(new QuickFix.Fields.IntField(1347, 0));
//ApplReqType

            int[] ordering = {1355,1182,1183};
            Group g = new Group(1351, 1355, ordering);

            // first group element
            g.SetField(new QuickFix.Fields.StringField(1355,("foo")));
//RefApplID
            g.SetField(new QuickFix.Fields.IntField(1182, 10));
//ApplBegSeqNum
            g.SetField(new QuickFix.Fields.IntField(1183, 20));
//ApplEndSeqNum
            m.AddGroup(g);

            // second group element
            g.SetField(new QuickFix.Fields.StringField(1355, ("bar")));
//RefApplID
            g.SetField(new QuickFix.Fields.IntField(1182, 11));
//ApplBegSeqNum
            g.SetField(new QuickFix.Fields.IntField(1183, 22));
//ApplEndSeqNum
            m.AddGroup(g);

            Console.WriteLine(m.ToString());

            //
prints
8=FIX.4.4|9=82|35=BW|1346=TRADER|1347=0|1351=2|1355=foo|1182=10|1183=20|13
55=bar|1182=11|1183=22|10=202|







--
Grant Birchmeier
Connamara Systems, LLC
Made-To-Measure Trading Solutions.
Exactly what you need. No more. No less.
http://connamara.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.quickfixn.com/pipermail/quickfixn-quickfixn.com/attachments/
20120731/57e3acad/attachment-0001.htm>

------------------------------

Message: 3
Date: Tue, 31 Jul 2012 14:48:14 -0300
From: Felipe Soares <felipe.soares at traderdata.com.br>
To: Grant Birchmeier <gbirchmeier at connamara.com>, 	"Mailing list for
	QuickFIX/n" <quickfixn at lists.quickfixn.com>
Subject: {{Quickfixn}} RES: felipe's custom message problem
Message-ID: <7d3c51e74a2e78db1c7bd1ad604ba46e at mail.gmail.com>
Content-Type: text/plain; charset="utf-8"

Hi Grant,



I am not sure I made any progress L



Here is the output I am receving from your code:



8=FIX.4.4?9=82?35=BW?1346=TRADER?1347=0?1351=2?1355=foo?1182=10?1183=20?
1355=bar

?1182=11?1183=22?10=202?



Unhandled Exception: QuickFix.FieldNotFoundException: field not found for
tag: 3

5

   at QuickFix.FieldMap.GetField(Int32 tag)

   at QuickFix.Session.SendRaw(Message message, Int32 seqNum)

   at QuickFix.Session.Send(Message message)

   at QuickFix.Session.SendToTarget(Message message, SessionID sessionID)

   at ConsoleApplication21.TCPReplayApp.RequestSeqNum(Int32 seqnum)

   at ConsoleApplication21.Program.Main(String[] args)



The error happens when I try Session.SendToTarget(m, sessionId);



Please help I don?t know where I should get information?



*De:* Grant Birchmeier [mailto:gbirchmeier at connamara.com]
*Enviada em:* ter?a-feira, 31 de julho de 2012 12:53
*Para:* Mailing list for QuickFIX/n; Felipe Soares
*Assunto:* felipe's custom message problem



Felipe,

In this an future discussions, I highly recommend that you turn off digest
mode.  It's making it difficult to follow the discussion when the subject
lines are constantly changing.

Problem 1: In your cfg file, you need to add UseDataDictionary=Y

Problem 2: You are not constructing your repeating group correctly.

Problem 3: You were not using the correct message constructor.  (The first
parameter to Message(string,bool) is an entire FIX message string, not
just the 35 field.)

To construct your message with generic methods, it should look like this:



            QuickFix.Message m = new Message();
            m.Header.SetField(new BeginString("FIX.4.4"));
            m.SetField(new QuickFix.Fields.StringField(35, "BW"));

            m.SetField(new QuickFix.Fields.StringField(1346, "TRADER"));
//AppReqId
            m.SetField(new QuickFix.Fields.IntField(1347, 0));
//ApplReqType

            int[] ordering = {1355,1182,1183};
            Group g = new Group(1351, 1355, ordering);

            // first group element
            g.SetField(new QuickFix.Fields.StringField(1355,("foo")));
//RefApplID
            g.SetField(new QuickFix.Fields.IntField(1182, 10));
//ApplBegSeqNum
            g.SetField(new QuickFix.Fields.IntField(1183, 20));
//ApplEndSeqNum
            m.AddGroup(g);

            // second group element
            g.SetField(new QuickFix.Fields.StringField(1355, ("bar")));
//RefApplID
            g.SetField(new QuickFix.Fields.IntField(1182, 11));
//ApplBegSeqNum
            g.SetField(new QuickFix.Fields.IntField(1183, 22));
//ApplEndSeqNum
            m.AddGroup(g);

            Console.WriteLine(m.ToString());

            //
prints
8=FIX.4.4|9=82|35=BW|1346=TRADER|1347=0|1351=2|1355=foo|1182=10|1183=20|13
55=bar|1182=11|1183=22|10=202|







--
Grant Birchmeier
Connamara Systems, LLC
Made-To-Measure Trading Solutions.
Exactly what you need. No more. No less.
http://connamara.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.quickfixn.com/pipermail/quickfixn-quickfixn.com/attachments/
20120731/03a393bd/attachment.htm>

------------------------------

_______________________________________________
Quickfixn mailing list
Quickfixn at lists.quickfixn.com
http://lists.quickfixn.com/listinfo.cgi/quickfixn-quickfixn.com


End of Quickfixn Digest, Vol 9, Issue 25
****************************************


More information about the Quickfixn mailing list