Login Page - Create Account

Support Board


Date/Time: Fri, 26 Apr 2024 20:55:42 +0000



[User Discussion] - DOM-Data Spreadsheet

View Count: 2620

[2013-08-20 16:11:23]
AndyL - Posts: 119
Hello,

I made a spreadsheet where i display DOM data using spreadsheet-study and and the "DOM-Data" indicators.

The sheet looks like this:


Quantity x Price
10 x 1.34282
50 x 1.34285
500 x 1.34289
.
.


Now i want to calculate the price for 100 contracts. If this would be a static sheet, it would be easy. But with realtime data and changing quantities i am not sure how to do it. Is there an easy way to do it, or maybe a ready made indicator for this?

Regards,
A.




Date Time Of Last Edit: 2013-08-20 16:12:52
[2013-08-20 18:43:50]
AndyL - Posts: 119
Determining the price of 100 contracts (as per my example) before sending an order is unsupported and hence a user-discussion? I would have thought basic pre-trade price-info is core functionality..
[2013-08-20 20:29:33]
Sawtooth - Posts: 3976
It might be possible but it's not clear to me what you want to do. Please explain again.
[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 - 858 views
[2013-08-21 02:03:40]
Sawtooth - Posts: 3976
Here's a standalone spreadsheet that calculates what you want. It references the DOM Data study's outputs on a spreadsheet study, from columns AA,AB,AC,AD.

The values you want are in B2 and C2. The only cell you edit is A2.




attachmentDOM data.scwbf - Attached On 2013-08-21 02:01:58 UTC - Size: 7.7 KB - 544 views
[2013-08-21 03:06:00]
AndyL - Posts: 119
tom: thanks! Nice spreadsheet skills.

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account