TSLab
TSLab.proSupportTSLab LiveTSVerse
Eng
Eng
  • TSLab trading platform
  • For newbies
    • A beginner's guide
      • Purchasing a license key for a data provider
      • An example of connecting text quotes
      • Example of connecting a data provider to a broker / exchange
      • An example of creating a script in TSLab
      • An example of creating a trading algorithm in TSLab
  • Installing TSLab
    • TSLab Installation Guide
      • System requirements
      • TSLab Installation manual
    • Update TSLab
      • Preparing for update
      • Release build
      • Nightly build
    • Restarting the TSLab program
    • TSLab Changelog
      • TSLab 2.1 Changelog
      • TSLab 2.2 Changelog
        • 2.2.26.0 - 2024/01/31
        • 2.2.25.0 - 2024/01/17
        • 2.2.24.0 - 2024/12/04
        • 2.2.23.0 - 2024/09/19
        • 2.2.22.0 - 2024/08/30
        • 2.2.21.0 - 2024/05/17
        • 2.2.20.0 - 2024/05/15
        • 2.2.19.0 - 2024/02/21
        • 2.2.18.0 - 2024/02/09
        • 2.2.17.0 - 2023/11/16
        • 2.2.16.0 - 2023/10/20
        • 2.2.15.0 - 2023/10/13
        • 2.2.14.0 - 2023/08/11
        • 2.2.13.0 - 2023/05/12
        • 2.2.12.0 - 2023/02/28
        • 2.2.11.0 - 2022/12/15
        • 2.2.10.0 - 2022/10/27
        • 2.2.9.0 - 2022/09/16
        • 2.2.7.0 - 2022/06/23
        • 2.2.5.0 - 2022/04/29
        • 2.2.3.0 - 2022/04/01
        • 2.2.2.0 - 2021/12/29
  • Data providers
    • Cryptocurrency exchanges
      • Binance Cryptocurrency Exchange
        • Registration on Binance
          • Registration on Binance Exchange website
          • Configure Binance Wallet
          • Creating a Binance API Key for TSLab
          • Binance. Transferring USDT from wallet to wallet without commission
        • Registration on TSLab [Binance]
          • Account registration on the TSLab website [Binance]
          • Creating a free Binance Data Provider for TSLab
        • Setting up a Binance Data Provider in TSLab
        • TSLab Binance Edition
          • Starting the program
          • Configuring the Binance Data provider
      • Bitget Cryptocurrency Exchange
        • Registration on the Bitget official website
        • Creating a Free Bitget Data Provider
        • Configuring the Bitget Data Provider in TSLab
      • ByBit Cryptocurrency Exchange
        • Registration on the ByBit website
        • Creating a free ByBit data provider
        • Configuring the ByBit Data Provider in TSLab
      • Deribit Cryptocurrency Exchange
        • Deribit data provider settings
        • Deribit. Frequently asked questions and useful information
        • Deribit. Possible problems and solutions
        • Deribit Margin Requirements Calculation
        • An example of a ready-made script for Deribit
      • Kucoin Cryptocurrency Exchange
        • Registration on the KuCoin official website
        • Creating an API key on the KuCoin website
        • Issuing a free license for KuCoin Data Provider
        • Setting up the KuCoin data provider in TSLab
      • OKX Cryptocurrency Exchange
        • Setting up an OKX account
          • Registration on the OKX website
          • OKX API Key creation
          • Issuing a free license for OKX Data Provider
          • Setting up the OKX data provider in TSLab
          • OKX demo account
        • TSLab OKX Edition
          • First launch of TSLab OKEx Edition
          • Configuring the OKEx data provider
          • Trading in TSLab [OKEx]
          • OKEx Demo
    • Historical Data
      • YahooFinance
      • Offline data provider in CSV format
      • An example of connecting text quotes
      • Text files with historical data
    • Interactive Brokers
      • Getting Started with Interactive Brokers Data Provider
        • Installing and configuring the Trader Workstation (TWS) terminal
        • Installing and configuring the IB Gateway terminal
      • Features of working with Interactive Brokers data provider
      • Known issues for Interactive Brokers Data Provider
      • Loading instruments in a package
  • Working with the program
    • Main menu
      • File
        • Program Settings
      • View
        • Chart
          • Features of working with the Chart in TSLab
          • Chart Controls
        • Depth of Market
        • Quotes
        • All Trades
      • Data
        • Data Providers window
        • Add online data provider
        • Add offline data provider
      • Lab
        • Scripts window
          • Script Container
      • Trading
        • Accounts window
        • Positions window
        • My trades window
        • My orders window
          • Move orders and deals to an agent
        • Autotrading Control Center window
          • Agent window
          • Agent trading settings
            • Event recalculations
            • Slippage
          • "Forget errors" of the agent
        • Orders manager
          • Linking a manually completed order to an agent
        • Agent Control Center window
      • Tools
        • Data backup and recovery
        • Notifications manager
          • Notifications Manager Filters
          • Reference List of Service Message Numbers
          • Example of setting up notifications for Gmail
        • Export to Excel
    • Common interface
      • Status bar
      • Tab
      • Workspace
      • Spreadsheets
    • Visual editor
      • Toolbar
        • Compress and Decompress Blocks
      • List of visual blocks
        • Service Elements
        • Cycles
        • TSChannel
      • The syntax of the Formula, Boolean expression and String expression blocks.
    • Autotrading Control Center
      • Agent trade settings
        • Agent trade settings - Placing orders
        • Agent trading settings - Script execution
        • Agent trading settings - Events
    • TSLab API
      • API Introduction
        • Visual Studio Installation
        • First script (API)
        • First Indicator (API)
        • Script Debugging
        • Logging
      • Writing scripts on the API
        • Trading Instrument Data
        • Working with positions
        • List of deals
        • The order queue
        • Standard Indicators and Handlers
        • Script parameters
        • Caching
        • Local and global cache
        • Multiple Tools
      • Writing indicators on the API
        • Stream indicator
        • Bar indicator
        • Pre-processed indicator
        • Indicator with multiple calculations
      • Additional features
        • The ability to create your own optimizers *
        • C ++ / CLI script
        • API Control Panel
        • Result from script
        • * Оптимизация. Пул массивов.
      • Examples
        • Get script results
        • Get script parameters
        • Get script and agent settings
        • Get position balance (net worth)
        • An example of a strategy Breakout of the Donchian channel
        • Example of a Moving Average Crossover strategy
        • Indicator example
        • How to speed up the processing of a script on the API
        • Links to examples
      • Question - Answer
        • HandlerParameter Attribute
    • Optimization
      • Insufficient load on a multicore processor
  • Examples of scripts and indicators
    • Examples of algorithms and indicators
    • Examples of implementing strategies in TSLab
      • A trading system based on indicator CCI
      • A trading system based on Standard Deviation
      • A trading system based on Aroon
      • A trading system based on ADX and DI technical indicators
      • A trading system based on the RSI indicator
      • Example of a trading strategy without parameters
  • TSLab website
    • TSLab Support Service
      • Memory dump of TSLab application
      • TSLab program log files
Powered by GitBook
LogoLogo

Мы в соцсетях

  • Группа в Telegram
  • Новости TSLab
  • Vkontakte
  • YouTube канал TSLab Live

Наши веб-сайты

  • TSLab
  • Служба поддержки
On this page
  • Scripts window
  • Context menu of the Scripts window
  • Scripts window properties
  • Scripts window columns
  • Buttons for managing objects in the "Scripts" window
  • New script / indicator
  • Change provider at source
  • Download script from server

Was this helpful?

Export as PDF
  1. Working with the program
  2. Main menu
  3. Lab

Scripts window

Last updated 3 years ago

Was this helpful?

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.

  • "Lock" - deletion is prohibited for one of the reasons;

  • "Chain" - there is one or more agents based on this script;

  • "Pencil" - the script is open in the editor.

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.

- scripts;

- indicators.

- script container.