Filters work on the principle of cutoff (funnel). An example of the filter (picture above):
The first filter will pass* only messages with the specified numbers.
The second filter from the messages skipped by the first filter will skip only those that do not contain the given substring (in other words, it will cut off messages containing the given substring).
The third filter will cut off messages with the substring "There is no candle to bind the order" from the messages passed by the second filter.
The order of filters 2 and 3 does not matter, because they filter non-overlapping messages.
Question: How to pass only messages #100 in the notification manager?
Answer: You need to use the "By number" filter and enter 100 in the "Message #" field. If you need to filter several message numbers, then you need to use the "By numbers" filter.
Question: Filter "Reject duplicate lines with 20 identical characters" How does it work?
Answer: The name of the filter may change over time, most likely the phrase "starting from the 16th character" will be added.
The filter works only for agents with the same number of characters in the name (if there are several agents), the time is not taken into account. Example:
Agent 'USDLong': Recalculation... Agent 'Pension': Recalculation...
16 space character after ':'. The message number is not important in this case. Agent names are both 7 characters long, i.e. the beginning of the word "Recalculation" will be from the same character. But if the names of agents differ in length, then this method will not work. A space counts as a character. Those. 20+ characters are those characters that come after the 16th character.
Script
All messages from agents are filtered out.
Category
Trade
All messages from the broker and exchange are filtered out
Data provider
with name _______
All messages from the specified data provider are filtered out.
Duoplications
Compare _____ symbol(s), begin with _____ symbol
Checks messages for duplicate characters and filters out identical characters.
Duoplications
Forget in _____ minutes
Cancels the blocking of receiving identical messages after the end of the time interval you set.
By number
Message # _____
Messages that have the corresponding service number from the list of service message numbers are filtered out.
Except numbers
Show all events except event numbers
Shows event messages, except for those selected from the list of service message numbers.
Identical messages
Reject messages containing a string ________
Filters out messages containing the selected string.
By numbers
Messages list
Opens event list selection windows.
Parameter
with name _____ contains _____
All messages containing the parameter specified in the first input field and the value specified in the second input field are filtered out.
Script
with name _____
Filters messages from the specified script.
By message tag
Message contains tag value _________
Filters out messages containing the selected tag.
Substring
Expression contains substring _________
Filters out messages containing a substring of your choice.
Substring
Expression does not contain a substring
Filters out messages does not containing a substring of your choice.
Substring
Expression contains regular expression
Filters out messages containing a regular expression of your choice.
Substring
Expression does not contains regular expression
Filters out messages does not containing a regular expression of your choice.
Time range
From _____ to _____
Shows event messages in the specified time interval. The rest of the time blocks the passage of messages. The local time of the computer is used.
Transactions
connected with orders
All orders are filtered out.
Transactions
connected with trades
All trades are filtered out.
Transactions
connected with orders and trades
All orders and trades are filtered out.
Type
Debug
Filters out all debug messages.
Type
Information
Filters out all Information messages.
Type
Warning
Filters out all warning messages.
Type
Errors
Filters out all error messages.
Agent
with name _____
Filters messages from the specified agent.
Category
Data provider
All messages from data providers are filtered out.
Category
Program
All messages from the program are filtered out.

