Build a Trading Platform in C# cancel orders examples and code
| # | Control | Name | Text |
|---|---|---|---|
| 1 | Button | btnCancelLast | Cancel Last |
| 2 | Button | btnCancelAll | Cancel All |
private void btnCancelAll_Click(object sender, EventArgs e)
{
// cancels all the orders
ibClient.ClientSocket.reqGlobalCancel();
}
private void btnCancelLast_Click(object sender, EventArgs e)
{
// cancels last order
ibClient.ClientSocket.cancelOrder(order_id - 1);
}

No comments:
Post a Comment