[ts-gen] Installation Issues

Dave McDaniel mcdanieldave at hotmail.com
Wed Apr 29 12:40:44 EDT 2009


I was able to get the compilation to work, though now I have no --help option, only --data and --risk.  Is the documentation out of date with the other options listed?

Thanks,
Dave

Here is what I get:

shim-090327> ./shim

Usage: shim <mode> [optional feature list]
Modes:

               # real modes, requiring access to an IB tws:
    --data     # process subscriptions and log resulting tick stream events
    --risk     # accept full command set, send requests, and log all events


> From: ts-general-request at trading-shim.org
> Subject: ts-general Digest, Vol 25, Issue 4
> To: ts-general at trading-shim.org
> Date: Wed, 29 Apr 2009 10:10:53 -0400
> 
> Send ts-general mailing list submissions to
> 	ts-general at trading-shim.org
> 
> To subscribe or unsubscribe via the World Wide Web, visit
> 	http://www.trading-shim.org/mailman/listinfo/ts-general
> or, via email, send a message with subject or body 'help' to
> 	ts-general-request at trading-shim.org
> 
> You can reach the person managing the list at
> 	ts-general-owner at trading-shim.org
> 
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of ts-general digest..."
> 
> 
> Today's Topics:
> 
>    1. trading database error message (Nils Gebhardt)
>    2. Re: trading database error message (Bill Pippin)
>    3. order placement (Mike Thornton)
>    4. Re: order placement (Bill Pippin)
>    5. Re: On travel, back next week (Bill Pippin)
>    6. New release supports real time bars subscriptions (Bill Pippin)
>    7. Installation Issues (Dave McDaniel)
> 
> 
> ----------------------------------------------------------------------
> 
> Message: 1
> Date: Thu, 16 Apr 2009 20:44:32 +0200
> From: Nils Gebhardt <mail at ngebhardt.de>
> Subject: [ts-gen] trading database error message
> To: ts-general at trading-shim.org
> Message-ID: <1239907472.3626.11.camel at gb07>
> Content-Type: text/plain
> 
> 
> 
> hi, 
> 
> when I try to switch to the trading database I - which should be
> initially a 1-1 copy of the testing database as I understand it - I am
> facing the following errors:
> 
> 
> Map2:   2 submit   
> Error during request generation from rule: submit
> Exec: submit -> submit failure
> 
> Problem: 552 ice: send cmd couldn't be mapped to request
> Exiting
> 
> -----%----
> 
> 0r alternatively
> 
> Scan: 37 38 1 <1>
> Term: oid oid       (nil)
> Process rule: Terminal (oid)
> Process rule: Compound (oid)
> Syntax error:
> Grammar rule: Compound oid     
> Cursor state: match; text is:
> bind key:take2009_0416_203952 to oid:1;
> --------------------------------------^
> Terminal tag: name:oid  index:2
> Process rule: MetaData (RhsK)
> Process rule: Compound (bind)
> Syntax error:
> Grammar rule: Compound bind    
> Cursor state: match; text is:
> bind key:take2009_0416_203952 to oid:1;
> --------------------------------------^
> Terminal tag: name:pad  index:2
> Drop: ;
> 
> Process rule: NonInput (TmpE)
> Process rule: Compound (ProtoCreate)
> Syntax error:
> Grammar rule: Compound ProtoCreate
> Cursor state: match; text is:
> 
> -----%------
> 
> This example is based on an EUR:USD order, so no expiry manipulations on
> the initial data sets are involved, however, future orders have show up
> similar messages. Switching back to the 'testing' instance everything is
> fine. 
> 
> Any hints on that messages? 
> 
> 
> regards
> 
> Nils
> 
> 
> 
> ------------------------------
> 
> Message: 2
> Date: Thu, 16 Apr 2009 17:30:37 -0400
> From: Bill Pippin <pippin at owlriver.net>
> Subject: Re: [ts-gen] trading database error message
> To: trading-shim general mailing list <ts-general at trading-shim.org>,
> 	mail at ngebhardt.de
> Message-ID: <E1LuZAL-00066p-6H at pippin.first.lan>
> 
> Nils,
> 
> > when I try to switch to the trading database I - which should be
> > initially a 1-1 copy of the testing database as I understand it - I am
> > facing the following errors:
> 
> Almost but not quite.  Setup inserts a few regression test order
> templates into the table Testing.Template, but not into
> Trading.Template .  The reason for this distinction is that you are
> supposed to be responsible for the decision to be actively trading
> for real money, and you are supposed to choose the order Template
> flags and other parameters yourself.
> 
> > Any hints on ... messages? 
> 
> The following is definitely a failure to find an order template
> record; the type tag TmpE calls for a template lookup action:
> 
> > Process rule: NonInput (TmpE)
> > Process rule: Compound (ProtoCreate)
> > Syntax error:
> > Grammar rule: Compound ProtoCreate
> > Cursor state: match; text is:
> 
> I can't tell from the the other messages if there are additional
> problems; missing template records are serious enough that
> everything following becomes suspect.
> 
> There might be something else as well, say missing symbols between
> testing and trading, if you've updated one and not the other.
> The script setup.sql creates both databases, and populates tables
> as well; the script create.sql just recreates and populates tables
> for a given database. 
> 
> In addition, cross-session order manipulation depends on an
> existing and up-to-date journal, which will be in whichever
> database your .shimrc config file told the shim to connect
> with.
> 
> So, the three legitimate reasons for differences are template
> differentiation, user-added symbols, and journal history.
> A fourth, less specific problem might possibly be some sort of
> version creep due to, say, manual fixes to one database and
> not the other.
> 
> Thanks,
> 
> Bill
> 
> 
> 
> ------------------------------
> 
> Message: 3
> Date: Thu, 23 Apr 2009 03:17:25 -0700
> From: Mike Thornton <endoscope at gmail.com>
> Subject: [ts-gen] order placement
> To: trading-shim general mailing list <ts-general at trading-shim.org>
> Message-ID:
> 	<e1d0b9d10904230317t528ba7d4udbe2af05fbb66f80 at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
> 
> Hi folks,
> 
> After looking through past posts, e.g.
> 
> http://www.trading-shim.org/pipermail/ts-general/2008-April/000190.html
> http://www.trading-shim.org/pipermail/ts-general/2007-September/000087.html
> 
> I have a few questions regarding order placement.
> 
> 1.  The following shim command "order(30545,MKT,Submit,20000,0,0,0)" --
> which is supposed to purchase 20,000 EUR.USD -- results in a "Drop:
> (30545,MKT,Submit,20000,0,0,0)" message.  An
> "order(30545,MKT,Create,20000,0,0,0);" results in the same message.
> 
> If I type "bind key(abc) to oid(30545);", then I see the following error
> message
> 
> Scan: 8 9 0 <(>
> Term: key :       (nil)
> Process rule: Terminal (:)
> Process rule: Compound (key)
> Syntax error:
> Grammar rule: Compound key
> Cursor state: match; text is:
> bind key(abc) to oid(30545);
> ---------^------------------
> Process rule: MetaData (LhsK)
> Process rule: Compound (bind)
> Syntax error:
> Grammar rule: Compound bind
> Cursor state: match; text is:
> bind key(abc) to oid(30545);
> ---------^------------------
> Drop: abc) to oid(30545);
> 
> 
> What am I doing wrong?  Do both of the order placement methods in the above
> links still work?
> 
> 
> 2.  As I understand, the order id comes from the Product.uid field.  How do
> I specify the exchange?
> 
> Thx.
> Mike
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: http://www.trading-shim.org/pipermail/ts-general/attachments/20090423/e4228491/attachment-0001.html 
> 
> ------------------------------
> 
> Message: 4
> Date: Thu, 23 Apr 2009 14:41:19 -0400
> From: Bill Pippin <pippin at owlriver.net>
> Subject: Re: [ts-gen] order placement
> To: trading-shim general mailing list <ts-general at trading-shim.org>,
> 	Mike Thornton <endoscope at gmail.com>
> Message-ID: <E1Lx3rL-0002uS-69 at pippin.first.lan>
> 
> Mike,
> 
> About placing orders:
> 
> > I have a few questions regarding order placement.
> 
> You may not realize that the officially most-upto-date text to
> describe the order commands is in the scripts exs/risk.rb and
> exs/kill.rb .  I mention this in part because the parenthesized
> tuples below are obsolete syntax:
> 
> > ... shim command ... to purchase 20,000 EUR.USD:
> 
> >    order(30545,MKT,Submit,20000,0,0,0)
> 
> > results in a ... drop message.
> 
> If the above is literally the syntax you used, then indeed, the parser
> would drop the command due to syntax errors, which is what appears to
> have happened.  The order regression scripts I mention above echo the
> command text to the standard error, and are reasonably transparent,
> so you should feel free to modify them for use with your paper account.
> 
> About order key bindings:
> 
> > If I type "bind key(abc) to oid(30545);", then I see the following
> > [syntax | semantic | parse action] error message:
> > ...
> 
> Your bind command should use the new syntax, and have as order template
> identifier a valid Template table uid.  The sql/risk.sql script inserts
> a few into the testing database to show you what's involved, and you'll
> need to insert your own into the trading database before you can use it
> for trades. 
> 
> An example bind command, one that you could use for a single session,
> since order keys in the journal must be unique, might be:
> 
>     bind key:abc-090423-1339 to oid:1;
> 
> In the ruby risk.rb script, the order key variable name is filled in
> via string interpolation.  You'll probably want to do something similar
> in your own downstream scripts:
> 
>     bind key:#{take_pos} to oid:1;
> 
> > Do both of the order placement methods in the above links still work?
> 
> The post from 2007 is completely obsolete; the post from a year ago is
> close enought to correct to be thoroughly confusing.  Again, see the
> example scripts in the directory exs, and in particular, risk.rb and
> kill.rb .  I update those as needed with each release.
> 
> > 2.  As I understand, the order id comes from the Product.uid field.
> > How do I specify the exchange?
> 
> In brief, you'll be using some kind of contract expression in your
> order creation command.  Contract expressions by their nature include
> the route, and you can use any valid contract expression type, see
> exs/tick for details.
> 
> I believe by "order id" you mean the contract expression, in the
> form you've given, a Product uid.  This record key may be part of a
> valid contract expression, in which you would follow the product uid
> with an exchange name, e.g., pid:30545 at IDEALPRO.  There are other
> valid contract expression forms, again, see exs/tick for details.
> 
> The string assignment to the variable src3 in the ruby code fragment
> below, taken from risk.rb, gives an example of how to build the text
> for a order creation command:
> 
>     sequence = "-aa-"
>     identity =  sequence  + Time.new.strftime("%y%m%d-%H-%M-%S")
>     take_pos = 'take-pos' + identity
>     exit_pos = 'exit-pos' + identity
>     brand    = 'test-pos'
> 
>     src0 = "wait 2;\n"
>     src1 = "bind key:#{take_pos} to oid:1;\n"
>     src2 = "bind key:#{exit_pos} to oid:2;\n"
> 
>     src3 = "create item #{brand} ibc:266093 at SMART #{take_pos} LMT 2  5.0  0.0;
>     src4 = "modify item                           #{take_pos} MKT 1  0.0  0.0;
>     src5 = "submit item                           #{take_pos};
> 
> The bind command [currently] glues together an order variable key
> with an order template record; the create command glues the key,
> and so that template, with: a mark or brand, which becomes the order
> reference; a contract expression; and a quad consisting of the order
> type, quantity, limit price, and aux price --- this quad gives the
> initial value for the mutable arguments of an order, which you may
> attempt to modify via the command of the same name.
> 
> The ruby code above produces in part the trace output below:
> 
>     create item test-pos ibc:266093 at SMART take-pos-aa-090423-13-51-05 LMT 2  5.0  0.0;
>     modify item                           take-pos-aa-090423-13-51-05 MKT 1  0.0  0.0;
>     submit item                           take-pos-aa-090423-13-51-05;
> 
> Analogous commands, given the appropriate binding of an order template to
> the variable name abc-090423-13-51-05 , might be:
> 
>     create item test-pos ibc:12087792 at IDEALPRO abc-090423-13-51-05 MKT 20000 0.0 0.0;
>     submit item                                abc-090423-13-51-05;
> 
> When fed to a risk mode shim from 090327, the above two commands
> work as expected, giving the following log entries:
> 
>     1| 8| 0|bind key:abc-090423-13-51-05         to oid:1;|
>     1|18| 0|risk create item test-pos :30545 at IDEALPRO abc-090423-13-51-05 MKT 20000 0.0 0.0;|
>     2| 3|15|3|15|50|EUR|CASH||0.00||1|IDEALPRO||USD||BUY|20000|MKT|0.00|0.00|GTC||||0|test-pos|0||0|0|0|2|1|0|||||||||CASH::EUR:USD:
>     3| 4| 2|        50|2109|Order Event Warning:Attribute 'Outside Regular Trading Hours' is ignored based on the order type and destination. PlaceOrder is now being processed.|
>     1|21| 0|risk submit item                                abc-090423-13-51-05;|
>     2| 3|15|3|15|50|EUR|CASH||0.00||1|IDEALPRO||USD||BUY|20000|MKT|0.00|0.00|GTC||||0|test-pos|1||0|0|0|2|1|0|||||||||CASH::EUR:USD:
>     3|11| 7|50|EUR|CASH||0.0||IDEALPRO|USD|EUR.USD|0001f4e8.43a0445c.01.01|20090423  13:10:23|DU4181|IDEALPRO|BOT|20000|1.3095|1235252937|8|false|
>     3| 5|10|50|EUR|CASH||0.0||IDEALPRO|USD|EUR.USD|BUY|20000|MKT|0.0|0.0|GTC||DU4181|C|0|test-pos|8|1235252937|false|false|0||1235252937.0/DU4181/100|||||||||0||0|||||||false|false|false|false||reduce on fill without block|false|false||0|LastPrice|
>     3| 3| 6|50|Filled|20000|0|1.3095|1235252937|0|1.3095|8|
>     3| 5|10|50|EUR|CASH||0.0||IDEALPRO|USD|EUR.USD|BUY|20000|MKT|0.0|0.0|GTC||DU4181|C|0|test-pos|8|1235252937|false|false|0||1235252937.0/DU4181/100|||||||||0||0|||||||false|false|false|false||reduce on fill without block|false|false||0|LastPrice|
>     3| 3| 6|50|Filled|20000|0|1.3095|1235252937|0|1.3095|8|
>     3| 5|10|50|EUR|CASH||0.0||IDEALPRO|USD|EUR.USD|BUY|20000|MKT|0.0|0.0|GTC||DU4181|C|0|test-pos|8|1235252937|false|false|0||1235252937.0/DU4181/100|||||||||0||0|||||||false|false|false|false||reduce on fill without block|false|false||0|LastPrice|
>     3| 3| 6|50|Filled|20000|0|1.3095|1235252937|0|1.3095|8|
> 
> As you can see from the error warning, the 1st order template may well
> not be very well suited to currency trades; certainly the value for the
> rth flag is suspect.  Again, you'll want to set up your own order
> templates in the database.
> 
> Thanks,
> 
> Bill
> 
> 
> 
> ------------------------------
> 
> Message: 5
> Date: Thu, 23 Apr 2009 15:31:15 -0400
> From: Bill Pippin <pippin at owlriver.net>
> Subject: Re: [ts-gen] On travel, back next week
> To: trading-shim general mailing list <ts-general at trading-shim.org>
> Message-ID: <E1Lx4df-0003Gl-66 at pippin.first.lan>
> 
> I'll be on travel from now until early next week, and I'll not be
> responding to mailing list posts until I return.
> 
> Thanks,
> 
> Bill
> 
> 
> 
> ------------------------------
> 
> Message: 6
> Date: Tue, 28 Apr 2009 15:36:05 -0400
> From: Bill Pippin <pippin at owlriver.net>
> Subject: [ts-gen] New release supports real time bars subscriptions
> To: trading-shim general mailing list <ts-general at trading-shim.org>
> Message-ID: <E1Lyt65-00074x-Sm at pippin.first.lan>
> 
> The shim now supports real time bars subscriptions, about which
> more below.
> 
> I've just pushed a new release to the web site, and it has already
> shown up there.  It should be used with the newest data tarball,
> data-090415.tgz , and due to significant internal changes as part
> of the ongoing implementation of multiple api version support, the
> shim version has changed from 0.91 to 0.92 .
> 
> The database version has also been incremented, to 1.71 .  Changes
> there consist mostly of a reduction in the number of foreign key
> checks for journal tables, to ensure that journal-related messages
> can be successfully written even when they concern symbols otherwise
> unknown to the database.  This makes journalling more robust even if
> users have added or removed symbols from the database; the design
> perspective behind this choice is that ideally, anything the IB tws
> produces in the way of journal-related messages should be captured
> successfully rather than being discarded.  This change is a logical
> consequence of previous changes whereby contract attributes in journal
> records were denormalized to descriptive text in place of the earlier
> numerical foreign key index form.
> 
> As the first part of work on multiple version api support, the IB
> tws api features to request current time, and for real time bars,
> to make subscription requests and cancellations, are now supported
> by the shim.  The overall api level should still be left at 23, since
> other subscriptions and orders do not yet work properly at newer api
> levels.  See the file exs/bars for examples of the command syntax
> for real time bar subscription requests.
> 
> There are also a number of internal changes related to order request
> construction, and users should test this newest version of the
> shim thoroughly against the paper account before using it for live
> orders; there is more detail in the NEWS file.
> 
> Thanks,
> 
> Bill
> 
> 
> 
> ------------------------------
> 
> Message: 7
> Date: Fri, 24 Apr 2009 10:22:13 -0400
> From: Dave McDaniel <mcdanieldave at hotmail.com>
> Subject: [ts-gen] Installation Issues
> To: <ts-general at trading-shim.org>
> Message-ID: <COL117-W2150E4E94E0D5FBF1D5A00DC720 at phx.gbl>
> Content-Type: text/plain; charset="windows-1252"
> 
> 
> Hello, I am having a problem getting the shim to compile on my system.  I run openSuse 11.0 and  have g++ as shown below, perhaps this has to do with the -O3 bug i read about in archives but can't find that option in the Makefile.
> 
> /shim-090327> g++ --version
> g++ (SUSE Linux) 4.3.1 20080507 (prerelease) [gcc-4_3-branch revision 135036]
> Copyright (C) 2008 Free Software Foundation, Inc.
> 
> Many thanks for your work and any advice on getting this thing cranking,
> Dave
> 
> Here are the some of the error messages I am getting:
> src/../lib/wrap.h:11: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?MinimalModeMultiParadigm?
> In file included from src/rule.h:11,
>                  from src/dictionary.h:28,
>                  from src/glossary.h:47,
>                  from src/main-h.h:11,
>                  from src/main.c:8:
> src/envs.h:25: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?TShimInterpreter?
> In file included from src/dictionary.h:28,
>                  from src/glossary.h:47,
>                  from src/main-h.h:11,
>                  from src/main.c:8:
> src/rule.h:13: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?TShimInterpreter?
> In file included from src/dictionary.h:29,
>                  from src/glossary.h:47,
>                  from src/main-h.h:11,
>                  from src/main.c:8:
> src/meta.h:11: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?TShimInterpreter?
> In file included from src/glossary.h:47,
>                  from src/main-h.h:11,
>                  from src/main.c:8:
> src/dictionary.h:31: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?TShimInterpreter?
> In file included from src/glossary.h:48,
>                  from src/main-h.h:11,
>                  from src/main.c:8:
> src/class_uses.h:11: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?TShimInterpreter?
> In file included from src/main-h.h:13,
>                  from src/main.c:8:
> src/shim.h:11: error: expected ?=?, ?,?, ?;?, ?asm? or ?__attribute__? before ?TShimInterpreter?
> src/main.c: In function ?main?:
> src/main.c:12: error: ?one? undeclared (first use in this function)
> src/main.c:12: error: (Each undeclared identifier is reported only once
> src/main.c:12: error: for each function it appears in.)
> src/main.c:12: error: expected ?;? before ?:? token
> src/main.c:13: warning: control reaches end of non-void function
> make: *** [main.o] Error 1
> 
> 
> _________________________________________________________________
> Rediscover Hotmail?: Get quick friend updates right in your inbox. 
> http://windowslive.com/RediscoverHotmail?ocid=TXT_TAGLM_WL_HM_Rediscover_Updates2_042009
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: http://www.trading-shim.org/pipermail/ts-general/attachments/20090424/bff580df/attachment.html 
> 
> ------------------------------
> 
> _______________________________________________
> ts-general mailing list
> ts-general at trading-shim.org
> http://www.trading-shim.org/mailman/listinfo/ts-general
> 
> 
> End of ts-general Digest, Vol 25, Issue 4
> *****************************************

_________________________________________________________________
Rediscover Hotmail®: Get e-mail storage that grows with you. 
http://windowslive.com/RediscoverHotmail?ocid=TXT_TAGLM_WL_HM_Rediscover_Storage2_042009
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.trading-shim.org/pipermail/ts-general/attachments/20090429/8927d35e/attachment-0001.html 


More information about the ts-general mailing list