[ts-gen] tracing order fills

Nils Gebhardt mail at ngebhardt.de
Sat Sep 15 12:21:22 EDT 2007


After issuing orders via shim, I get new entries in table OrderJournal. 
However, these stay in a state of pending even if they are filled. 

For example:

order(39,LMT,Submit,1,114.07,0.0,0);

'39' some new LineItem, results in  

|  14 |  39 |   1 | NULL | Pending |        1 |  114.0000 |    0.0000 |
0.0000 |    0.0000 |    0 |         0 | 2007-09-13 20:24:50 |


(appearently there is a problem with the decimals, there is a wrong
price in the colomn with the last decimals set to zero)
and an empty set in Executions, though there is a fill message in
syslog 

Sep 13 20:29:55 vneumann : 26780|73795| 365195257|3| 3| 6|1|Filled|1|0|
114.07|852021454|0|114.07|26780|

and a fill visible in tws of course. 
Is there anything missing to make shim the accountance stuff?  
I haven't figured out what triggers the syslog entry, 
appearently only the order firering process is writing related fill
messages, exiting to early results in missing fill
message also for market orders, right? 



Really great would be some kind of a 'position information' related to
the position table, essentially two more columns or so to the position
table: 
the number of open contracts, and a P&L figure, maybe splitted realized
und unrealized. 
The open contracts information leads me to the question: in the chain :
Position ->... -> LineItem =>some order, how is it possible to  
trace a fill message back to a position? 

Position seperated (not contract wise aggregated as you have it in tws!)
P&L needs upon detailed position accountance valuation and 
might be out of the shim design scope(?), though in my opinion it is an
extremly important point 
especially in this api-drive area with a wide market approach, where you
place your ideas in some sort of hierarchies of positions and have 
to evaluate them - that is, expose it to the market.  The possibility to
do that in a systematic and detailed way would turn the 
shim into an even more superior tool. 

nils



More information about the ts-general mailing list