Login Page - Create Account

Support Board


Date/Time: Sat, 23 Nov 2024 23:35:52 +0000



Post From: DOM-Data Spreadsheet

[2013-08-21 00:05:48]
AndyL - Posts: 119
tom: often i want to trade more size than what is available on the first level of the marketdepth. For example, i want to sell 100 contracts, but there are less than 100 contracts available on the best bid - in my example above 10 contracts.

In my example above, if i would send a sell-market order for 100 contracts, it would sweep the first 2 levels of the book and eat 40 contracts into the third level. The average price of the position would be: (10*1.34282 + 50*1.34285 + 40*1.34289)/100 = 1.34286

This is the price that i want to display in the spreadsheet - just the price of 100 contracts according to the current DOM snapshot. Simple enough for this static example - but with realtime updates its more complicated. Sometimes there are 100 contracts available on the best bid, sometimes its spread out over 2 or more levels of depth. I suppose i would have to somehow loop over the dom-data, add up prices until i have 100 contracts - but i suppose this wont work with spreadsheets alone.

P.S. i attached a screenshot from the spreadsheet, maybe it explains it better
Date Time Of Last Edit: 2013-08-21 00:16:50
imageSierra-DOM-Sheet.png / V - Attached On 2013-08-21 00:15:40 UTC - Size: 806.43 KB - 892 views