public class OrderTicket
OrderTicket
定义
描述
报单返回实体
参数
| 参数名 | 类型 | 描述 |
|---|---|---|
| OrderId | int | 订单号 |
| Status | OrderStatus | 包含Submitted提交到市场,PartiallyFilled 完成部分,Filled 全部完成,Invalid 异常 |
| Symbol | Symbol | 股票对象 |
| Quantity | decimal | 数量 |
| Time | DateTime | 操作时间 |
返回值
| 返回值 | 类型 | 描述 |
|---|---|---|
| 无返回值 | ||
示例
//卖出股票
Sell(holding, 0, (status, msg, ticket) =>
{
if (ticket.Status== QuantConnect.Orders.OrderStatus.Filled)
{
//卖出成功
Log($"卖出股票:{holding} 成功");
}
else
{
//卖出失败
Log($"卖出股票:{holding} 失败,原因:{msg}");
}
});