NexusFi: Find Your Edge


Home Menu

 





How does Interactive broker calculate the buy/sell volume


Discussion in Platforms and Indicators

Updated
    1. trending_up 3,328 views
    2. thumb_up 7 thanks given
    3. group 3 followers
    1. forum 6 posts
    2. attach_file 0 attachments




 
Search this Thread

How does Interactive broker calculate the buy/sell volume

  #1 (permalink)
gully
Bangalore
 
Posts: 4 since Sep 2016
Thanks Given: 3
Thanks Received: 1

I am requesting for time and sales data of a script via the following command
 
Code
client.reqMktData(1003, contract, "233", false, false, null);
In the
 
Code
public void tickString(int orderId, int tickType, String value) {}
I get the value of the time and sales in the following format.

Quoting 
;296.05;207000;1500352218838;12654000;294.26000316;true
tickPrice,executed volume,time,totalvolume,vwap.

How do I determine whether it is a uptick or downtick where is that information available?Attaching the picture of the time and sales window which has the red/green dots.Okay here since I donot have enough posts to give pictures.

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Are there any eval firms that allow you to sink to your …
Traders Hideout
ZombieSqueeze
Platforms and Indicators
Futures True Range Report
The Elite Circle
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
NexusFi Journal Challenge - April 2024
Feedback and Announcements
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Get funded firms 2023/2024 - Any recommendations or word …
61 thanks
Funded Trader platforms
39 thanks
NexusFi site changelog and issues/problem reporting
26 thanks
Battlestations: Show us your trading desks!
26 thanks
The Program
18 thanks
  #2 (permalink)
 choke35 
Germany
 
Experience: Intermediate
Platform: Other
Trading: ES, YM, 6E
Posts: 2,668 since Feb 2013
Thanks Given: 5,101
Thanks Received: 6,558

There are virtually hundreds of posts about IB snapshot data here on FIO that explain why
it's pointless to use them for such calculations. What you need first is a realtime tick-based
data stream that also shows bid / ask for every tick.

Reply With Quote
Thanked by:
  #3 (permalink)
gully
Bangalore
 
Posts: 4 since Sep 2016
Thanks Given: 3
Thanks Received: 1


I have done that. I am receiving the live quote...now I am interested in the time and sales data and therefore the question comes how can I calculate the uptick or downtick from the API itself

Reply With Quote
  #4 (permalink)
 
amoeba's Avatar
 amoeba 
Sydney, NSW, Australia
 
Experience: Intermediate
Platform: Sierra Chart, Python, C#
Broker: Interactive Brokers
Trading: MJNK, ASX, SPI
Posts: 205 since Jan 2014
Thanks Given: 98
Thanks Received: 284

I think what Choke35 meant was find another source of live tick data.

The IB live stream provides random snapshots of volume data at best.

The 5sec real snapshot data is accurate, but losses buy/sell volume breakdown (and is not tick based)

Reply With Quote
Thanked by:
  #5 (permalink)
gully
Bangalore
 
Posts: 4 since Sep 2016
Thanks Given: 3
Thanks Received: 1

Thanks for the suggestion. The problem is I am looking for data in NSE-India exchange. There are hardly any vendors who distributes exchange of this data. If there are any,the cost is abominable. Therefore the struggle..

Reply With Quote
  #6 (permalink)
 
amoeba's Avatar
 amoeba 
Sydney, NSW, Australia
 
Experience: Intermediate
Platform: Sierra Chart, Python, C#
Broker: Interactive Brokers
Trading: MJNK, ASX, SPI
Posts: 205 since Jan 2014
Thanks Given: 98
Thanks Received: 284


gully View Post
Thanks for the suggestion. The problem is I am looking for data in NSE-India exchange. There are hardly any vendors who distributes exchange of this data. If there are any,the cost is abominable. Therefore the struggle..

Ah, yeah I understand, similar issue with data for ASX equities, which I use IB data for.

I record both the live stream data from IB and the live 5s true snapshot, for volume based calcs (like VP, VWAP) I use the 5sec data as the volume is accurate.

For bid/ask prices I use the live realtime data.

But there is no accurate way to calculate tick volume or volume delta.

Reply With Quote
Thanked by:
  #7 (permalink)
gully
Bangalore
 
Posts: 4 since Sep 2016
Thanks Given: 3
Thanks Received: 1

For other people stumbling in this thread on the same question .Here are my findings.

1. IB doesnt give any parameter in their API response data where you would know it is an uptick of downtick. However you can compute it by also streaming the current bid and ask. However here is the catch. The information can be erroneous. What IB sends is snapshot data(it has a delay of 250 ns). Therefore any time and sales data arriving,you wouldnt know whom to reference to in order to find whether the current tick is uptick or downtick.

2.IB gives a feature as to get all the historical T&S data in the TWS software. However this historical T&S is not available via APIs

Reply With Quote
Thanked by:




Last Updated on July 19, 2017


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts