Support Board
Date/Time: Sun, 08 Sep 2024 00:26:08 +0000
Post From: Stop Order Not Working in ASCIL
[2024-05-20 18:31:50] |
PS - Posts: 33 |
Hello again -- I'm having some trouble with stop orders. Simply put, the order I'm entering isn't executing. I'm quite sure this is an error on my end -- I've gone through the documentation and sample strategies but can't find an implementation of what I'm trying to do. Below is my code: s_SCNewOrder NewOrder; NewOrder.OrderQuantity = trade_quantity; NewOrder.OrderType = SCT_ORDERTYPE_MARKET; NewOrder.TimeInForce = SCT_TIF_DAY; int Result = sc.SellEntry(NewOrder); // Place stop order 2 points above end price s_SCNewOrder StopOrder; StopOrder.OrderQuantity = trade_quantity; StopOrder.OrderType = SCT_ORDERTYPE_STOP; StopOrder.Price1 = zone.end_price + 2; StopOrder.TimeInForce = SCT_TIF_GTC; The first mini block of code sends an entry order. This is working fine. The second mini block is meant to send a stop order. I've verified that the zone.end_price + 2 value is what it should be. But no exit order is ever triggered despite price hitting the stop value. What am I doing wrong in this implementation? Thank you in advance for your help. |