stock777 Posted July 13, 2018 Report Share Posted July 13, 2018 I think I looked for this a while back and could not find it. I'd like a script to be able to access the current bid/ask size. Can we currently do this? Quote Link to comment Share on other sites More sharing options...
Mike Medved Posted July 14, 2018 Report Share Posted July 14, 2018 I never exposed that data to the scripts, mostly because not all data sources supply it and when/if they do, it is often not that accurate... Quote Link to comment Share on other sites More sharing options...
stock777 Posted July 16, 2018 Author Report Share Posted July 16, 2018 hmmm. I can tell you IB is accurate, though amtd only shows the primary exchange, stupidly. I'm not aware of any source that doesn't supply b/a, If possible, I'd like to have access to the b/a , hopefully its not a big deal to add that . Quote Link to comment Share on other sites More sharing options...
Mike Medved Posted July 17, 2018 Report Share Posted July 17, 2018 Will do. Quote Link to comment Share on other sites More sharing options...
stock777 Posted July 18, 2018 Author Report Share Posted July 18, 2018 Thanks! Quote Link to comment Share on other sites More sharing options...
stock777 Posted August 16, 2018 Author Report Share Posted August 16, 2018 (edited) Bid size working well. Wondering how I would be able to track CHANGES in size over time. Is that possible ? Probably have to set up an array and do a compare is my guess, but could use some guidance. Edited August 16, 2018 by stock777 Quote Link to comment Share on other sites More sharing options...
Mike Medved Posted August 17, 2018 Report Share Posted August 17, 2018 Changes in size are way too chaotic/frequent. You'd have to save it on every tick, not on every candle - and that's a lot of data. You know how you have a FIFOQueue? I recently added a TimedQueue. Instead of saving N values, it stores N seconds' worth of values - each value (internally) has a timestamp and it gets removed as it goes out of the time scope. As it is now, you don't get to set the timestamp of the value, it gets set to the current system time at the time you're adding it. This would allow you to store let's say 60 seconds minutes worth of bid/ask sizes and be able to analyze them. Note that unlike FIFOQueue, you would not need to save/restore it as a state variable. Just keep adding the new values to it. Quote Link to comment Share on other sites More sharing options...
Jason Posted August 21, 2018 Report Share Posted August 21, 2018 (edited) This would be quite valuable. With every executed order that prints if we could pull the bid and ask and store it to say, measure how much the spread fluctuates over a given time frame... You could create an indicator to measure spread volatility. Might provide some really good insight into how dangerous a particular stock would be to trade. Edited August 21, 2018 by Jason Quote Link to comment Share on other sites More sharing options...
Jerry Medved Posted August 25, 2018 Report Share Posted August 25, 2018 dealing with spreads is not a problem - bid/ask are stored. what isn't stored is the bid/ask size. That isn't likely to change Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.