Login Page - Create Account

Support Board


Date/Time: Mon, 29 Apr 2024 08:35:51 +0000



[Programming Help] - DTC - Cannot modify order created within Sierra itself

View Count: 465

[2020-06-10 18:52:49]
User667559 - Posts: 27
I create a bracket order in Sierra on the DOM, then I would like to change the stop order via DTC.

The problem is that Sierra doesn't create a ClientOrderID which is required to modify orders:
The STOP order created when clicking on the DOM.
{
Type: 301,
RequestID: 0,
TotalNumMessages: 1,
MessageNumber: 1,
OrderStatus: 4,
OrderUpdateReason: 3,
OrderType: 3,
BuySell: 2,
Price1: 1007100,
Price2: 0,
TimeInForce: 1,
GoodTillDateTime: 0,
OrderQuantity: 2,
FilledQuantity: 0,
RemainingQuantity: 2,
AverageFillPrice: 0,
LastFillPrice: 0,
LastFillDateTime: 0,
LastFillQuantity: 0,
NoOrders: 0,
Symbol: 'NQM20_FUT_CME',
Exchange: '',
ServerOrderID: '7960',
ClientOrderID: '',
ExchangeOrderID: '7960',
LastFillExecutionID: '',
TradeAccount: 'Sim1',
InfoText: 'Simulated order accepted',
ParentServerOrderID: '7959',
OCOLinkedOrderServerOrderID: '7960',
OpenOrClose: 2,
PreviousClientOrderID: '',
FreeFormText: 'SimpleBracket.twconfig',
OrderReceivedDateTime: 1591814319,
LatestTransactionDateTime: 1591814431.777
}


When I try to modify set order:
Sending to Sierra: {
Type: 204,
ServerOrderID: '7960',
ClientOrderID: '',
Price1: 10071.25,
TradeAccount: 'Sim1',
Quantity: 0,
Price1IsSet: 1,
Divisor: 100,
RequestID: 9
}

I get:

{
Type: 301,
RequestID: 0,
TotalNumMessages: 1,
MessageNumber: 1,
OrderStatus: 0,
OrderUpdateReason: 10,
OrderType: 0,
BuySell: 0,
Price1: null,
Price2: null,
TimeInForce: 0,
GoodTillDateTime: 0,
OrderQuantity: null,
FilledQuantity: null,
RemainingQuantity: null,
AverageFillPrice: null,
LastFillPrice: null,
LastFillDateTime: 0,
LastFillQuantity: null,
NoOrders: 0,
Symbol: '',
Exchange: '',
ServerOrderID: '7960',
ClientOrderID: '',
ExchangeOrderID: '',
LastFillExecutionID: '',
TradeAccount: '',
InfoText: 'ClientOrderID field is not set.',
ParentServerOrderID: '',
OCOLinkedOrderServerOrderID: '',
OpenOrClose: 0,
PreviousClientOrderID: '',
FreeFormText: '',
OrderReceivedDateTime: 0,
LatestTransactionDateTime: 0
}

Which makes sense. However, I would really like to modify any order that is created within Sierra itself. Can you please explain how to do that?
Date Time Of Last Edit: 2020-06-10 18:53:23
[2020-06-10 18:56:07]
User667559 - Posts: 27
Right, I think I fixed it by just giving any random string to the ClientOrderID field, this is confusing while reading the documentation, but it works.
Date Time Of Last Edit: 2020-06-10 18:59:23
[2020-06-12 18:18:59]
Sierra Chart Engineering - Posts: 104368
You do not have to use the same ClientOrderID when modifying the order. Even though there is not one assigned, you just assign one like you did.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account