Skip to content

Plugin.PendingOrders

property · Plugin · cAlgo.API

DesktopCLICloud

The array of all Pending Orders of the account.

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

Returns PendingOrders

Examples

foreach (var order in PendingOrders)
{
    if (order.StopLossPips == null)
        ModifyPendingOrder(order, order.TargetPrice, 10, order.TakeProfitPips, ProtectionType.Relative, order.ExpirationTime);
}
for order in api.PendingOrders:
    if order.StopLossPips is None:
        api.ModifyPendingOrder(order, order.TargetPrice, 10, order.TakeProfitPips, ProtectionType.Relative, order.ExpirationTime)