Login Page - Create Account

Support Board


Date/Time: Fri, 07 Feb 2025 06:42:10 +0000



Post From: limit orders being filled incorrectly

[2020-05-15 02:24:22]
User701453 - Posts: 176
Limit entry orders are being filled above or below the limit entry price which is the previous close bar.The error doesn't happen all the time and happens on long and short trades.
It happens in live sim and replay chart mode
Code snippet below of how i fill an order entry price variable
ShortOrderEntryPrice = sc.Close[sc.Index-1] + Limit_Offset.GetInt()* sc.TickSize;
NewOrder.OrderType = SCT_ORDERTYPE_LIMIT;
NewOrder.Price1 = ShortOrderEntryPrice;
EntryOrderPrice = NewOrder.Price1;


Screen shot attached of trade activity log orderactionsource column.
Also attached is screen shot of incorrect order entry fill on chart.
Any suggestions on how to correct this?
imageSC_incorrect limit fill on chart.PNG / V - Attached On 2020-05-15 02:21:56 UTC - Size: 70.29 KB - 275 views
imageSC_incorrect limit fill.PNG / V - Attached On 2020-05-15 02:22:04 UTC - Size: 5.61 KB - 242 views