Category
Handler
Displays the channel name for notifications and channel settings buttons. The Filters button opens the Edit Filters window. In this window, you can fine-tune the notifications sent to the selected channel
Connected
The switch responsible for the operation of the selected notification channel
Test
When you click the Test button, a test message is sent to the selected notification channel
Comment
A field for your comments for the selected channel.
The context menu opens when you right-click on the workspace of the "Notifications Manager" window.
Properties
Opens the properties of the Notifications Manager window.
Show at
Moves the Notifications Manager window to one of the existing workspace sheets.
Clone window
Creates a copy of the window.
The properties of the "Notifications Manager" window can be opened using the context menu or using the "Properties" button located on the title bar of the sheet windows.
Attention! The settings of the Background row color and Font Settings properties that you have chosen can be returned to their original settings using the "Select Default Settings" button located to the right of the property's drop-down menu. The application of custom settings is indicated by a red indicator on the "Select Default Settings" button.
Appearance
Font settings
Selecting a font style
Columns caption
Shows/hides the header of the columns.
Background row color
The background color of the window rows.
You can choose the type of notification handler from those offered. It could be:
message log;
notification area;
audio file;
Email;
Telegram messenger.
By default, TSLab includes the Message Log handler located at the bottom of the program window. To add a new application notification handler, click the Add button.
You can select one or more types of handlers for simultaneous use. Each type of additional handler can be selected more than once.
The message log is located at the bottom of the workspace. The message log is configured in the Filters dialog box of the Notifications Manager window. Also, the setting of the Message log can be done in the status bar.
When this handler is selected, messages are displayed in the Windows notification area. Messages are configured in the "Filters" dialog box of the "Notifications Manager" window.
To set up a sound notification, you must select an audio file in the .wav, .mid, or .mp3 format.
To receive notifications to a specific email address, you need to fill in the settings.
SMTP Server
Email server address. "From whom"
Port
Port number for outgoing email messages.
User's name
Login to identify the user on the specified server. "From whom"
Password
User password. "From whom"
From
Correspondent's email address.
To set up notifications via messenger, you need to have a registered Telegram account. The messenger can be configured both in the Telegram mobile application and in the Desktop version.
To create a new bot using BotFather, send the /newbot command to the chat
Enter a new name for the bot. With this name, the bot will be displayed in your contacts. Then provide a username for the bot.
After the bot is created, you can find it at the link provided in the message.
If the chosen name is free, BotFather will send back a message with a token that provides access to this bot.
The bot is ready to connect to the Notifications Manager in TSLab. You can set up notifications to be sent directly to the bot's chat, or you can add the bot to a group or channel and receive notifications from those groups.
In order to receive notifications in the chat of the bot you created, follow these steps:
In the "Notifications Manager" window of the TSLab program, Add the Telegram handler.
Copy the API token from BotFather (in the previous picture) and then paste this token into the Bot token field in the Telegram notification handler settings in TSLab
Enable the settings item Listen for Chat Id.
Note! After selecting the "Listen for Chat Id" option, do not close the settings window. You must wait until the chat Id field is filled.
In Telegram, send any message to the chatbot you created. If you did everything correctly, the Chat Id field in the program will be automatically filled in with your bot ID. After that, you can close the Settings window.
In the Notifications Manager window, click the Test button opposite the Telegram handler. A test message will be sent to your bot's chat.
In the same way, you can set up a bot to send messages to your Telegram group.
Create a group with any name. Add the created bot to the group. Give the bot group admin rights.
In the "Notifications Manager" window of the TSLab program, add the Telegram handler.
Open the settings menu of the Telegtam handler. In the settings, enter the received API token. It can be copied from the BotFather bot chat.
Enable the settings item Listen for Chat Id.
Note! After selecting the "Listen for Chat Id" option, do not close the settings window. You must wait until the chat Id field is filled.
In Telegram, send any message to the chatbot you created. If you did everything correctly, the Chat Id field in the program will be automatically filled in with your bot ID. After that, you can close the Settings window.
In the Notifications Manager window, click the Test button opposite the Telegram handler. A test message will be sent to your bot's chat.

To
Addressee's (recipient's) email address.
SSL
Use / do not use a secure encrypted connection.
Send message in header
Passes the text of the message in the header.
Detailed logging
Enable detailed logging.







