nto
-Interested User-
Posts: 14
Joined: Jan 18, 2016
|
Posted: Apr 7, 2016 10:15 AM
Msg. 1 of 3
Q,BD#,164.28,5,10:51:59.384000,68,583012,164.28,104,164.29,201,164.00,164.39,163.82,163.90,C,01, Q,BD#,164.28,5,10:51:59.384000,68,583012,164.28,80,164.29,205,164.00,164.39,163.82,163.90,ba,01,
How do you infer the trade type from this? We see here that ask_size went from 201 to 205 and that bid_size went from 104 to 80 but nothing tells me with a 100% certainty whether the trade was an ask or a bid. I know that Sierra Chart can figure it out with IQFeed data. What is the algorithm I need to use to infer the trade type?
|
DTN_Tim Walter
-DTN Guru-
Posts: 1238
Joined: Apr 25, 2006
|
Posted: Apr 7, 2016 11:00 AM
Msg. 2 of 3
We do not send that information as a flag within our data feed, so I can't say matter of fact how Sierra Charts might be doing this.
But, generically speaking, bid and ask prices, within a trade message, are indicative of the state of the market immediately preceding a trade.
So in the case,
Q,BD#,164.28,5,10:51:59.384000,68,583012,164.28,104,164.29,201,164.00,164.39,163.82,163.90,C,01,
The market had a previous bid of 164.28 and a previous ask of 164.29, so in order for a trade of 164.28 to have occurred, a new ask must have come in to meet the pre-existing bid for a trade to have occurred.
So the general answer would be to look at the price and compare it to the bid and ask, of the same message, and that should give you the information you need to flag the trades.
Tim
|
nto
-Interested User-
Posts: 14
Joined: Jan 18, 2016
|
Posted: Apr 7, 2016 11:03 AM
Msg. 3 of 3
Thanks Tim,
I just figured it out when I received your answer :)
That was obvious. I should have RTFM more
|
|
|
|