Telegram notification when bot reaches new high but needs to be Label specific

Created at 10 Jan 2024, 15:54
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
50

504402

Joined 19.11.2023

Telegram notification when bot reaches new high but needs to be Label specific
10 Jan 2024, 15:54


Hi, 

 

I have a bot that notifies me when my bot reaches a new high equity wise. However, I have multiple bots on the same account. Does anyone know how I could amend the code below so it only shows me the equity high of positions associated with a specific Label? 

 

 
      if (_telegramEnabled && Account.Equity > _equityHigh && DateTime.UtcNow - _lastMessageSentTime >= _messageInterval)
{
    _equityHigh = Account.Equity;
    var message = $"New equity high reached: {Account.Equity:C}";
    var message1 = $"Positions Count: {Positions.Count}";
    SendTelegramMessage(message);
    SendTelegramMessage(message1);
    _lastMessageSentTime = DateTime.UtcNow;
}}}


@504402