DataSourceConnected = 1;
DataSourceDisconnected = 2;
DataSourceBroken = 3;
DataSourceConnectError = 4;
NotificationHandlerError = 5;
UpdateManifestFailed = 11;
UpdateFailed = 12;
UpdateVersionStatusFailed = 13;
UpdateUnzipError = 14;
LoadSaveBrokenWorkspace = 21;
InitDataSourceCouldNotFindDefaultDataSource = 31;
CannotCreateProvider = 32;
CannotCreateWorkspaceBackup = 33;
CannotCopyClipboard = 34;
NotAdminRole = 35;
InvalidAdminPassword = 36;
PretradeKeyVerificationError = 37;
BackupSuccessful = 41;
BackupBadPassword = 42;
BackupError = 43;
BackupRestoreFailed = 44;
BackupRestoreSuccessful = 45;
RestoreError = 46;
BackupFailed = 47;
ComonError = 50;
ScrptTranslatorError = 51;
RestartFailedAnyDataSourceActive = 60;
RestartFailedWorkspaceModified = 61;
OutOfMemoryError = 70;
ScriptMessage = 100; // RealtimeDataManager
ScriptCannotBuyMarket = 101; // RealtimePositionCommand
ScriptLoadScriptError = 102;
ScriptSaveScriptError = 103;
ScriptLoadScriptContainerError = 104;
ScriptSaveScriptContainerError = 105;
ScriptChangeContainerError = 106;
ScriptDeleteScriptError = 107;
ScriptAddScriptError = 108;
ScriptContainerCopyToClipboardError = 109;
ScriptEditorSaveHandlerError = 110;
ScriptEditorLoadHandlerError = 111;
ScriptEditorMessage = 120; // ExTemplateEditor,LabControl,GraphControlWrapper,
ScriptAbortAfterTimeout = 121; // ScriptDataManager
ScriptDisableRealtimeUpdate = 122; // ScriptDataManager
ScriptNoSecurity = 123; // ScriptDataManager
ScriptStarted = 124;
ScriptRestarted = 125;
ScriptStopped = 126;
ScriptExecuted = 127;
ScriptCompileError = 128;
ScriptCompileWarn = 129;
ScriptZeroOrder = 130;
ScriptNoOrderBar = 131;
ScriptDoubleExit = 132;
ScriptInvalidStop = 133;
ScriptDiffMore2 = 134;
ScriptNoEntry = 135;
ScriptNoExit = 136;
ScriptGenerationError = 137;
ScriptExecutionError = 138;
ScriptMakeError = 139;
ScriptContainerExpired = 140;
ScriptNotStarted = 141;
ScriptContainerRestriction = 142;
ScriptDateToAlert = 143;
OptimizationAlert = 150;
OrderApplied = 200;
OrderChanged = 201;
OrderCancelled = 202;
OrderActivated = 203;
OrderExecuted = 204;
OrderTransactionInfo = 205;
OrderOperationFailed = 206;
OrderBreakByTimeout = 207;
OrderBlockTimeoutInfo = 208;
TradeReceived = 250;
HandlersNotFound = 300;
HandlersDllNotLoaded = 301;
HandlersDllLoaded = 302;
HandlerNotAdded = 303;
HandlersDllUnloaded = 304;
AgentControlCenter = 600
//1000-1099 Transaq
TransaqSendCommandError = 1000;
TransaqConnectError = 1001;
TransaqTryReconnect = 1002;
TransaqInvalidLogPath = 1003;
TransaqErrorStatus = 1004;
TransaqSkipAccounts = 1005;
TransaqSkipMarkets = 1006;
TransaqSkipSecurities = 1007;
TransaqSkipPositions = 1008;
TransaqConnectorError = 1009;
TransaqEmptyAccounts = 1010;
TransaqEmptyMarkets = 1011;
TransaqEmptyPositions = 1012;
//1100-1199 SmartCom
SmartComNotInstalled = 1100;
SmartComInitializeError = 1101;
SmartComError = 1102;
//1200-1299 Alor
AlorAccessDenied = 1201; // Для этого логина нет доступа.
AlorSubscriptionDenied = 1202;
AlorEmptyLogin = 1203;
AlorHistoryServerConnectionError = 1204; // Не удалось соединиться с сервером истории Алор
AlorError = 1205;
AlorNeedNewPassword = 1206;
AlorPasswordChanged = 1207;
AlorPasswordNotChanged = 1208;
//1300-1399 NetInvestor
NetInvestorServerMessage = 1301; // DataSource,NetInvestor,Crypto
NetInvestorCryptoError = 1302; // DataSource,NetInvestor,Crypto
NetInvestorProtocolError = 1303; // DataSource,NetInvestor,Crypto
//1400-1499 RicomTrust
RicomTrustError = 1400;
RicomTrustInvalidDataFormat = 1401;
RicomTrustSubscriptionDenied = 1402;
RicomTrustSendRequestFailed = 1403;
RicomTrustSecurityError = 1404;
RicomTrustConnectorError = 1410;
//1500-1599 RTSGate
RTSGateError = 1500;
RTSGateNoRouter = 1501;
RTSGateLostConnection = 1502;
RTSAlorReady = 1503;
RTSAlorNotReady = 1504;
//1501-1508 DataSource,RTSGate
//1600-1599 Easy Money
EasyMoneyError = 1600;
// 1700
PretradeFilterMessage = 1700;



The work of the program is associated with a large number of messages. Therefore, we recommend using a separate mail to work with TSLab.
After creating an email:
Open Gmail on your computer.
In the upper right corner, click on the "Settings" icon See all settings.
Open the Forwarding and POP/IMAP tab.
Allow access to untrusted apps in your Google account settings:
Set up a new Email handler:
Open Notifications Manager. Select the main menu item Tools - Notifications Manager
In the Notifications Manager window, click the Add button
Select an Email handler
After setting, click the "Test" button. The first message from the program will come to the mail.
Click the Save Changes button.
You can use the same email to set up "Username", "From" and "To".
SMTP server: smtp.gmail.com
Port: 587
SSL: Yes




