Skip to content

Plugin.Notifications

property · Plugin · cAlgo.API

DesktopCLICloud

Represents the notifications, such as sounds and email.

Environment behaviour

CLI — not supported. Plugins cannot run in the CLI: ctrader-cli runs cBots only.

Cloud — not supported. Plugins cannot run in the cloud: it runs cBots only.

Definition

public INotifications Notifications {get;}
api.Notifications: INotifications

Returns INotifications

Examples

Example 1

Notifications.PlaySound(@"C:\Windows\Media\notify.wav");
api.Notifications.PlaySound(r"C:\Windows\Media\notify.wav")

Example 2

var emailBody = "this is the message send";
Notifications.SendEmail("from@example.com", "to@example.com", "my subject", emailBody);
api.Notifications.SendEmail("from@example.com", "to@example.com", "my subject", "this is the message send")