An example of connecting text quotes
Downloading the test quotes
Please note! The article provides an example of connecting quotes created using a random number generator. Using this instruction, you can connect text data with quotes obtained from other sources.
Please note! The article provides an example of connecting quotes created using a random number generator. Using this instruction, you can connect text data with quotes obtained from other sources.
You can download the text quotes used in this example. To do this, follow the link: Text quotes
As an example, we will be using quotes with a price step of 0.01.
On the page that opens, ready-made text files are laid out. In the scan folder, you can see screenshots of the obtained charts for each text file.
Download the 1.rand.quote.step = 0.01_1m.txt.zip file (the first in the list of files). Go to the directory with the downloaded file. Unzip the 1.rand.quote.step = 0.01_1m.txt.zip file.
For your convenience, we recommend downloading text quotes to the directory C:\ProgramData\TSLab\TSLab 2.1\Providers\Text, since when creating a text data provider, the TSLab program accesses this directory by default.
Creating a Data Provider
Providers section. Adding a Data Provider
Open the TSLab program. In the main menu, select Data - Providers.
In the Providers window that opens, click on the Add button.
Choosing a Data Provider type
In the Add Data Provider window that opens, select Historical Data. Click on the Next button.
In the next step, you need to specify the name of the data provider to be created, and its type. You can specify any name. For the current example, we will use the name TextData.
In the Data Provider Type list, select Text Files. To continue, click on the Next button.
Setting Data Provider Properties
At this stage, you need to specify the directory in which the text file with quotes is located.
Please note! The previously downloaded file must be unzipped.
By default, text files are stored in the C:\ProgramData\TSLab\TSLab 2.1\Providers\Text directory. To specify a new directory, click on the (...) button in the Folder line.
The historical data provider will see all the files of the proper format located in the folder.
Next, you need to set the settings for the data from the text file.
To correctly display the data from the 1.rand.quote.step = 0.01_1m.txt file, you need to set the following parameters:
Number of characters sets the number of decimal places. For the selected example, set the value to 2.
The price step is determined automatically if the step is less than one. If a file with Step = 0.01 is selected, and in the settings it will be indicated that the number of characters = 1, then the program will take Step = 0.1 in its calculations.
After completing the configuration of the Data Provider, click Next. In the Providers window, a new text quotes provider (RandomQuotes) will be added.
Last updated