Support Board
Date/Time: Wed, 11 Feb 2026 04:11:26 +0000
STOP-LIMIT Order Entry Filled At Wrong Price
View Count: 20
| [2026-02-10 22:42:10] |
| Nkrastins - Posts: 36 |
|
Hi SC Team, pretex: I am trying to code in ASCIL an entry only when previous bar's high is exceeded by using: SCT_ORDERTYPE_TRIGGERED_LIMIT order type. my entry code is something like this: if (PendingBuyOrderID == 0) { // Place new buy triggered-limit (NO attached stop/target) // SC TRIGGERED_LIMIT: Price1 = Limit (fill), Price2 = Trigger (activation) s_SCNewOrder NewOrder; NewOrder.OrderQuantity = 1; NewOrder.OrderType = SCT_ORDERTYPE_TRIGGERED_LIMIT; NewOrder.Price1 = EntryLevel; // Limit/fill price: at the level NewOrder.Price2 = EntryLevel + sc.TickSize; // Trigger price: 1 tick above level NewOrder.TimeInForce = SCT_TIF_DAY; int Result = (int)sc.BuyEntry(NewOrder); if (Result > 0) { PendingBuyOrderID = NewOrder.InternalOrderID; LastEntryLevel = EntryLevel; } } so the fill price should be the Price1, when Price2 is triggered. So if the current price is previous high + 1 tick (ask), I want to get filled at previous high (bid), but the problem is...I tested today, some orders worked just fine, but a few orders got filled at the ask price (one tick above the previous high). So how I could fix this issue? My market is US 10-Y treasury futures, I am on a delayed demo feed currently. I added in the attachment the full code as well. Thanks |
| Attachment Deleted. |
| [2026-02-10 23:02:43] |
| John - SC Support - Posts: 44566 |
|
Refer to the information at the following link: Trade Simulation: How Orders are Filled 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:
