Hi all. Does anyone know of a way to get time and sales for a group of stocks at a particular time of day? For example, say I want to retrieve the prices of where 100 different stocks were trading at 1 hour before the close. I was hoping to write something in excel because VBA is the only thing i know. Thanks
Announcement
Collapse
No announcement yet.
get time and sales from esignal to excel
Collapse
X
-
overbet,
For example, say I want to retrieve the prices of where 100 different stocks were trading at 1 hour before the close.
Getting a historical price bar would be much easier then actually trying to pull an hour’s worth of T & S data for 100 symbols.
With bar data you can limit the amount of data by passing a time variables for the data. All Time and Sales request are done in days. You'll receive the tick data from the moment of the request back to the start of the day. Once you would all the data you need you could then discard the remaining data.
QLINK— eSignal QLink is a Dynamic Data Exchange (DDE) add-on service that makes it quick and simple to download real-time, streaming data into your Excel worksheets. You can then perform further analysis suited to your market and your strategies for trading that market.
Here is KB Article 4185 on QLINK and the functions available for retrieving historical T & S data as well as Historical Bar data.
Active X API-- eSignal Desktop API--- this would allow you to program in VBA requesting historical bar data. With the history request as method above would allow you to specify the time span of the data (see below)
eSignal.RequestHistory(“sSymbol”, 1, “btBars”, 60, 780, 870). Here is the breakdown of the request.- sSymbol-- The symbol for the data request
- 1--- Interval of the request ( 1minute bars)
- btBar—Bar Type
- 60--- number of bars to return
- 720 Time of the first bar (12 pm PST)
- 750 Time of the last bar (1:30 pm PST)
The start and end times are computed as:
(Number of hours * 60) + Minutes
For example, if start_time = 570 and end_time = 960, the request scans for data between 9AM and 4PM each day that applies to the request.
Hopefully this isn't too much information and is clear. Please let me know if you have any questions.
Another note is the number of symbols your requesting would be taxing on any solutions provided. To prevent overloading of the eSignal history servers we try and limit the number of history request (symbols) per History connection. It might be easier to break up the request is to smaller subsets and processing each subset separately.
Comment
-
Thank for the help. To clarify what I would like to do: It does not need to be real time I want to back test strategies. For example say I want to test buying a dozen or so oil stocks on the open. I then would like to know what they were all trading at say 15 minutes after the open then again 30 minutes after the open and so on. So I think I do not need full day tick by tick time and sales. Is your suggestion still the best or is there something else you recommend now that I have clarified? i think the qlink looks like it will work i will try it today. Thanks JasonLast edited by overbet; 05-25-2010, 09:31 AM.
Comment
-
BTW, you get the first month free when you add QLink to your account so you can basically test all this out for free.
Thanks.
Comment
Comment