Login Page - Create Account

Support Board


Date/Time: Thu, 27 Feb 2025 04:59:47 +0000



[Programming Help] - Write 1 trade bar data to file with Bid/Ask size at time of sale

View Count: 667

[2021-06-03 17:59:03]
User339484 - Posts: 71
What I am trying to do is write every trade to file as well as the bidsize and asksize at the time of trade.

So if there was a resting bid of 200 and someone sells 50 into it, it would say
Bid volume: 50
Bidsize:200
NOT
Bidsize:150



I have tried using the write to file study with market depth bars set to 1, but it leaves a lot of blank zeros.
These numbers also don't match the time and sales Asksize/Bidsize.

What would be the best way to go about doing this?

Thanks!
Date Time Of Last Edit: 2021-06-03 17:59:53
Private File
[2021-06-04 17:47:02]
User339484 - Posts: 71
What I am trying to do is have 4 indicator rows.

Row 1:
1 trade chart

Row 2:
Ask size at time of trade (only 1 depth)

Row 3:
Ask Volume and Bid volume

Row 4:
Bid size at time of trade (only 1 depth)


What I have tried is:

Both old and new market depth bars. Set to 1 depth. This does not work it skips trades. Seems glitched, also the numbers don't match time and sales.

I used the time and sales bid and the time and sales ask columns. From there I referenced the study with a code so it locks in the last number. This looked like it was working but if you see in the picture when I am writing to file the bidsize and asksize at time of trade are not matching up.
imagedepth1.png / V - Attached On 2021-06-04 17:39:08 UTC - Size: 330.87 KB - 212 views
[2021-06-10 14:47:47]
User339484 - Posts: 71
Any idea?
[2021-06-10 16:54:42]
User339484 - Posts: 71
IS THERE NO WAY TO GET A VALUE OF THE BEST BID AND BEST ASK AT TIME OF EACH TRADE?

MARKET DEPTH BARS OLD VS NEW VS TIME AND SALES ALL SHOW DIFFERENT BEST BID/ASK QUANITITY
[2021-06-12 16:14:21]
User339484 - Posts: 71
Still trying to do this.
[2021-06-14 17:45:57]
User339484 - Posts: 71
Still can't get this working
[2021-06-14 18:38:22]
User907968 - Posts: 833
ASCIL code for everytime best bid or best ask updates value? | Post: 269130

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

Login

Login Page - Create Account