PriceAlerts.Remove
method · PriceAlerts · cAlgo.API Since 5.2
DesktopCLICloud
Removes a price alert.
Environment behaviour
Cloud — not supported. Always empty: Count 0, Find null, FindAll empty, Remove false. Added/Removed/Updated/Triggered never raised.
Definition
bool Remove(PriceAlert priceAlert)
api.PriceAlerts.Remove(priceAlert: PriceAlert) -> bool
Parameters
| Name | C# type | Python type | Description |
|---|---|---|---|
priceAlert | PriceAlert | PriceAlert | Price alert |
Returns bool — True if succeeded otherwise False.
Examples
foreach (var priceAlert in PriceAlerts.FindAll(SymbolName))
{
var removed = PriceAlerts.Remove(priceAlert);
Print("Alert {0} removed: {1}", priceAlert.Id, removed);
}
for priceAlert in api.PriceAlerts.FindAll(api.SymbolName):
removed = api.PriceAlerts.Remove(priceAlert)
api.Print(f"Alert {priceAlert.Id} removed: {removed}")