INotifications.ShowPopup
method · INotifications · cAlgo.API.Internals Since 5.3
DesktopCLICloud
Shows a popup notification.
Environment behaviour
CLI — not supported. No popup is shown. Returns a PopupNotification whose State is the initial state passed in.
Cloud — not supported. No popup is shown. Returns a PopupNotification whose State is the initial state passed in.
Definition
PopupNotification ShowPopup(string caption, string message, PopupNotificationState initialState)
api.Notifications.ShowPopup(caption: str, message: str, initialState: PopupNotificationState) -> PopupNotification
Parameters
| Name | C# type | Python type | Description |
|---|---|---|---|
caption | string | str | Caption or title. |
message | string | str | Message or description. |
initialState | PopupNotificationState | PopupNotificationState | Initial state of notification. |
Returns PopupNotification
Examples
using cAlgo.API;
namespace cAlgo.Robots;
public partial class TestExample : Robot
{
protected override void OnStart()
{
Notifications.ShowPopup("Caption", "Message", PopupNotificationState.Success);
}
}
import clr
clr.AddReference("cAlgo.API")
# Import cAlgo API types
from cAlgo.API import *
# Import trading wrapper functions
from robot_wrapper import *
class Test():
def on_start(self):
api.Notifications.ShowPopup("Caption", "Message", PopupNotificationState.Success)
{
"AccessRights": "None"
}