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