Connecting to IQFeed from Seer
Trading Platform Software for backtesting & auto trading, for stock, futures and forex trading systems › Forums › Tutorials › Connecting to IQFeed from Seer
June 17, 2013 at 9:50 am #2902
To use IQFeed, you need to download and run the IQFeed client software. To download the IQFeed client go to the following web page:
Under the support section you’ll find a link download client. Click this link and download the latest version of IQFeed. Once downloaded, run and follow installation instructions. If you do not have the IQFeed client installed, you will receive the following error message:
Seer will automatically connect to IQFeed and the window below will be dispayed. Enter your DTN IQFeed user id/password to connect.
Once Seer has connected to IQFeed it will maintain it’s connection until Seer exits. If Seer is not using this connection (for data download or symbol search) then the bandwidth will be extremely low with minimal CPU usage. Seer will happily coexist with any other application using IQFeed.
Automatically handle stock Splits
When this option is checked stock splits will automatically be adjusted for. In most cases, this option should always be checked.
Concurrent Data Requests
When fetching historical data or when an account is deployed Seer needs to request data from IQFeed servers. To speed up this process, especially when a large number of symbols are used, Seer can issue multiple requests simultaneously. For machines with low RAM and/or only one processor, this value should be set low (1 or 2). For larger machines, 16 or 32 can be selected. The actual speed up will depend on your network connection.
IQFeed Heartbeat and Tick Time Stamp Generation
There are several ways to generate a hearbeat from a tick stream which in turn is used to close time based bars and trigger events within a deployed account. There is no correct way to close time based bars with each approach having advantages and disadvantages. Only with hindsight can a tick stream be guaranteed to be constructed 100% correctly.
As an example, consider the following tick stream that will be used to construct 1 minute bars:
Time Price Size
11:46:45 50.42 100
11:46:48 50.43 100
11:46:55 50.42 100
11.47:04 50.41 100
Using hindsight (having all ticks available) you can construct 1 minute bars that will be 100% correct. However, consider the ticks arriving as a stream, one tick at a time. Only when the last tick arrives (4 seconds after the close of the 1 minute bar) can the 1 minute bar be constructed.
Derive heartbeat from symbol last trade
When this option is selected Seer will use the timestamp on the tick to construct bars.
When this option is selected the 1 minute bar can only be closed at 11.47.04 (and therefore the bar event triggered in an deployed account) as the datastream does not have enough time granularity to close the bar at the 1 minute boundary. In this case, the bar will close 4 seconds late but would be constructed correctly.
Derive heartbeat and tick time stamp from IQfeed market time event
When this option is checked the timestamp of the tick is altered to match the market time event that is sent by IQFeed. A heartbeat tick is then injected into the tick stream. The market time event is generated from within IQfeed’s servers and has 1 second granularity. This option however, may result in mistimed ticks. This is because of fine grain rounding that will occur on the time generated by IQfeed or the timestamp on the exchanges. Any reported mismatches are displayed in the field Number of mistimed ticks.
In the above example, market time events will fire every second, resulting in the bar being closed on time and will be constructed correctly.
Derive heartbeat and tick time stamp from local clock
When this option is checked the time stamp of the tick is altered to match the local clock. A heartbeat tick (driven from the local clock) is then injected into the tick stream. This option however, may result in mistimed ticks. This may be due to many reasons, such as the local clock not having the right time, network latency (the time taken for the tick to arrive to your machine from the exchange) and fine grain rounding on your local clock. Any reported mismatches are displayed in the field Number of mistimed ticks.
In the above example, the heartbeat will fire every second, resulting in the bar being closed on time and will be constructed correctly.
If this option is selected, it is extremely important to make sure your local machine is regularly synced to have the correct time. This should be done on an automated basis, and depending on the clock drift on your specific machine may need to happen regularly.
What is a mistimed tick and is it a problem?
A mistimed tick is when the time stamp on the tick has been changed to match the heartbeat. The heartbeat is important as it drives the closing of (time) based bars and any events that are dependent on them. Without a generated heartbeat a bar may not close “on time”. You have a choice in which you prefer, 100% correct construction of time based bars, but potentially “late”, or bars that are constructed on time but potentially “wrong”.
A mistimed tick is only a problem when it occurs at the boundaries of bars that you use. The larger the time frame the less likely a mistimed tick will cause a problem. When a mistimed tick occurs at the boundary of a bar, that tick will be included in the incorrect bar. This will result in incorrect volume, and depending on the actual price change of the tick, potentially incorrect open, close, high and low values.
Notes on using Live data Streams
When requesting a live data stream, the data often needs to be joined to a historical stream of data. For example, when a streaming chart is displayed it needs historical data to show what has happened before the current time. Seer will always request historical data from IQFeed to ensure that it has the most up to date information. When joining live streams to historical data there is a chance that several ticks many be included more than once, or not included at all. This only will only effect one bar.December 3, 2013 at 10:57 am #4030
What about the millisecond timestamp you now get from IQFeed?
Is sear able to deal with this ?
Can I access this programmaticaly?
JojoDecember 4, 2013 at 9:23 am #4032
Currently we don’t use the millisecond timestamp from IQFeed, but it is something that we’re watching in terms of adding support.
Why would you need resolution down to this level?
You must be logged in to reply to this topic.