
In this article, we will talk about events that can be subscribed to at a data source like BotTabPolygon. We will also discuss the properties with fields that can be modified and may be useful to you.
Common settings fields for BotTabPolygon:
Within the data source class are common settings for all sources, changing which can affect N number of sequences simultaneously. This can be useful for:

1. ProfitToSignal - Size of the profit in % for the instrument pair, after which a signal should occur.
2. ActionOnSignalType - Type of signal that will be generated after reaching the profit % specified in the previous setting.
a. BotEvent - a signal will be sent to the robot through the corresponding event, which can be subscribed to from the code.
b. Alert - a window with a record will be opened, indicating that the pair has exceeded the profit threshold.
c. All - both of the previous signals will be generated.
d. None - no reaction will occur.
3. SeparatorToSecurities - Separator for the name of securities, to ensure correct operation of currency selection logic. This is necessary on exchanges where such a separator exists. Sometimes this can be "@" or "" (underscore). For example, Binance and BitGet do not have a separator.
4. CommissionType - Type of commission to be considered in the profit calculation for the pair.
a. None - commission will not be considered.
b. Percent - commission will be calculated in percentages (recommended to include in any case).
5. CommissionValue - Size of the commission in % to be considered in the profit calculation for the pair, if commission accounting is enabled (recommended to set at no less than 0.05%).
6. CommissionIsSubtract - Whether to subtract the commission from the volumes in the instrument pair. (Recommended to include in any case to avoid errors in volume calculation).
7. DelayType - Type of delay in placing orders for the instrument pair.
a. ByExecution - the execution mechanism will wait for the last placed order to be executed before moving on to the next one.
b. InMls - in milliseconds.
c. Instantly - place all three orders for the pair without delay.
8. DelayMls - Interval between orders, specified in milliseconds if the delay type is set as InMls.
9. QtyStart - Starting volume for the starting currency in the pair.
10. OrderPriceType - Order type for trading.
a. Limit - executed at a specified price.
b. Market - executed at any price available in the order book.
11. SlippagePercent - Slippage for Limit orders, if the order execution type is set as Limit.
Important!!!
If you change these values by accessing the class instance in the robot, in order to save the changes, you also need to call the following methods:
12. SaveStandartSettings - save the data to the file system to prevent loss after a reboot.
13. ApplyStandartSettingsToAllSequence - apply all current settings from the variables listed above to all instrument sequences (PolygonToTrade).
Example:

1. Constructor, in which we:
a. Create a BotTabPolygon source using the TabCreate method and save it in the class field _tabPolygon.
b. Create a DalayMls parameter.
c. Subscribe to the ParametersChangeByUser event.
2. ParametersChangeByUser event handler.
a. Assign a new value to the DelayMls field in the BotTabPolygon source.
b. Save all standard values in BotTabPolygon to the file system.
c. Apply all standard values from the standard settings to all instances of trade sequences (PolygonToTrade) configurations.
Events to subscribe to.

1. SequenceToTradeCreateEvent - A new trade sequence has been created. Called when the user manually or automatically creates new sequences.
2. ProfitBySequenceChangeEvent - Profit for the sequence has changed.
3. ProfitGreaterThanSignalValueEvent - Profit for the sequence has exceeded the signal value set in the sequence settings.
Example:

1. Subscription to the event of exceeding the profit for the sequence over the signal value.
2. Event handler.
Link to the robot from the example.
If you have any difficulties or questions, please write to the support chat. Link