Support Board
Date/Time: Tue, 14 Oct 2025 20:25:40 +0000
position avg price scale is wrong if use mkt order vs lmt order in simulation with DTC
View Count: 81
[2025-10-01 08:47:05] |
User601931 - Posts: 12 |
I've noticed an issue in the reported position average price depending on the order type, in simulation mode when interacting with SC via DTC, if I use a market order to open a position, the avg price of the position is reported with a scale x100 and is missing the decimal. (ie: 668675). However, if I use a limit order with a given price, the avg price returned in the position message is correct (ie: 6686.75). Although this is not a critical issue, it does significantly interfere with backtesting and system development through the DTC since it is inconsistent. I've attached a short log reporting the json send and receives through DTC. Order filled, and reported position. 1. Using a market order, the position avg price message is wrong as the decimal is missing: 668675 01:Oct 08:15:04 - RECV: {"Type": 301, "RequestID": 0, "TotalNumMessages": 1, "MessageNumber": 1, "OrderStatus": 7, "OrderUpdateReason": 4, "OrderType": 1, "BuySell": 1, "Price1": 0, "Price2": 0, "TimeInForce": 0, "GoodTillDateTime": 0, "OrderQuantity": 3, "FilledQuantity": 3, "RemainingQuantity": 0, "AverageFillPrice": 668675, "LastFillPrice": 668675, "LastFillDateTime": 1759306500, "LastFillQuantity": 3, "NoOrders": 0, "Symbol": "ESZ25_FUT_CME", "Exchange": "", "ServerOrderID": "36017", "ClientOrderID": "3cddb8dd", "ExchangeOrderID": "36017", "LastFillExecutionID": "36017.1", "TradeAccount": "Sim1", "InfoText": "Trade simulation fill. Bid: 6686.50 Ask: 6686.75 Last: 6686.75", "ParentServerOrderID": "", "OCOLinkedOrderServerOrderID": "", "OpenOrClose": 0, "PreviousClientOrderID": "", "FreeFormText": "", "OrderReceivedDateTime": 1759306505, "LatestTransactionDateTime": 1759306504.769, "Username": ""} 01:Oct 08:15:04 - RECV: {"Type": 306, "RequestID": 0, "TotalNumberMessages": 1, "MessageNumber": 1, "Symbol": "ESZ25_FUT_CME", "Exchange": "", "Quantity": 3, "AveragePrice": 668675, "PositionIdentifier": "", "TradeAccount": "Sim1", "NoPositions": 0, "Unsolicited": 1, "MarginRequirement": 0, "EntryDateTime": 0, "OpenProfitLoss": 0, "HighPriceDuringPosition": 0, "LowPriceDuringPosition": 0, "QuantityLimit": 0, "MaxPotentialPostionQuantity": 0} 2. Using a limit order, the position avg price in the dtc msg is correct: 6686.75 01:Oct 08:10:14- RECV: {"Type": 301, "RequestID": 0, "TotalNumMessages": 1, "MessageNumber": 1, "OrderStatus": 7, "OrderUpdateReason": 4, "OrderType": 2, "BuySell": 1, "Price1": 668850, "Price2": 0, "TimeInForce": 0, "GoodTillDateTime": 0, "OrderQuantity": 3, "FilledQuantity": 3, "RemainingQuantity": 0, "AverageFillPrice": 668675, "LastFillPrice": 668675, "LastFillDateTime": 1759306500, "LastFillQuantity": 3, "NoOrders": 0, "Symbol": "ESZ25_FUT_CME", "Exchange": "", "ServerOrderID": "36013", "ClientOrderID": "1b0295cc", "ExchangeOrderID": "36013", "LastFillExecutionID": "36013.1", "TradeAccount": "Sim1", "InfoText": "Trade simulation fill. Bid: 6686.50 Ask: 6686.75 Last: 6686.75", "ParentServerOrderID": "", "OCOLinkedOrderServerOrderID": "", "OpenOrClose": 0, "PreviousClientOrderID": "", "FreeFormText": "", "OrderReceivedDateTime": 1759306504, "LatestTransactionDateTime": 1759306504.458, "Username": ""} 01:Oct 08:10:14 - RECV: {"Type": 306, "RequestID": 0, "TotalNumberMessages": 1, "MessageNumber": 1, "Symbol": "ESZ25_FUT_CME", "Exchange": "", "Quantity": 3, "AveragePrice": 6686.749850539491, "PositionIdentifier": "", "TradeAccount": "Sim1", "NoPositions": 0, "Unsolicited": 1, "MarginRequirement": 0, "EntryDateTime": 0, "OpenProfitLoss": 0, "HighPriceDuringPosition": 0, "LowPriceDuringPosition": 0, "QuantityLimit": 0, "MaxPotentialPostionQuantity": 0} |
[2025-10-14 06:13:04] |
Sierra_Chart Engineering - Posts: 21123 |
This is resolved in the latest release but there is more work we need to do related to this. But it will take some time.
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, use 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: