Skip to content

PopupNotification

interface cAlgo.API Since 5.3

DesktopCLICloud

Represents a popup notification.

Environment behaviour

CLI — works differently. Complete only changes the local State; nothing is shown. Still throws InvalidOperationException when the state is not InProgress.

Cloud — works differently. Complete only changes the local State; nothing is shown. Still throws InvalidOperationException when the state is not InProgress.

Definition

public interface PopupNotification

Namespace: cAlgo.API · Group: Notifications

Examples

var popup = Notifications.ShowPopup("Order", "Placing a buy order...", PopupNotificationState.InProgress);
var result = ExecuteMarketOrder(TradeType.Buy, SymbolName, Symbol.VolumeInUnitsMin);
popup.Complete(result.IsSuccessful ? PopupNotificationState.Success : PopupNotificationState.Error);
popup = api.Notifications.ShowPopup("Order", "Placing a buy order...", PopupNotificationState.InProgress)
result = api.ExecuteMarketOrder(TradeType.Buy, api.SymbolName, api.Symbol.VolumeInUnitsMin)
popup.Complete(PopupNotificationState.Success if result.IsSuccessful else PopupNotificationState.Error)

Methods

Name Description
CompleteDesktopCLICloudvoid Completes an InProgress popup notification.

Properties

Name Description
StateDesktopCLICloudPopupNotificationState Gets state of popup notification.

See also