PendingOrderType
enum cAlgo.API
DesktopCLICloud
Represents the type of pending order.
Definition
public enum PendingOrderType
Namespace: cAlgo.API · Group: Orders
Examples
foreach (var order in PendingOrders)
{
if (order.OrderType == PendingOrderType.Limit)
Print("Limit order {0} at {1}", order.Id, order.TargetPrice);
else
Print("{0} order {1} at {2}", order.OrderType, order.Id, order.TargetPrice);
}
for order in api.PendingOrders:
if order.OrderType == PendingOrderType.Limit:
api.Print(f"Limit order {order.Id} at {order.TargetPrice}")
else:
api.Print(f"{order.OrderType} order {order.Id} at {order.TargetPrice}")
Values
| Name | Value | Description |
|---|---|---|
Limit | 0 | A limit order is an order to buy or sell at a specific price or better. |
Stop | 1 | A stop order is an order to buy or sell once the price of the symbol reaches a specified price. |
StopLimit | 2 | A stop limit order is an order to buy or sell once the price of the symbol reaches specific price. Order has a parameter for maximum distance from that target price, where it can be executed. |