Login Page - Create Account

DTC Protocol Discussion Forum


Date/Time: Fri, 29 Nov 2024 14:36:48 +0000



Post From: DTC - Market order with Stop and Take Profit (Broken since update)

[2020-07-06 11:19:25]
User667559 - Posts: 27
This worked like a charm before a recent uppdate.

My goal is to enter with a market order and place a bracket around it by using an offset of 9 STOP ticks and 12 Profit ticks.

Sending to Sierra: {
Type: 208,
Symbol: 'NQU20_FUT_CME',
ClientOrderID: 89806686953,
OrderType: 1,
BuySell: 1,
Quantity: 1,
Price1: '10474.50',
TradeAccount: 'Sim1',
IsParentOrder: 1,
RequestID: 18
}
Sending to Sierra: {
Type: 201,
Symbol: 'NQU20_FUT_CME',
ClientOrderID_1: 18436358413,
OrderType_1: 3,
BuySell_1: 2,
Quantity_1: 1,
OffsetFromParent1: 225,
ClientOrderID_2: 6511723183,
OrderType_2: 2,
BuySell_2: 2,
Quantity_2: 1,
OffsetFromParent2: 300,
TimeInForce: 1,
ParentTriggerClientOrderID: 89806686953,
PartialFillHandling: 0,
UseOffsets: 1,
TradeAccount: 'Sim1',
RequestID: 19
}


I had this working but now I get the following error for my orders:
data.OrderStatus 9 {
Type: 301,
RequestID: 0,
TotalNumMessages: 1,
MessageNumber: 1,
OrderStatus: 9,
OrderUpdateReason: 8,
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: 'NQU20_FUT_CME',
Exchange: '',
ServerOrderID: '',
ClientOrderID: '18436358413',
ExchangeOrderID: '',
LastFillExecutionID: '',
TradeAccount: 'Sim1',
InfoText: 'OCO order not allowed with market parent order when using offsets',
ParentServerOrderID: '',
OCOLinkedOrderServerOrderID: '',
OpenOrClose: 0,
PreviousClientOrderID: '',
FreeFormText: '',
OrderReceivedDateTime: 0,
LatestTransactionDateTime: 0
}
data.OrderStatus 9 {
Type: 301,
RequestID: 0,
TotalNumMessages: 1,
MessageNumber: 1,
OrderStatus: 9,
OrderUpdateReason: 8,
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: 'NQU20_FUT_CME',
Exchange: '',
ServerOrderID: '',
ClientOrderID: '6511723183',
ExchangeOrderID: '',
LastFillExecutionID: '',
TradeAccount: 'Sim1',
InfoText: 'OCO order not allowed with market parent order when using offsets',
ParentServerOrderID: '',
OCOLinkedOrderServerOrderID: '',
OpenOrClose: 0,
PreviousClientOrderID: '',
FreeFormText: '',
OrderReceivedDateTime: 0,
LatestTransactionDateTime: 0
}
data.OrderStatus 9 {
Type: 301,
RequestID: 0,
TotalNumMessages: 1,
MessageNumber: 1,
OrderStatus: 9,
OrderUpdateReason: 8,
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: 'NQU20_FUT_CME',
Exchange: '',
ServerOrderID: '',
ClientOrderID: '89806686953',
ExchangeOrderID: '',
LastFillExecutionID: '',
TradeAccount: 'Sim1',
InfoText: 'OCO order not allowed with market parent order when using offsets',
ParentServerOrderID: '',
OCOLinkedOrderServerOrderID: '',
OpenOrClose: 0,
PreviousClientOrderID: '',
FreeFormText: '',
OrderReceivedDateTime: 0,
LatestTransactionDateTime: 0
}


Please explain the steps I need to take to realize the above scenario using DTC.
1. Enter with market order
2. Create OCO bracket around the average price

When I created this the first time I had to provide the current market price instead of just a Market order so Sierra could calculate the offsets correctly. This seemed odd, and the error message now confirms that. Hope you guys can offer me a solution. The recent update broke my program.
Date Time Of Last Edit: 2020-07-06 11:24:01