Support Board
Date/Time: Thu, 31 Oct 2024 12:18:28 +0000
Post From: Every order is getting rejected
[2024-10-29 17:46:54] |
User944318 - Posts: 2 |
I am new to coding in Sierra charts and have the following code as a part of my study: s_SCNewOrder NewSellOrder; NewSellOrder.OrderType = SCT_ORDERTPE_LIMIT; NewSellOrder.PRICE1 = sc.Ask+2; NewSellOrder.OrderQuantity = 1; NewSellOrder.TimeInForce = SCT_TIF_GTC; NewSellOrder.Target1Offset = 5; NewSellOrder.Stop1Offset = 5; int Result = sc.SellOrder(NewSellOrder); if (Result < 0) {sc.AddMessageToLog("Order failed", 1);} I am just trying to submit a limit order above after each bar forms. My log keeps showing the message "Order failed", why might this be? The strategy built just fine and is able to "run" it just doesn't submit the orders. |