Login Page - Create Account

Support Board


Date/Time: Mon, 25 Nov 2024 01:40:37 +0000



Post From: TimeInForce Issue

[2013-12-19 22:26:34]
Bad Dog - Posts: 17

I am having trouble during auto trading. I am unable to set the TimeInForce to good-till-canceled. All orders are created as day orders:

// Create an s_SCNewOrder object.
    s_SCNewOrder NewOrder;
    NewOrder.OrderQuantity = Contracts.GetInt();
    NewOrder.OrderType = SCT_MARKET;
    NewOrder.TimeInForce = SCT_TIF_GTC;
    //Specify a Stop and target
    NewOrder.Stop1Offset = LongStop;
    NewOrder.Target1Offset = TargetOffset.GetInt()*sc.TickSize;

I am using IB as brokers and the IB presets are set to GTC. I am not getting any error messages from IB so I don't think it is a problem on the brokers side. Are there any settings in SC that could cause orders to default to day orders?

-BD