# Restarting the TSLab program

## Restarting the TSLab program

{% hint style="warning" %}
The TSLab development team recommends restarting the program using only standard application management tools.&#x20;

* Stopping an application through the Windows "Task Manager" is not a standard tool and can lead to data loss;&#x20;
* Stopping the application through the Windows "Task Manager" will result in the loss of tick charts.
{% endhint %}

### Manual reboot&#x20;

You can restart the program by selecting the **Main menu -> File -> Restart**.

<figure><img src="https://45805883-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MaCiHiFV0s-5gqtvIid-1703796690%2Fuploads%2FOFXKDRHpI7CriEOr8nJo%2Ftsl_restartProg.png?alt=media&#x26;token=f8c9c79c-588f-47c1-8dc3-679b1027f16f" alt=""><figcaption></figcaption></figure>

Restart can be done by completely stopping the program. Correct stop of the application using standard controls is performed by clicking on the **"X"** in the upper right corner of the TSLab main window. Also, to stop the TSLab application, you can select the main menu items **"File" -> "Exit"**.

Then run the program using standard tools, for example, using a shortcut from the desktop.

<figure><img src="https://45805883-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MaCiHiFV0s-5gqtvIid-1703796690%2Fuploads%2F7Nk1fPItosowDrEih3Xi%2Ftsl_shurdownProg.png?alt=media&#x26;token=adf76fc1-0a49-4d69-a149-4334971c0859" alt=""><figcaption></figcaption></figure>

#### Saving configuration and scripts&#x20;

When you stop the application, you will be prompted to save the current TSLab configuration. The mode of saving the configuration on exit can be changed in the program settings. If you select **Always** save - then saving will be not only the configuration, but also all open scripts of the laboratory.

<figure><img src="https://45805883-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MaCiHiFV0s-5gqtvIid-1703796690%2Fuploads%2FwxeGfVbJ21RDURV8Thwf%2Ftsl_saveConfOnExit.png?alt=media&#x26;token=aa949abc-ddb9-4752-996c-4ff7d6eef6e9" alt=""><figcaption></figcaption></figure>

### Scheduled reboot

We strongly recommend that you set up an automatic restart of the program according to a schedule once a day, preferably during non-trading hours. If, at the same time, Automatic connection to the broker according to the schedule is set in the Data provider window, disconnection / connection to the broker will occur automatically.

<figure><img src="https://45805883-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MaCiHiFV0s-5gqtvIid-1703796690%2Fuploads%2F3myRiHvQmbz6N1naSapJ%2Ftsl_sheduledRestart.png?alt=media&#x26;token=f384e554-de0a-41dd-ae14-12312cdc3661" alt=""><figcaption></figcaption></figure>

{% hint style="success" %}
In the main menu section **"File" - "Program settings"** it is possible to select the mode of saving the configuration on exit. Available modes:&#x20;

* **By request** - a request to save the configuration will be issued every time the application is stopped&#x20;
* **Always** - the configuration will be saved automatically every time the application is stopped&#x20;
* **Never** - the application will be stopped without saving the configuration.

**Note!** In order for the selected settings to be saved, you must create at least one configuration file. Make sure you have the **"Load recent workspace"** option enabled.
{% endhint %}

When the application is stopped, the accumulated tick cache (trades by instruments) will be automatically saved to the hard disk and the cached data "My Trades" and "My Orders". Due to the need to save important information before stopping the application, the TSLab Development Team recommends that you wait until the end of the TSLab stop process.

### Possible reason for manually restarting the program

When running, the program may display a message stating that the computer does not have enough RAM. Recommendation, configure the program for these computer resources. Very often, the user, in the desire to get more, loads a large history, overlays "heavy" indicators, for example, from the Cluster Analysis tab, forgetting that computer resources are not unlimited. On the machine on which TSLab trades, it is advisable to keep the computer resources a little with a margin. Set up scripts, graphics, agents so that the program always has enough resources to work. For this, in scripts and charts, you can use restrictions, such as MaxDays, MaxBars.
