Skip to content

Cancelled Event

Summary

Occurs when pending order is cancelled

Signature

1
public abstract event Action<PendingOrderCancelledEventArgs> Cancelled;

Declaring Type

cAlgo.API.PendingOrders

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
 protected override void OnStart()
 {
     PendingOrders.Cancelled += PendingOrdersOnCancelled;
     var result = PlaceStopOrder(TradeType.Buy, Symbol, 10000, Symbol.Ask + 10 * Symbol.PipSize);
     CancelPendingOrder(result.PendingOrder);
 }
 private void PendingOrdersOnCancelled(PendingOrderCancelledEventArgs args)
 {
    Print("Pending order with id {0} was cancelled. Reason: {1}", args.PendingOrder.Id, args.Reason);
 }

Last update: July 1, 2022

Comments