Skip to content

Plugin.PriceAlerts

property · Plugin · cAlgo.API Since 5.2

DesktopCLICloud

Provides access to Price Alerts.

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 PriceAlerts PriceAlerts {get;}
api.PriceAlerts: PriceAlerts

Returns PriceAlerts

Examples

Print("Price alerts: {0}", PriceAlerts.Count);
foreach (var priceAlert in PriceAlerts.FindAll("EURUSD"))
    Print("EURUSD alert {0} at {1} ({2})", priceAlert.Id, priceAlert.Price, priceAlert.Condition);
api.Print(f"Price alerts: {api.PriceAlerts.Count}")
for priceAlert in api.PriceAlerts.FindAll("EURUSD"):
    api.Print(f"EURUSD alert {priceAlert.Id} at {priceAlert.Price} ({priceAlert.Condition})")