Join the 80,000 other DTN customers who enjoy the fastest, most reliable data available. There is no better value than DTN!

(Move your cursor to this area to pause scrolling)




"I just wanted to let you know how fast and easy I found it to integrate IQFeed into our existing Java code using your JNI client. In my experience, such things almost never go so smoothly - great job!" - Comment from Nate
"Thanks for all of your help. Great customer service deserves to be recognized which one the reasons I've been a customer of DTN for over 10 years!" - Comment from Stuart
"With HUGE volume on AAPL and RIMM for 2 days, everyone in a trading room was whining about freezes, crashes and lag with *******, RealTick, TS and Cyber. InvestorRT with IQFeed was rock solid. I mean SOLID!" - Comment from Public IRC Chat
"Previously I was using *******. IQFeed is WAY more economical, and for my charting needs is just as good, if not better." - Comment from Public Forum Post
"I have been using IQFeed now for a few years in MultiCharts and I have zero complaints. Very, very rare to have any data hiccups or anything at all go wrong." - Comment from Public Forum
"I would just like to say that IQFeed version 4 is running very well and I am very happy with its performance. I would also like to extend a big thanks for the fast and efficient help that I always receive. My questions and concerns are always addressed promptly. Way to go!" - Comment from Josh in CO.
"I am very happy I changed. I love the product, but more so I am thrilled with Tech Support. You are knowledgeable, polite, pleasant and professional." - Comment from Pat
"I just wanted to let u know that your data feed/service is by far the best!!! Your unfiltered tick data is excellent for reading order flow and none of your competitors delivers this quality of data!" - Comment from Peter via Email
"Thank God for your Data Feed as the only Zippers I see are on my pants (LOL), and no more 200 pip spikes to mess up charts." - Comment from Spiro via Email
"Its working FABULOUSLY for me!! Holy cow...there has been so much I've been missing lately, and with this feed and Linnsoft software...I'm in the game now." - Comment from Chris R.
Home  Search  Register  Login  Recent Posts

Information on DTN's Industries:
DTN Oil & Gas | DTN Trading | DTN Agriculture | DTN Weather
Follow DTNMarkets on Twitter
DTN.IQ/IQFeed on Twitter
DTN News and Analysis on Twitter
»Forums Index »Archive (2017 and earlier) »IQFeed Developer Support »infer trade type
Author Topic: infer trade type (3 messages, Page 1 of 1)

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
 

 

Time: Fri May 17, 2024 5:48 AM CFBB v1.2.0 6 ms.
© AderSoftware 2002-2003