Profile Picture

GTC not DAY orders

Posted By blousetrader 7 Years Ago
Message
Posted Thursday May 20 2010
I've got the following code to submit a limit order. I've set the BarsValid = -1 but they're still being
sent to TWS as DAY orders - how do i get GTC orders

Dim ordSettings As New OrderSettings()
ordSettings.TransactionType = TransactionType.Sell
ordSettings.BarsValid = -1
ordSettings.OrderType = OrderType.Limit
ordSettings.LimitPrice = position.EntryPrice.SymbolPrice+lim
ordSettings.Size = TradeSize/2
ordSettings.Description = "LT-1"
position.SubmitOrder(ordSettings)
Posted Friday May 21 2010
They should be GTC, but there was a bug in the TWS plugin a number of months ago where the GTC was not preserved across orders, but that's been fixed.

blousetrader (5/20/2010)
I've got the following code to submit a limit order. I've set the BarsValid = -1 but they're still being
sent to TWS as DAY orders - how do i get GTC orders

Dim ordSettings As New OrderSettings()
ordSettings.TransactionType = TransactionType.Sell
ordSettings.BarsValid = -1
ordSettings.OrderType = OrderType.Limit
ordSettings.LimitPrice = position.EntryPrice.SymbolPrice+lim
ordSettings.Size = TradeSize/2
ordSettings.Description = "LT-1"
position.SubmitOrder(ordSettings)
Posted Friday May 21 2010
I'll update tto the latest TWS and try that
Posted Thursday May 27 2010
Still no joy with this - still going through as DAy orders even though I'm on the latest version of TWS now.
Posted Friday May 28 2010
It looks like there is some confusion regarding what fields need to be set in the plugin. I'm getting some clarification, but essentially a line that was commented out is the correct line to submit gtc orders. So if someone had it right and commented it out, what's wrong? I'm getting to the bottom of that.

blousetrader (5/27/2010)
Still no joy with this - still going through as DAy orders even though I'm on the latest version of TWS now.
Posted Wednesday June 16 2010
Bill - did you find out anything about this - all orders still going through as day and I have to change them manually
Posted Wednesday June 16 2010
Yes, there were evidently a couple of threads on this subject, it was a bug in the TWS plugin.

See this thread.
http://www.rightedgesystems.com/forums/Topic8131-11-3.aspx


blousetrader (6/16/2010)
Bill - did you find out anything about this - all orders still going through as day and I have to change them manually


Similar Topics


Reading This Topic


2005-2017 © RightEdge Systems