tws api question...

Discussion in 'Automated Trading' started by frostengine, May 4, 2006.

  1. Ok, so you run reqmarketdata... so now all of this market data is comming in. You have the tickSize and tickPrice messages being caputred....

    My question is, if you capture tickSize for the last tick, you now know the size of the last trade.... how do you know if that was a down tick or an uptick? Such as in the Trader work station you see the down ticks for last size shown in red...... how does the work station distinquish between up adn down ticks for that size? How can this be done via the api..

    thanks
     
  2. i think its this simple: compare current last and previous last price. :D
     
  3. lol.. you know that is so simple it might just work ;)
     
  4. just a technicality since I notice quite a number of folks make an oversight of this miniscule detail. When saying an up/down tick, are you trying to differentiate between a new BID/ASK pair or simply a lastprice to lastprice comparison between sequential ticks...

    Let me explain a bit. For every BID/ASK pair, trades fire at both the BID or the ASK. It breaks down to all LONGS are executed at the ASK while all SHORTS are executed at the BID. So, a LONG tick followed by a short tick at the current BID/ASK pair will result in an uptick according to what was suggested in the earlier post. However, there are cases where there is a LONG followed by a SHORT and it is at the same exact price but does not result in an uptick simply because between the two ticks the BID/ASK pair bumped up to a higher BID/ASK pair... If this explanation causes confusion, ignore it for your purposes...

    The second issue is that marketdepth SNAPSHOTS at a rate of 1 every 700msec. This means that if you are using the marketdepth to determine uptick/downtick, you are not seeing every tick but rather evaluating an uptick/downtick of ticks that occur 700msec apart. The work around of course is to use, the stream as opposed to marketdepth where the field is something like tik!req? something or other as opposed to mktdepth?...

    You can check the API for the details...

    Kind Regards,
    MAK
     
  5. IMHO, the above is at best confusing.
    What is a LONG tick? You seem to suggest something different from an uptick. If so, how do you spot your LONG tick?
     
  6. My comment was to point out that upticks/downticks are flawed by design. All transactions that occur at the bid are SHORT ticks (ie. ticks where the transaction is a SHORT). All transactions that occur at the ask are LONG ticks (ie. ticks where the transaction is a LONG). Upticks/Downticks only tell you about sequential price level executions with respect to each other. In other words, a Downtick isn't always a short trade and an Uptick isn't always a LONG trade. Were upticks/downticks constructed according to the SHORT/LONG manner, then IMO, they would be accurate... If your T&S is color coded, you can see the difference between the uptick/downtick indicator and T&S color coding scheme...
     
  7. So if a trader who is Long sells to the BID to bail out and is filled from a guy who was short buying the BID to bail out where is the SHORT ? Here is some knowledge for today : In this example who gave up the edge and who received the edge?

    Chase the rabbit MAK and don't forget the shrooms or hookah.
     
  8. I wouldn't use 'edge' for that.