---
title: Overbasic – Alert Functions
description: "**My.Alert** category contains all built-in functions for generating alerts, and therefore displaying video messages or playing sounds based on specific conditions. ## **Display_Notification** Displays a notification message on screen during real time session. **Result type**: none **Arguments**: - **MESSAGE**: message…"
url: "https://www.overcharts.com/en/helpcenter/docs/overbasic-alert-functions/"
updated: "2025-04-24"
category: "Overbasic / Built-In Funtions"
---

# Overbasic – Alert Functions

**My.Alert** category contains all built-in functions for generating alerts, and therefore displaying video messages or playing sounds based on specific conditions.

## **Display_Notification**

Displays a notification message on screen during real time session.

**Result type**: none

**Arguments**:

- **MESSAGE**: message to display
- **DISPLAY MODE**:
  - **BAR**: the message is displayed ONLY once per bar.
  - **ALWAYS**: the message is ALWAYS displayed, even if it has already been displayed in the current bar.
- **CLOSE AFTER X SECONDS**: (*optional*) closes alert message window automatically after x seconds.
- **ADD TO ALERTS LOG**: (**optional**) if TRUE, the alert is added to 'Alerts-Log' window.
- **ALERT NAME**: (**optional**) specifies the alert name.
- **ALERT PRIORITY**: (*facoltativo*) defines the alert importance. Priority is displayed in 'Alerts Log' window.
  - **H**: HIGH priority
  - **M**: MEDIUM priority
  - **L**: LOW priority

```
My.Alert.Display_notification("Hello World!", "BAR")
```

## **Playsound**

Play a sound during real time session.

**Result type**: none

**Arguments**:

- **SOUND TO PLAY**: sound to play (select it from available sound list).
- **PLAYBACK MODE**:
  - **BAR**: the sound plays ONLY once per bar.
  - **ALWAYS**: the sound is ALWAYS played, even if it has already been played in the current bar.
- **ADD TO ALERTS LOG**: (**optional**) if TRUE, an alert message is added to 'Alerts-Log' window. The message is defined by 'ALERT NAME', 'ALERT MESSAGE' and 'ALERT PRIORITY' parameters.
- **ALERT NAME**: (**optional**) specifies the alert name (in alerts-log window).
- **ALERT MESSAGE**: (**optional**) message to be displayed in the alerts-log window.
- **ALERT PRIORITY**: (**optional**) defines the alert importance. Priority is displayed in 'Alerts Log' window.
  - **H**: HIGH priority
  - **M**: MEDIUM priority
  - **L**: LOW priority

```
My.Alert.Playsound("ALERT 1", "BAR")
```

## ****Send_Telegram_Message****

Send a notification message on Telegram during the real-time session. **IMPORTANT**: remember to configure the Telegram sending parameters in the **[Preferences](https://www.overcharts.com/en/helpcenter/docs/preferences/)** window.

**Result type**: none

**Arguments**:

- **MESSAGE**: message to send
- **SENDING MODE**:
  - **BAR**: the message is sent ONLY once per bar.
  - **ALWAYS**: the message is ALWAYS sent, even if it has already been sent in the current bar.
- **ADD TO ALERTS LOG**: (**optional**) if TRUE, the alert is added to 'Alerts-Log' window.
- **ALERT NAME**: (**optional**) specifies the alert name.
- **ALERT PRIORITY**: (*facoltativo*) defines the alert importance. Priority is displayed in 'Alerts Log' window.
  - **H**: HIGH priority
  - **M**: MEDIUM priority
  - **L**: LOW priority

```
My.Alert.Send_Telegram_Message("Hello World!", "BAR")
```
