Login Page - Create Account

Support Board


Date/Time: Mon, 21 Apr 2025 15:11:23 +0000



Post From: Retrieving Sierra-Generated Order ID in ACSIL for v2749

[2025-04-06 01:03:13]
User936941 - Posts: 28
I'm sierrachart.h and scdatetime.h from D:\SierraChart\ACS_Source. The main issue is struggling to retrieve the Sierra-generated order ID to cancel orders with time-based cancellation logic (set to 120 seconds). The call to sc.CancelOrder(sierraOrderID) is attempting to cancel using SierraID=122, which fails with CancelResult=-1, 122 is obviously not a sierra generated order id. I’ve reset persistent storage to clear stale values, switched from s_SCTradeOrder.OrderID to InternalOrderID after compile errors showed OrderID isn’t recognized, and relied on sc.SellOrder’s return value—yet cancellation still fails. What’s the best way to get the correct Sierra order ID in v2749 for successful cancellation?