Support Board
Date/Time: Thu, 28 Nov 2024 22:36:34 +0000
[Programming Help] - Assess manually placed orders via ACSIL
View Count: 587
[2023-04-04 14:16:43] |
AndrewAMD1 - Posts: 31 |
My customer asked me to implement a software solution, so I have a question: I want to handle manually placed orders via ACSIL. Here is the flow: 1) User manually places order. 2) Order placement is detected in ACSIL. 3) ACSIL script makes an HTTP post to share this order information. (If necessarily, ACSIL programmer will provide HTTP libraries.) I see that I can set this variable: sc.ReceiveNotificationsForChangesToOrdersPositionsForAnySymbol Does it follow that if a user places any order, the order can be immediately assessed via ACSIL? |
[2023-04-04 17:55:19] |
ondafringe - Posts: 286 |
I don't use HTTP, so can't address that part. However, your ACSIL code can detect a trade placed manually by checking order quantity: 0 means no position / positive number means long X contracts / negative number means short X contracts sc.GetTradePosition(PositionData); int quantity = PositionData.PositionQuantity; Probably other ways, but that's my simple way of checking. Date Time Of Last Edit: 2023-04-04 17:57:37
|
[2023-04-04 18:00:33] |
AndrewAMD1 - Posts: 31 |
I was asking about orders, not positions. And positions will lag behind orders because orders need to fill.
|
[2023-04-04 18:10:02] |
ondafringe - Posts: 286 |
Misread that. :) I only check for open orders placed by code, but you might look through the docs: https://www.sierrachart.com/index.php?page=doc/ACSILTrading.html#GetOrderByID Date Time Of Last Edit: 2023-04-04 18:17:29
|
[2023-04-04 18:23:13] |
AndrewAMD1 - Posts: 31 |
OK, I might have to settle for these: sc.GetOrderByIndex() sc.GetOrderForSymbolAndAccountByIndex() |
To post a message in this thread, you need to log in with your Sierra Chart account: