Scripts window
Scripts window
To manage scripts and indicators, use the "Scripts" window, which can be opened by selecting the Main menu item: Lab - Scripts.
The workspace of the Scripts window has a tree structure. The root folder is called Catalog. You can add additional subdirectories by clicking the Add Folder button.
The drug'n'drop technology works in the workspace of the Scripts window. You can drag and drop files and directories by holding down the left mouse button.
In the Scripts window, you can create a trading script and an indicator. These are two different entities in TSLab, and each of them has its own characteristics. Therefore, they are placed in 2 different groups.
Scripts and indicators have a graphic designation as an icon:
A kind of script is a script container. The script container is an encrypted script. The container may have a limited expiration date. To use a container, you need a key provided by the container author.
Graphic designation of containers in the Scripts window:
Context menu of the Scripts window
The context menu is available by pressing the right mouse button in the workspace of the Scripts window.
Menu item | Description |
---|---|
Properties | Properties of the "Scripts" window. |
Collapse all | Collapses all folders in the workspace of the Scripts window. |
Expend all | Expands all folders in the workspace of the Scripts window. |
Show at | Moving the window to one of the existing sheets. |
Clone window | Create a copy of the "Scripts" window. |
Scripts window properties
"Properties" can be opened:
from the context menu of the "Scripts" window;
using the "Properties" button located on the window's title bar;
by selecting the Main menu item: Edit - Window Properties
Menu item | Description |
---|---|
Columns | Selecting columns displayed in the workspace of the Scripts window |
Font settings | Select font type and size. |
Window caption in floating mode | Hide/Show window title. |
Columns caption | Hide/Show Column Headers |
Scripts window columns
Menu item | Description |
---|---|
Name | Contains directories of scripts, indicators and containers. |
Status | Shows the status of a script, container, or indicator.
|
Expiration date | The expiration date of the object (container). |
Creation date | The date the object was created. |
Modification date | The date the object was modified. |
Tags | You can enter a tag for an object. |
Comments | Comment for an object. |
Buttons for managing objects in the "Scripts" window
Button | Description |
---|---|
Create new script | Creates a new script. |
New indicator | Creates a new indicator. |
Edit | Opens the script in the editor. |
Copy | Creates a copy of the selected script. |
Delete | Deletes the selected script, container, or folder. |
Rename | Changes the name of the selected object. |
Change provider in sources | Allows you to change the Data Source in a script without entering the Script Editor |
Load from file | Loads a script from an external file. |
Download script | The TSLab team has prepared examples of scripts and strategies that can be downloaded directly from the TSLab server |
Save to file | Saves the script to an external file. |
Bulk script export | Saves all existing scripts to one file. |
Add folder | Creates a new folder in the Script window. If the cursor is inside an existing folder, a child folder is created. |
Load container | Calls the container loading helper. The loaded container will be displayed in the tree structure of the window. |
Create container | Calls the container creation helper. |
Container parameters | Characteristics of the container, set by the author when creating it. |
Replace container | Calls a dialog box to replace the selected container with its new version. |
Add agent | Opens the agent creation dialog. |
New script / indicator
When you click on the Create new script and New indicator button, you will be prompted to create a new script or indicator. To create a new object, enter its name and click the OK button. The created object will be added to the workspace of the Scripts window.
Scripts contain a trading strategy created by you. Trading agents are created on the basis of scripts.
To start working with the script, double-click the left mouse button on the line with the created object, or select the object and click the Edit button located in the right part of the Scripts window. The TSLab Lab window will open.
Change provider at source
Usually, in order to change the Data Provider in a script, you need to open this script for editing, enter the Script Properties, find the menu item responsible for the source of trade data and make the necessary changes. To speed up this process, you can use the Change provider in source button.
In the Change provider in source window, 2 drop-down lists will be available. In the first one, you can select the data provider to replace, and in the second, the new data provider. Press the OK button to confirm the replacement.
Download script from server
The TSLab team has prepared demo examples of scripts, trading strategies and indicators. All of them are available for download from our server directly into the program.
Please pay attention. All scripts available for download are demo scripts. We strongly recommend that you do not run them on real trading accounts. TSLab is not responsible for possible losses when using these demo materials on real trading accounts.
Clicking the Download script button will open a window with a list of scripts available for download.
To download the selected example, click the Download button. After the script is loaded, it will be available for opening in the Scripts window.
Last updated