IQFeed_ENG
In TSLab you can connect to multiple brokers and exchanges at once.
If you have no other connections to data providers at the moment, your data providers table is empty.
![](https://doc.tslab.pro/~gitbook/image?url=https%3A%2F%2Fblog.tslab.ru%2Fdownload%2Fattachments%2F11239426%2F1.png%3Fversion%3D1%26modificationDate%3D1525249433594%26api%3Dv2&width=768&dpr=4&quality=100&sign=478459a0&sv=1)
There can be data providers that provide clients only with historical data, so they can be called historical data providers.
In TSLab you can work with providers using text data and csv text format data, we will talk about them later.
In this video we will learn how to connect to IQFeed data provider and we’ll talk about using historical data in TSLab.
Before we create a new data provider in TSLab, we should register on IQFeed website. You can easily find tutorial videos and texts on registration process yourself; basically the only difficulty you can face is a plenty of questions they want you to answer.
We are not going to review this issue here, I think you are a client of IQFeed already. http://www.iqfeed.net
Click the Add button to create a new data provider in this window.
![](https://doc.tslab.pro/~gitbook/image?url=https%3A%2F%2Fblog.tslab.ru%2Fdownload%2Fattachments%2F11239426%2F2.png%3Fversion%3D1%26modificationDate%3D1525249434273%26api%3Dv2&width=768&dpr=4&quality=100&sign=fcd66296&sv=1)
IQFeed provides its clients not only with historical data, but with online data as well. Let’s choose online data.
Let’s give it any name and find our provider in the list.
New data providers can be added to this list only by TSLab programmers or testers.
If you have questions considering a data provider or a broker, or you do not see your broker in the list, please contact TSLab Support Teaam with your concern.
Setting up IQ Feed is absolutely easy as you can apply default settings.
It might be enough to enter your login and password or select a logging level for your provider. TSLab logging cannot be set up at all and it is always active.
If you uncheck the Logging box, the Support Team won’t be able to help you.
![](https://doc.tslab.pro/~gitbook/image?url=https%3A%2F%2Fblog.tslab.ru%2Fdownload%2Fattachments%2F11239426%2F5.png%3Fversion%3D1%26modificationDate%3D1525249434868%26api%3Dv2&width=768&dpr=4&quality=100&sign=8ecb350f&sv=1)
If a data provider has been keeping connection to the server for a couple of days, we can call it rather stable.
Most frequently there can be problems caused by using copy/paste when you may copy an extra space together with your password.
![](https://doc.tslab.pro/~gitbook/image?url=https%3A%2F%2Fblog.tslab.ru%2Fdownload%2Fattachments%2F11239426%2F6.png%3Fversion%3D1%26modificationDate%3D1525249435067%26api%3Dv2&width=768&dpr=4&quality=100&sign=691d1e84&sv=1)
This might happen when you establish connection for the first time. Your broker or historical data provider will inform you about problems with your login/password. Make sure there is no extra space in them.
The other common problem is internet connection. As a rule you receive a notification about failed connection, but this problem may be caused by the data provider as well.
Log folder, you can change the folder if you need.
![](https://doc.tslab.pro/~gitbook/image?url=https%3A%2F%2Fblog.tslab.ru%2Fdownload%2Fattachments%2F11239426%2F7.png%3Fversion%3D1%26modificationDate%3D1525249435175%26api%3Dv2&width=768&dpr=4&quality=100&sign=645c3431&sv=1)
A data provider has been created, I push the Connect button and see that there is an error, let ‘s see…
There is one moment here we should say about. TSLab doesn’t install necessary software of all brokers and providers as there is a variety of them and we cannot know for sure that all of them are what clients demand.
In this case the notification message says that you need to install the dedicated IQFeed software. In other cases you may be informed that some software has not been found and should be installed.
It only means that you do have to open the User Guide at page devoted to this provider and set it up according to the instruction.
It is really easy to install IQFeed.
![](https://doc.tslab.pro/~gitbook/image?url=https%3A%2F%2Fblog.tslab.ru%2Fdownload%2Fattachments%2F11239426%2F8.png%3Fversion%3D1%26modificationDate%3D1525249435328%26api%3Dv2&width=768&dpr=4&quality=100&sign=d0d2204a&sv=1)
Let’s try to establish connection. You do not need to set up the IQFeed client, it will fill in login and password automatically that you entered in the provider settings before.
![](https://doc.tslab.pro/~gitbook/image?url=https%3A%2F%2Fblog.tslab.ru%2Fdownload%2Fattachments%2F11239426%2F9.png%3Fversion%3D1%26modificationDate%3D1525249435548%26api%3Dv2&width=768&dpr=4&quality=100&sign=cbdf6523&sv=1)
We have established connection and can download historical data and current quotes from the markets you have selected in your IQFeed account.
You can receive a key TSLab at tslab.pro
Both sites are identical, registration process is quite simple. Confirm your email address after registration.
In your TSLab account you can purchase access to all available connectors.
After you have selected a data provider, read carefully which type of login you need to create a key.
After payment or getting free access, the key is going to be available in your account at this page and you will receive a message to the email address you registered with.
If you need a data provider you don’t see in the list of the offered ones, please contact our Support Team.
Most likely this connector is being tested at the moment and you also can take part.
You can try demo connectors as well. A demo connector has limited validity and that’s the only difference from trading connectors.
Most likely in future it will have a better name , maybe we will call it a trial period or something like this.
It means that if a broker allows you to connect to testing servers, you can connect to both servers via TSLab, to the trading and to the testing one.
In this case we mean onle TSLab, not the broker servers. There are no limits besides key validity.
IQFeed will be in this list in future as well. At the moment no key is demanded.
IQFeed supplies you both with historical and online data
It can be used not only as a historical data provider but as an additional provider for other brokers having data download limits.
For example you can see the Alternative data provider setting for Interactive Brokers. It can be useful in such cases.
![](https://doc.tslab.pro/~gitbook/image?url=https%3A%2F%2Fblog.tslab.ru%2Fdownload%2Fattachments%2F11239426%2F10.png%3Fversion%3D1%26modificationDate%3D1525249435680%26api%3Dv2&width=768&dpr=4&quality=100&sign=96287612&sv=1)
Create an alternative provider for Interactive Brokers. At the moment IQFeed and NetInvestor can be alternative providers for Interactive Brokers.
You can set up a server connection schedule for any data provider.
Now ,about data themselves…
Open a chart… View… then Chart.
![](https://doc.tslab.pro/~gitbook/image?url=https%3A%2F%2Fblog.tslab.ru%2Fdownload%2Fattachments%2F11239426%2F11.png%3Fversion%3D1%26modificationDate%3D1525249435819%26api%3Dv2&width=768&dpr=4&quality=100&sign=e72c6367&sv=1)
Right-click the chart… Properties…. A little bit about searching for and downloading instruments.
![](https://doc.tslab.pro/~gitbook/image?url=https%3A%2F%2Fblog.tslab.ru%2Fdownload%2Fattachments%2F11239426%2F12.png%3Fversion%3D1%26modificationDate%3D1525249436065%26api%3Dv2&width=768&dpr=4&quality=100&sign=94a980d0&sv=1)
There is a plenty of instruments on the exchange, some brokers do not provide their clients with lists of instruments.
Because of Interactive Brokers connection process routine you cannot subscribe to an instrument by means of API TWS without placing and cancelling an order on this instrument in TWS.
There can be also a problem with getting currencies tickers. You need to place an order on the Forex market to get them.
It means you place an order in TWS, cancel it and then you search for this instrument in the Instrument search window.
![](https://doc.tslab.pro/~gitbook/image?url=https%3A%2F%2Fblog.tslab.ru%2Fdownload%2Fattachments%2F11239426%2F13.png%3Fversion%3D1%26modificationDate%3D1525249436227%26api%3Dv2&width=768&dpr=4&quality=100&sign=dbd48495&sv=1)
Other data providers may not provide the instruments list to their clients when you connect to them for the first time to save your computer resources.
You are supposed to know the name of the instrument,
If you select a date, then the data previous to this date will be saved, and the data, following the selected date, will be downloaded from the server once again.
It literally means that this instrument cache starting from this date will be deleted from your PC and data will be downloaded from the server.
![](https://doc.tslab.pro/~gitbook/image?url=https%3A%2F%2Fblog.tslab.ru%2Fdownload%2Fattachments%2F11239426%2F14.png%3Fversion%3D1%26modificationDate%3D1525249436336%26api%3Dv2&width=768&dpr=4&quality=100&sign=4814fbb&sv=1)
In the previous video I told which folders TSLab uses. Saved data are kept in the cache and cachetrades folders, they have the same level as the log folder.
![](https://doc.tslab.pro/~gitbook/image?url=https%3A%2F%2Fblog.tslab.ru%2Fdownload%2Fattachments%2F11239426%2F16.png%3Fversion%3D1%26modificationDate%3D1525249436608%26api%3Dv2&width=768&dpr=4&quality=100&sign=1e126133&sv=1)
![](https://doc.tslab.pro/~gitbook/image?url=https%3A%2F%2Fblog.tslab.ru%2Fdownload%2Fattachments%2F11239426%2F17.png%3Fversion%3D1%26modificationDate%3D1525249436790%26api%3Dv2&width=768&dpr=4&quality=100&sign=81b5b7ec&sv=1)
If you download this instrument for the first time, most likely you need all the history available, so we cancel all restrictions and click OK.
![](https://doc.tslab.pro/~gitbook/image?url=https%3A%2F%2Fblog.tslab.ru%2Fdownload%2Fattachments%2F11239426%2F18.png%3Fversion%3D1%26modificationDate%3D1525249436932%26api%3Dv2&width=768&dpr=4&quality=100&sign=cd41a6e5&sv=1)
Data will be downloaded from the server after some waiting.
![](https://doc.tslab.pro/~gitbook/image?url=https%3A%2F%2Fblog.tslab.ru%2Fdownload%2Fattachments%2F11239426%2F19.png%3Fversion%3D1%26modificationDate%3D1525249437098%26api%3Dv2&width=768&dpr=4&quality=100&sign=d43ea836&sv=1)
If you are connected to your provider and the Update in Real Time box is checked, your chart will constantly be updated and all the available historical data will be displayed on the chart.
![](https://doc.tslab.pro/~gitbook/image?url=https%3A%2F%2Fblog.tslab.ru%2Fdownload%2Fattachments%2F11239426%2F20.png%3Fversion%3D1%26modificationDate%3D1525249437306%26api%3Dv2&width=768&dpr=4&quality=100&sign=be347364&sv=1)
To restrict historical data volume use such settings as Date from, Maxbars, MaxDays
A simple chart is just a chart, it has its editor. You can attach indicators to a chart; create an algorithm for any calculation that can be displayed on this chart as well.
![](https://doc.tslab.pro/~gitbook/image?url=https%3A%2F%2Fblog.tslab.ru%2Fdownload%2Fattachments%2F11239426%2F21.png%3Fversion%3D1%26modificationDate%3D1525249437475%26api%3Dv2&width=768&dpr=4&quality=100&sign=4fc87f9e&sv=1)
![](https://doc.tslab.pro/~gitbook/image?url=https%3A%2F%2Fblog.tslab.ru%2Fdownload%2Fattachments%2F11239426%2F22.png%3Fversion%3D1%26modificationDate%3D1525249437626%26api%3Dv2&width=768&dpr=4&quality=100&sign=1cdadebb&sv=1)
But a simple chart cannot become a trading agent, so if you need to create a trading robot, to test and optimize it, open the script editor, or the so-called script laboratory.
Choose Scripts, then Create a New Script and build your own algorithm using historical data.
![](https://doc.tslab.pro/~gitbook/image?url=https%3A%2F%2Fblog.tslab.ru%2Fdownload%2Fattachments%2F11239426%2F23.png%3Fversion%3D1%26modificationDate%3D1525249437742%26api%3Dv2&width=768&dpr=4&quality=100&sign=e6a5a9af&sv=1)
![](https://doc.tslab.pro/~gitbook/image?url=https%3A%2F%2Fblog.tslab.ru%2Fdownload%2Fattachments%2F11239426%2F24.png%3Fversion%3D1%26modificationDate%3D1525249437947%26api%3Dv2&width=768&dpr=4&quality=100&sign=9e3b7999&sv=1)
Good luck!
Last updated