HistoricalOrder
interface cAlgo.API Since 5.1
DesktopCLICloud
Represents a historical order.
Definition
public interface HistoricalOrder
Namespace: cAlgo.API · Group: Historical Orders
Examples
var historicalOrder = HistoricalOrders.FindLast("myLabel");
if (historicalOrder == null)
{
Print("Order not found");
return;
}
Print("Id: {0} | OrderType: {1} | TradeType: {2} | Status: {3} | Submitted: {4}", historicalOrder.Id, historicalOrder.OrderType, historicalOrder.TradeType, historicalOrder.Status, historicalOrder.SubmittedTime);
historicalOrder = api.HistoricalOrders.FindLast("myLabel")
if historicalOrder is None:
api.Print("Order not found")
else:
api.Print(f"Id: {historicalOrder.Id} | OrderType: {historicalOrder.OrderType} | TradeType: {historicalOrder.TradeType} | Status: {historicalOrder.Status} | Submitted: {historicalOrder.SubmittedTime}")
Properties
| Name | Description |
|---|---|
ChannelDesktopCLICloudstring | Order channel. |
CommentDesktopCLICloudstring | Order comment. |
ExpirationTimeDesktopCLICloudDateTime? | Order expiration time. |
FilledQuantityDesktopCLIClouddouble? | Order filled quantity (lots). |
FilledTimeDesktopCLICloudDateTime? | Order filled time. |
FilledVolumeInUnitsDesktopCLIClouddouble? | Order filled volume in units. |
HasTrailingStopDesktopCLICloudbool | Returns true if order has trailing stop loss. |
IdDesktopCLICloudlong | Unique order Id. |
LabelDesktopCLICloudstring | Order label. |
OrderTypeDesktopCLICloudHistoricalOrderType | Order type. |
PositionIdDesktopCLICloudint? | Unique position Id. |
QuantityDesktopCLIClouddouble | Order quantity (lots). |
StatusDesktopCLICloudHistoricalOrderStatus | Order status. |
StopLossDesktopCLIClouddouble? | Order stop loss in Price. |
StopLossPipsDesktopCLIClouddouble? | Order stop loss in Pips. |
StopLossTriggerMethodDesktopCLICloudStopTriggerMethod? | Trigger method for order's StopLoss |
StopOrderTriggerMethodDesktopCLICloudStopTriggerMethod? | StopOrder trigger method. |
SubmittedTimeDesktopCLICloudDateTime | Order submitted time. |
SymbolDesktopCLICloudSymbol | Order symbol. |
SymbolNameDesktopCLICloudstring | Order symbol name. |
TakeProfitDesktopCLIClouddouble? | Order take profit in Price. |
TakeProfitPipsDesktopCLIClouddouble? | Order take profit in Pips. |
TargetPriceDesktopCLIClouddouble | Order target price |
TradeTypeDesktopCLICloudTradeType | Order Trade type (buy or sell) |
VolumeInUnitsDesktopCLIClouddouble | Order volume in units. |