Sierra Chart | Creating and Submitting a Limit Order in Sierra Chart
I was asked by someone how to create and submit a LIMIT order in Sierra Chart ACSIL. Below is a short snippet with notes at the bottom.
s_SCNewOrder order; // define order structure
order.OrderQuantity = 1; // set order quantity to 1
order.OrderType = SCT_LIMIT; // set order type to LIMIT
order.Price1 = 1300.25; // set order limit price
sc.BuyEntry(order); // use sc.SellEntry(order) if you are going short
- First define an order structure – we set this structure with the order details. In C/C++, everything needs to be defined before using it.
- Next, we set the values for the order structure – in this example, we set the quantity to one, the type to SCT_LIMIT and the limit price to 1300.25. Notice that the price is set using the price1 field of the order structure
- Last, we call the BuyEntry method and pass it the structure – this method will execute the order for us
- BuyEntry is for long / SellEntry for short
Documentation on the order structure and it’s fields here.
Documentation on the Buy and Sell methods that submit orders here