Login Page - Create Account

Support Board


Date/Time: Tue, 30 Apr 2024 10:29:56 +0000



Post From: Limit Orders

[2018-04-04 15:05:29]
User39772 - Posts: 311
I use the following code to set up a buy order:

s_SCNewOrder NewOrder;
NewOrder.OrderQuantity = Quantity;
NewOrder.OrderType = SCT_ORDERTYPE_LIMIT;
NewOrder.TimeInForce = SCT_TIF_GOOD_TILL_CANCELED;
NewOrder.TextTag = "Test";
NewOrder.Price1 = sc.Close[sc.Index];

When my entry criterion is met the following code is executed:

Result = sc.BuyEntry(NewOrder);

If the order is not executed in an automated system, whi9ch functions are available to:

1.) if the order is still pending
2.) read the time when the pending order established

Is it possible to solvte that by just using:

NewOrder.TimeInForce and set it to a specific time, like

NewOrder.TimeInForce = 600 seconds or so ?